baseAdapt getView 重复执行很对遍原因
来源:互联网 发布:nginx伪静态规则写法 编辑:程序博客网 时间:2024/06/15 22:27
<p> </p><p> mViewSwitcher = (ViewSwitcher)v.findViewById(R.id.switcher); mViewSwitcher.setFactory(this);mViewSwitcher.getCurrentView().requestFocus();</p>
@Overridepublic View makeView() { LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mScrollerViewGroup = (InterceptEventCommonViewGroup) inflater.inflate(R.layout.doov_full_mont_by_week_list_view,null, false); mScrollerViewGroup.setOnGestureListener(mMonthGestureDetector); mScrollerViewGroup.setOnScrollerStatusListenner(this);return mScrollerViewGroup;}
ViewSwitch 中添加listView,
设定:
android:layout_width="match_parent"
android:layout_height="match_parent"
镶嵌到 RelativeLayout中 即可解决getView执行多次问题:
doov_full_mont_by_week_list_view.xml
<?xml version="1.0" encoding="UTF-8"?><com.doov.calendar.view.InterceptEventCommonViewGroup xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/month_scroller" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" > <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" > <ListView android:id="@+id/month_current_list" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="@null" android:fadeScrollbars="false" android:fadingEdge="none" android:drawSelectorOnTop="true" /> </RelativeLayout></com.doov.calendar.view.InterceptEventCommonViewGroup>
这样 baseAdapter 中getView的执行次数应该是 getCount();即 listView 的行数。
0 0
- baseAdapt getView 重复执行很对遍原因
- 关于Action重复执行两遍的原因
- 自定义adapter getview()重复执行(超出应执行次数)
- android中ListView多次刷新重复执行getView的解决方法
- android ListView getView方法重复执行的解决办法
- android中ListView多次重复执行getView的问题
- Android中ListView多次刷新重复执行getView的解决方法
- android中ListView多次刷新重复执行getView的解决方法
- Listview对次调用getView方法原因解析以及解决方法
- getview重复调用问题
- Android中ListView的适配器中getView()被重复调用的原因及解决方案.
- 重写ListView的Adapter时,getView()方法没有执行的原因
- listview 不执行getView?
- android中ListView多次刷新多次重复执行getView的问题另解
- 自定义adapter 的getView方法被重复执行了n次的解决方法
- ListView getview()重复被调用
- [Android] ListView中getView的原理+如何在ListView中放置多个item + android中ListView多次刷新多次重复执行getView的问题另解
- android getView方法不执行的一个原因是布局文件中没有给列表显示的位置
- 黑马程序员_Java语言_IO流_
- MS SQL借助临时表处理获取复杂结果
- oracle性能调优
- Unity的安卓上的移动C#脚本
- 递归算法及经典递归例子代码实现
- baseAdapt getView 重复执行很对遍原因
- 黑马程序员—经典题目:兔子问题
- 欢迎使用CSDN-markdown编辑器
- SqlServer bug:sp_replqueuemonitor 在SqlServer 2008(RTM) 执行无结果
- Triangle DP求最大和
- python 统计pvuv 二
- android判断手机SIM状态
- Spark Core源码分析: RDD基础
- EditText 判断有没有获得焦点