标签:风飞雪未扬 relativelayout相对布局 android布局
|
No.
|
属性名称
|
对应的规则常量
|
描述
|
|
1
|
android:layout_below
|
RelativeLayout.BELOW
|
|
|
2
|
android:layout_toLeftOf
|
RelativeLayout.LEFT_OF
|
|
|
3
|
android:layout_toRightOf
|
RelativeLayout.RIGHT_OF
|
|
|
4
|
android:layout_alignTop
|
RelativeLayout.ALIGN_TOP
|
|
|
5
|
android:layout_alignBottom
|
RelativeLayout.ALIGN_BOTTOM
|
|
|
6
|
android:layout_alignLeft
|
RelativeLayout.ALIGN_LEFT
|
|
|
7
|
android:layout_alignRight
|
RelativeLayout.ALIGN_RIGHT
|
|
<span style="font-size:18px;"><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:textAlignment="center"
tools:context=".MainActivity" >
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:ems="10" />
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/editText1"
android:layout_below="@+id/editText1"
android:ems="10"
android:inputType="textPassword" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/editText1"
android:layout_alignParentLeft="true"
android:text="账号" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/editText2"
android:layout_alignParentLeft="true"
android:text="密码"
android:textAlignment="center" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText2"
android:layout_marginLeft="23dp"
android:layout_marginTop="36dp"
android:layout_toRightOf="@+id/textView2"
android:text="登 录" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/button1"
android:layout_marginLeft="14dp"
android:layout_toRightOf="@+id/button1"
android:autoLink="web"
android:linksClickable="true"
android:text="忘记密码"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="10dp" />
</RelativeLayout>
</span>|
1
|
public RelativeLayout.LayoutParams (int w, int h)
|
构造
|
指定RelativeLayout布局的宽度和高度
|
|
2
|
public void addRule (int verb, int anchor)
|
普通
|
|
|
3
|
public int[] getRules ()
|
普通
|
|
从零开始学android<RelativeLayout相对布局.十六.>,布布扣,bubuko.com
从零开始学android<RelativeLayout相对布局.十六.>
标签:风飞雪未扬 relativelayout相对布局 android布局
原文地址:http://blog.csdn.net/u013616976/article/details/38539535