<ListView
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp" /> <TextView
android:id="@id/android:empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FF0000"
android:text="No data" />xml 这么定义的话.在Activity里面如何findViewById 或者什么方法拿到这个listview啊
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp" /> <TextView
android:id="@id/android:empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FF0000"
android:text="No data" />xml 这么定义的话.在Activity里面如何findViewById 或者什么方法拿到这个listview啊
解决方案 »
- 在程序中按下home键之后 到主界面后 不做操作任何操作 过一下会自动跳到刚所运行的程序
- android的未来在哪里
- android中ToggleButton应用
- <Android应用开发揭秘>这本书怎么样?谁读过?
- 如果不知道activity的名字,如何用intent启动别的程序?
- 如何查看android的Bluetooth所有可用的profile
- 关于在源码内开发一个来电自动接听的功能
- 请问 如何设置全部的Activity使用一个actionbar
- Android中用Bitmap画图预览,视频图像分辨率是320x240(4:3),手机分辨率是540x960(9:16),图像被拉伸怎么办?
- ListView item的背景色
- activity上悬挂一个列表?
- 求原因:广播中出现了ANR异常,接收的屏幕点亮广播android.intent.action.SCREEN_ON
就直接继承ListActivity 然后 setListAdapter(adapter)就可以了。自定义的话
ListView list=(ListView)findViewById(R.id.list);
list.setListAdapter(adapter)