同一个页面的两种效果
第一种效果
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:id="@+id/txt_loginerror"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textColor="#ff0000"
android:text="输入的账号或者密码不正确"
android:gravity="left"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
/>
android:id="@+id/username"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="账号"
android:gravity="left"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
android:id="@+id/txt_username"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:autoText="false"
android:capitalize="none"
android:gravity="fill_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
android:id="@+id/password"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="密码"
android:gravity="left"
/>
android:id="@+id/txt_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:autoText="false"
android:capitalize="none"
android:gravity="fill_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
android:id="@+id/txt_toregister"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textColor="#2200C1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="没有账号?快速注册"
android:gravity="left"
/>
android:id="@+id/but_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="登录"
/>
第二种效果
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
>
android:id="@+id/txt_loginerror"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textColor="#ff0000"
android:text="输入的账号或者密码不正确"
android:gravity="left"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:id="@+id/username"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="账号"
android:gravity="left"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
android:id="@+id/txt_username"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:autoText="false"
android:capitalize="none"
android:gravity="fill_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:id="@+id/password"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="密码"
android:gravity="left"
/>
android:id="@+id/txt_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:autoText="false"
android:capitalize="none"
android:gravity="fill_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
>
android:id="@+id/txt_toregister"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textColor="#2200C1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="没有账号?快速注册"
android:gravity="left"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
>
android:id="@+id/btn_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="登录"
/>
android:id="@+id/btn_register"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="注册"
/>