因产品的需求,需要在ScrollView中嵌套ListView来达到效果。众所周知,ScrollVIew和ListView都是可滑动的容器,嵌套使用一定会出现一些问题。
[html] view plaincopy
- ; i < listAdapter.getCount(); i++) {
- , 0);
- ));
- ;
- ;
- , -1);
- ;
- ;
- ; listPosition < listAdapter.getCount()
- , 1);
- }
- }
- return false;
- }
- }
参考资料
http://*.com/questions/6210895/listview-inside-scrollview-is-not-scrolling-on-android
http://*.com/questions/3495890/how-can-i-put-a-listview-into-a-scrollview-without-it-collapsing
http://developer.android.com/reference/android/widget/ScrollView.html