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" 

 

相关文章:

  • 2022-01-11
  • 2021-06-18
  • 2022-12-23
  • 2021-11-11
  • 2021-12-14
  • 2021-07-12
  • 2021-04-03
猜你喜欢
  • 2022-12-23
  • 2021-09-08
  • 2021-09-10
  • 2022-12-23
  • 2022-01-29
相关资源
相似解决方案