当前位置: 代码迷 >> Android >> android BaseAdapter 适配器中的getview()方法的调用者是哪位高手
  详细解决方案

android BaseAdapter 适配器中的getview()方法的调用者是哪位高手

热度:93   发布时间:2016-05-01 19:18:48.0
android BaseAdapter 适配器中的getview()方法的调用者是谁?

getView是由framework调用的。如果要framework调用getView(),可以尝试用BaseAdapter.notifyDataSetChanged ()方法试试。在家的破电脑,暂不能尝试。GridView 主要是为了快速开方,很多地方要自定义不是很方便。如果要更多的自主操作,可以用下面的形式。<ScrollView>  <LinearLayout android:orientation="vertical">    <LinearLayou android:orientation="horizontal">    </LinearLayout>  </LinearLayout></ScrollView> ----------getView ,只是在childview从屏幕外移到屏幕中的时候会被调用。当你移到倒数第二个childview的时候,实际上肯定是调用了最后一个childview的getView函数。你可以试试在getVIew中加入System.out.println("getView:"+position);

  相关解决方案