listview 下面添加button方法

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >


<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="积分兑换平台"
android:textSize="22sp" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:layout_above="@+id/release_bottom"
android:layout_marginTop="26dp"
android:orientation="vertical" >

<ListView
android:id="@+id/listView_release_manage"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>

</LinearLayout>


<include layout="@layout/release_manage_bottom"
android:id="@+id/release_bottom"/>

</RelativeLayout>

 

主要是include的用法   布局要用相对布局

 

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical" >

<TextView
android:id="@+id/textView1"
android:layout_width="300dp"
android:layout_height="1dp"
android:background="@drawable/addressbar_bg"
android:text="TextView" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="10dp">

<Button
android:id="@+id/button_release_manage_return"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="返回" android:layout_marginLeft="40dp"/>

 

<Button
android:id="@+id/button_release_manage_close"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="关闭"
android:layout_marginLeft="40dp"/>

</LinearLayout>

</LinearLayout>

 

关键是红色字体的部分。

posted on 2012-07-11 11:46  冷雨夜~  阅读(3192)  评论(0编辑  收藏  举报

导航