XML布局 <LinearLayout 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:orientation="vertical" >
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/title" />
<TextView android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" >
<Button android:id="@+id/button1" android:background="@drawable/r1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:text="@string/up" />
<Button android:layout_alignParentRight="true" android:id="@+id/button2" android:background="@drawable/btn_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:text="@string/down" />
</RelativeLayout> </LinearLayout> |
style样式 <style name="title"> <item name="android:background">#6666ff00</item> <item name="android:padding">10dip</item> <item name="android:textSize">20sp</item> <item name="android:gravity">center</item> </style> |
|