Code: Activity_main: <?xml version= "1.0" encoding= "Utf-8"?> <relativelayout xmlns:android= "Http://schemas.android.com/apk/res/android" Android:layout_width= "Fill_parent" android:layout_height= "Fill_parent" android:background= "#fff0f0f0" > <linearlayout Android:layout_width= "Fill_parent" android:layout_height= "Wrap_content" android:orientation= "Vertical" android:paddingbottom= "10.0dip" > <linearlayout Android:layout_width= "Fill_parent" android:layout_height= "Fill_parent" android:layout_weight= "0.0" Android:focusable= "true" Android:focusableintouchmode= "true" android:orientation= "Vertical" > <framelayout Android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" Android:layout_gravity= "Center_horizontal" android:layout_margintop= "22.0dip" > <imageview Android:layout_width= "57.0dip" android:layout_height= "57.0dip" android:layout_gravity= "Center" Android:adjustviewbounds= "true" android:contentdescription= "@null" Android:scaletype= "Centercrop" android:src= "@drawable/setting_head_icon"/> <imageview Android:layout_width= "66.0dip" android:layout_height= "66.0dip" android:layout_gravity= "Center" Android:adjustviewbounds= "true" android:contentdescription= "@null" Android:scaletype= "Centercrop" android:visibility= "Visible"/> </FrameLayout> <!--android:src= "@drawable/setting_head_border"- <edittext Android:id= "@+id/usernametext" Android:layout_width= "Fill_parent" android:layout_height= "50.0dip" android:layout_marginleft= "12.0dip" android:layout_marginright= "12.0dip" android:layout_margintop= "15.0dip" android:background= "@color/input_color" Android:drawablepadding= "15.0dip" Android:ems= "10" android:hint= "@string/username" Android:inputtype= "Text" Android:paddingbottom= "2.0dip" android:paddingleft= "15.0dip" android:paddingright= "15.0dip" android:paddingtop= "2.0dip" Android:singleline= "true" Android:textcolorhint= "#ff999999" Android:textsize= "16.0sp"/> <edittext Android:id= "@+id/passwdtext" Android:layout_width= "Fill_parent" android:layout_height= "50.0dip" Android:layout_marginbottom= "20.0dip" android:layout_marginleft= "12.0dip" android:layout_marginright= "12.0dip" android:layout_margintop= "20.0dip" android:background= "@color/input_color" Android:drawablepadding= "15.0dip" Android:ems= "10" android:hint= "@string/passwd" Android:inputtype= "Textpassword" Android:paddingbottom= "2.0dip" android:paddingleft= "15.0dip" android:paddingright= "15.0dip" android:paddingtop= "2.0dip" Android:singleline= "true" Android:textcolorhint= "#ff999999" Android:textsize= "16.0sp"/> <button Android:id= "@+id/bnlogin" Android:layout_width= "Fill_parent" android:layout_height= "50.0dip" android:layout_marginleft= "12.0dip" android:layout_marginright= "12.0dip" android:background= "@color/login_button" Android:singleline= "true" android:text= "@string/login" Android:textcolor= "#ffffffff" Android:textsize= "18.0sp"/> </LinearLayout> </LinearLayout> </RelativeLayout> Colors: <?xml version="1.0" encoding="Utf-8"?> <resources> <color name="Input_color"> #fff </color> <color name="Login_button"> #3980F4 </color> </resources> Strings: <?xml version= "1.0" encoding= "Utf-8"?> <resources> <string name= "App_name" >shiyan4</string> <string name= "Action_settings" >Settings</string> <string name= "Hello_world" >hello world!</string> <string name= "Login" > Login </string> <string name= "UserName" > Please enter your account </string> <string name= "passwd" > Please enter your password </string> </resources> Run Result: () |