第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

不能在約束布局周圍移動(dòng)一個(gè)簡(jiǎn)單的按鈕

不能在約束布局周圍移動(dòng)一個(gè)簡(jiǎn)單的按鈕

紅糖糍粑 2021-11-03 14:24:40
我定義了一個(gè)約束布局,里面有一個(gè)按鈕。問(wèn)題是我似乎無(wú)法移動(dòng)按鈕,因?yàn)樗潭ㄔ谄聊坏淖笊辖?。有什么幫助嗎?lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:padding="16dp"tools:context=".MainActivity"><Button    android:id="@+id/button2"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:text="Button" />
查看完整描述

3 回答

?
慕容708150

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超4個(gè)贊

那對(duì)我有幫助。Android studio -> Build -> Clean Project。


查看完整回答
反對(duì) 回復(fù) 2021-11-03
?
神不在的星期二

TA貢獻(xiàn)1963條經(jīng)驗(yàn) 獲得超6個(gè)贊

除了添加邊距外,請(qǐng)?jiān)谠O(shè)計(jì)選項(xiàng)卡或文本選項(xiàng)卡中使用約束來(lái)定位小部件。XML 代碼: app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toLeftOf="parent"

您可以在“設(shè)計(jì)”選項(xiàng)卡(右上角的屬性窗格)中添加邊距,然后在“文本”選項(xiàng)卡中查看添加的 XML 以查看 XML 中的更改。

默認(rèn)情況下,在約束布局中,任何沒(méi)有約束的小部件都會(huì)落到右上角。


查看完整回答
反對(duì) 回復(fù) 2021-11-03
?
皈依舞

TA貢獻(xiàn)1851條經(jīng)驗(yàn) 獲得超3個(gè)贊

要在約束布局中移動(dòng),您必須像下面的代碼一樣定義您的小部件:此代碼可以將您的小部件移動(dòng)到屏幕的右側(cè):


<Button

    android:id="@+id/img"

    android:layout_width="wrap_content"

    android:layout_height="wrap_content"

    app:layout_constraintTop_toTopOf="parent"

    app:layout_constraintRight_toRightOf="parent"

    android:layout_marginTop="10dp"

    />


查看完整回答
反對(duì) 回復(fù) 2021-11-03
  • 3 回答
  • 0 關(guān)注
  • 221 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)