把 Activity 改成 ListActivity继续使用 setContentView
2024-09-02 10:02:54
ListActivity has a default layout that consists of a single, full-screen list in the center of the screen. However, if you desire, you can customize the screen layout by setting your own view layout with setContentView() in onCreate(). To do this, your own view MUST contain a ListView object with the id "@android:id/list" (or list if it's in code)
在Main的<listvie定义的时候,需要写一个系统知道的名字, id "@android:id/list" 。否则系统就找不到。
ListActivity中setContentView()传入的layout中必须有一个id为android:list的ListView
去掉ListView 的分割线
ListView.setDividerHeight(0); ListView.setDivider(null);
去掉ListView 或各种滚动控件的边界颜色
android:overScrollMode="never"
android:fadingEdge="none"
最新文章
- Promise对象
- RK 61 键盘 Ubuntu 下键位映射修改方案
- Enhanced Mitigation Experience Toolkit 软件安全性强化工具
- Windows 10通过本地镜像离线安装.NET 3.5
- 数据结构之图 Part2 - 3
- 使用phantomjs生成网站快照
- Linux 命令 - free: 显示系统的内存信息
- Jsoup API解析HTML中input标签
- .Net Core迁移到MSBuild平台(二)
- JS大小写字母转换
- 【算法】CRF(条件随机场)
- Vue-admin工作整理(九): 状态管理Vuex-state和getters
- Kong(V1.0.2) Securing the Admin API
- 排序jq
- iOS9下App Store新应用提审攻略
- chr(9) chr(10) chr(13) chr(32)
- DevExpress GridView 整理
- 在github Pages上部署octopress搭建个人博客系统
- python: delete the duplicates in a list
- c#编程指南(六) 类索引器(Class Indexer)