<?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" >    <ScrollView        android:id="@+id/scrollView1"        android:layout_width="match_parent"        android:layout_height="fill_parent"        android:layout_above="@+id/llybuttom" >        <LinearLayout            android:id="@+id/layout_business_detail"            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:orientation="vertical" >            <com.test.view.MyListView                android:id="@+id/listView"                android:layout_width="fill_parent"                android:layout_height="fill_parent"                android:divider="@drawable/list_line"                android:dividerHeight="1dip" />        </LinearLayout>    </ScrollView>    <LinearLayout        android:id="@+id/llybuttom"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_alignParentBottom="true"        android:background="@drawable/listviewbottom"        >        <Button                android:layout_width="wrap_content"                android:layout_height="wrap_content"                android:gravity="center"                android:text="@string/hello" />    </LinearLayout></RelativeLayout>

必须重写ListView
package com.test.view;import android.content.Context;import android.util.AttributeSet;import android.widget.ListView;public class MyListView extends ListView {public MyListView(Context paramContext) {super(paramContext);}public MyListView(Context paramContext, AttributeSet paramAttributeSet) {super(paramContext, paramAttributeSet);}public MyListView(Context paramContext, AttributeSet paramAttributeSet,int paramInt) {super(paramContext, paramAttributeSet, paramInt);}//设置高度可以无限拉升@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {heightMeasureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,MeasureSpec.AT_MOST);super.onMeasure(widthMeasureSpec, heightMeasureSpec);}}

更多相关文章

  1. android_camera_003
  2. 【Android】时间与日期Widget(DatePicker 与 TimePicker)
  3. android TextView 丰富多彩的字体样式代码
  4. Android带删除按钮的ListView
  5. numberPicker实现时间选择设置功能
  6. Android设置输入框和软键盘动态悬浮
  7. Android与HTML5交互模版
  8. 安卓加载网页
  9. popuwindow

随机推荐

  1. RadioButton样式自定义
  2. Android之分頁效果-ViewPager、Indicator
  3. Android使用OKHttp3实现下载(断点续传、
  4. 使Android开发方便快捷的8个好工具
  5. Android中Intent对象与Intent Filter过滤
  6. Android使用局和数据实现天气项目-androi
  7. htc A315 android usb驱动安装
  8. Skype 视频电话功能终于支持更多 Android
  9. 编程回忆之Android回忆(Android 连接到web
  10. Android 学习经验之分享