Android_RelativeLayout
2016-12-01 19:58
183 查看
//首先说明啊,我这个是练习书上的代码,不是原创的,写这个也是算督促一下自己吧。 个人感觉这个就是能够通过调整相对位置的一个方法吧,什么below 啊 toLetfOf 啊什么的,但是我比较困惑的是,android:background="@android:drawable/editbox_background",这句应该是调整背景的,但是我做出来没什么变化。简直尴尬了。
<?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" > <TextView android:id="@+id/label" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Please input something ! " /> <EditText android:id="@+id/entry" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:drawable/editbox_background" android:layout_below="@id/label" /> <Button android:id="@+id/ok" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/entry" android:layout_alignParentRight="true" android:layout_marginLeft="10dip" android:text="OK" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/ok" android:layout_alignTop="@id/ok" android:text="Cancel"/> </RelativeLayout>
相关文章推荐
- Android Layout 之 RelativeLayout
- Android Layout 之 RelativeLayout
- android布局 LinearLayout和RelativeLayout
- android LinearLayout和RelativeLayout实现精确布局
- android 如何把一个 RelativeLayout或ImageView背景设为透明
- android LinearLayout和RelativeLayout实现精确布局
- Android布局之RelativeLayout
- android LinearLayout和RelativeLayout实现精确布局
- android LinearLayout和RelativeLayout实现精确布局
- Android基础教程(二)之五大布局对象---FrameLayout,LinearLayout ,AbsoluteLayout,RelativeLayout,TableLayout.
- Android 布局 之 TableLayout,RelativeLayout,AbsoluteLayout,FrameLayout
- android 相对布局 RelativeLayout 属性
- Android Layout 之 RelativeLayout
- Android基础(二) RelativeLayout
- Android基础教程(二)之五大布局对象---FrameLayout,LinearLayout ,AbsoluteLayout,RelativeLayout,TableLayout.
- Android Layout 之 RelativeLayout
- Android中文API(99)—— RelativeLayout
- Android界面布局-----RelativeLayout(相对布局)
- android LinearLayout和RelativeLayout实现精确布局
- Android UI学习 - Linear Layout, RelativeLayout