這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)?lái)有關(guān)利用Android怎么制作一個(gè)APP登錄界面,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。

1.布局的xml文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#2197db"
>
<ImageView
android:id="@+id/loginbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:src="@drawable/login_pic"/>
<LinearLayout
android:id="@+id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/loginbutton"
android:layout_marginLeft="28dp"
android:layout_marginRight="28dp"
android:background="#fff"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="44dp"
android:background="#fff"
android:gravity="center_vertical"
android:orientation="horizontal" >
<EditText
android:id="@+id/userId"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@null"
android:imeOptions="actionDone"
android:textSize="16sp"
android:ems="10"
android:hint="請(qǐng)輸入用戶名"
>
</EditText>
<Button
android:id="@+id/button_bar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="8dp"
android:layout_marginLeft="1dp"
android:background="@drawable/login_input_arrow"
/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1.0px"
android:layout_marginLeft="1.0px"
android:layout_marginRight="1.0px"
android:background="#ffc0c3c4" />
<EditText
android:id="@+id/pass"
android:layout_width="fill_parent"
android:layout_height="44.0dip"
android:background="#00ffffff"
android:gravity="center_vertical"
android:inputType="textPassword"
android:maxLength="16"
android:maxLines="1"
android:textColor="#ff1d1d1d"
android:textColorHint="#ff666666"
android:textSize="16.0sp"
android:hint="請(qǐng)輸入密碼"
/>
</LinearLayout>
<Button
android:id="@+id/loginBtn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/input"
android:layout_marginTop="10dp"
android:background="#3aadfd"
android:text="登 錄"
android:textColor="#ffffff"
android:textSize="18dp"
android:layout_centerHorizontal="true"
android:layout_marginLeft="28dp"
android:layout_marginRight="28dp"/>
<TextView
android:text=""
android:layout_width="wrap_content"
android:layout_below="@+id/loginBtn"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:id="@+id/promptText"
android:textColor="#ff0000"
android:layout_marginTop="10dp"
android:textSize="18sp"/>
</RelativeLayout>
分享文章:利用Android怎么制作一個(gè)APP登錄界面-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:http://chinadenli.net/article10/pdgdo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供云服務(wù)器、商城網(wǎng)站、定制網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、企業(yè)建站、定制開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)