84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
在setadapter的时候,Listview会自己拿到焦点,跳转到最上面。怎么不让listview拿到焦点呢?
不考虑的方法:1.把焦点给其他控件2.把布局写成Listview的header
业精于勤,荒于嬉;行成于思,毁于随。
Found a way. Use setFocuse to determine whether the user clicked it.
Call ListView.setAdapter(...) first when the page opens
Refresh data through Adapter.notifyDataChanged()
ListView焦点引起的问题基本无解, 即便处理了, 还是会有不适应的情况. 连ListView滚动时都会获取focus. 所以, 尝试下RecyclerView, 并调用RecyclerView.setFocusable(false).
ListView
RecyclerView
RecyclerView.setFocusable(false)
Found a way.
Use setFocuse to determine whether the user clicked it.
Call ListView.setAdapter(...) first when the page opens
Refresh data through Adapter.notifyDataChanged()
ListView
焦点引起的问题基本无解, 即便处理了, 还是会有不适应的情况. 连ListView
滚动时都会获取focus. 所以, 尝试下RecyclerView
, 并调用RecyclerView.setFocusable(false)
.