QQ登陆界面
来源:互联网 发布:ai人工智能培训班 编辑:程序博客网 时间:2024/06/10 18:55
终于完成QQ登陆界面布局,哎,这是Android 工作的第一个工作任务。虽然做了两三天,但很欣慰,最终能够完成。
下面我把自己感觉最难的布局贴出来,即QQ账号的布局,困扰我好久,因为之前没练过。
QQ账号(即上面其中一个布局)布局代码:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/accout_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="55dp"
android:layout_marginRight="50dp"
android:background="@drawable/qq_edit_login"
android:hint="请输入账号"
android:numeric="integer"
android:paddingLeft="50dp"
android:paddingTop="10sp"
android:singleLine="true"
android:maxLength="12"
android:textSize="20dp" />
<TextView
android:id="@+id/count_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="60dp"
android:paddingTop="10dp"
android:layout_alignTop="@id/accout_edit"
android:layout_alignBottom="@id/accout_edit"
android:text="账号"
android:textSize="20dp" />
<ImageButton
android:id="@+id/imagebuttom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/count_txt"
android:layout_alignTop="@id/accout_edit"
android:layout_alignBottom="@id/accout_edit"
android:layout_marginLeft="135dp"
android:background="@drawable/account_button_prsess" />
<!-- 注意定位方式,在ImageButton 中现在对齐方式中在TextView的右边,在能在layout_marginLeft="135dp"体现出,在
距离左边135dp的距离。还有注意方向 -->
</RelativeLayout>
资源文件:
account_button_press.xml:
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/button2_down" />
<!-- press -->
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/button2_over" />
<!--focused -->
<item android:state_enabled="true" android:drawable="@drawable/button2" />
<!-- defauld -->
</selector>
qq_edit_login.xml:
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/input" />
<item android:state_pressed="true" android:drawable="@drawable/input" />
<item android:state_focused="true" android:drawable="@drawable/input_over" />
</selector>
图片:
希望大家能够在Android方面相互学习,相互探讨!
日起:2013.115
- QQ登陆界面
- QQ登陆界面
- QQ登陆界面
- QQ登陆界面
- QQ登陆界面
- 山寨qq登陆界面
- 仿qq登陆界面
- qq登陆界面模拟
- qq登陆界面
- QQ登陆界面
- java实现QQ登陆界面
- java Swing QQ登陆界面
- java 仿qq登陆界面
- Android仿qq登陆界面
- java仿qq登陆界面
- 仿QQ登陆客户端登陆界面
- Android 高仿QQ 登陆界面
- android学习笔记(3)---QQ登陆界面
- failed to create the java virtual machine 解决方法
- Bootloader系列(一)Bootloader概述
- Android开发之ClipboardManager
- tcsh中设置.cshrc(ifconfig:command not found)
- Java:设计模式之Builder
- QQ登陆界面
- Nmap扫描原理与用法
- ModelSim仿真流程
- 作为程序员,要取得非凡成就需要记住的15件事。
- Android 触摸屏(TP)问题现象分析和解决方法汇总
- finally在什么时候执行
- proxy patter --代理模式
- windows jenkins通过git获取代码
- java中指定小数点后面的位数