通過tablelayout設(shè)計簡單的登錄界面

樣圖:




代碼:

? xmlns:android="http://schemas.android.com/apk/res/android"

? ? xmlns:tools="http://schemas.android.com/tools"

? ? xmlns:app="http://schemas.android.com/apk/res-auto"

? ? android:layout_width="match_parent"

? ? android:layout_height="match_parent"

? ? android:gravity="center_vertical"

? ? android:stretchColumns="0,3"

? ? android:background="@mipmap/biejin"

? ? tools:context=".MainActivity">

? ? ? ? ? android:layout_width="wrap_content"

? ? ? ? ? android:layout_height="wrap_content"

? ? ? ? ? android:text="QiuQiu:"

? ? ? ? ? android:id="@+id/text"/>

? ? ? ? ? android:layout_width="20dp"

? ? ? ? ? android:layout_height="20dp"

? ? ? ? ? android:background="@mipmap/ic_launcher_round"

? ? ? ? ? android:layout_toRightOf="@+id/text"/>

? ? ? ? ? ? ? android:text="用戶名:"

? ? ? ? ? ? ? android:textSize="30dp"

? ? ? ? ? ? ? android:id="@+id/text1"

? ? ? ? ? ? ? />

? ? ? ? ? ? android:layout_width="wrap_content"

? ? ? ? ? ? android:layout_height="wrap_content"

? ? ? ? ? ? android:minWidth="150dp"/>

? ? ? ? ? ? android:text="密碼:"

? ? ? ? ? ? android:textSize="30dp"

? ? ? ? ? ? android:id="@+id/text2"

? ? ? ? ? ? />

? ? ? ? ? ? android:layout_width="wrap_content"

? ? ? ? ? ? android:layout_height="wrap_content"

? ? ? ? ? ? android:minWidth="150dp">

? ? ? ? android:layout_width="wrap_content"

? ? ? ? android:layout_height="wrap_content"

? ? ? ? android:layout_marginRight="100dp"

? ? ? ? android:layout_marginLeft="100dp"

? ? ? ? android:text="登陸"/>

</TableLayout>

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容