<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啊
解决方案 »
- Eclipse和我都崩溃!
- Android 播放网络 H264 Streaming
- 关于android 动态库和静态库的问题
- ANDROID NDK开发:头文件引不进去
- android AutoCompleteTextView 使用问题
- 求助:我使用gpio_export函数为什么没有/sys/class/gpio目录?
- recovery_from_boot.p太大
- Android绘制图像时布局文件选择问题。鱼和熊掌兼得?!
- “函数”与“导入相应包”?
- Spinner 不响应setOnItemSelectedListener事件
- activity上悬挂一个列表?
- 求原因:广播中出现了ANR异常,接收的屏幕点亮广播android.intent.action.SCREEN_ON
就直接继承ListActivity 然后 setListAdapter(adapter)就可以了。自定义的话
ListView list=(ListView)findViewById(R.id.list);
list.setListAdapter(adapter)