ViewPager里面放有动态添加的Fragment在里面使用GridView不显示(适配器getView方法

Android 码拜 8年前 (2016-09-16) 1568次浏览
以下是对适配器添加的log打印如下,其他方法不执行:
08-04 12:46:08.814 12986-12986/? I/tag: 构造函数GridViewAdapter
08-04 12:46:08.814 12986-12986/? I/tag: getCount–6(数据源大小)
08-04 12:46:08.814 12986-12986/? I/tag: getCount–6
08-04 12:46:08.814 12986-12986/? I/tag: getItemId
08-04 12:46:08.827 12986-12986/? I/tag: getItemId
数据源是有数据的,以下是布局的GridView部分代码:
<HorizontalScrollView
android:id=”@+id/HorizontalScrollView”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”>
<LinearLayout
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:orientation=”vertical”>
<intelstd.com.ibms.HomeGridView
android:id=”@+id/home_gridview
android:layout_width=”450dp”
android:layout_height=”80dp”
android:background=”@color/flaxen”
android:numColumns=”6″></intelstd.com.ibms.HomeGridView>
</LinearLayout>
</HorizontalScrollView>
求高手指导怎么解决不显示的问题!
解决方案

5

来来来,把代码发本人,本人帮你解决。1042263316@qq.com

5

写了个demo,拿去,参考参考,不需要写的那么复杂哈!
http://pan.baidu.com/s/1jH9tux4

10

http://blog.csdn.net/qq_34184412/article/details/52176606  小弟的博客 你可以看下

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明ViewPager里面放有动态添加的Fragment在里面使用GridView不显示(适配器getView方法
喜欢 (0)
[1034331897@qq.com]
分享 (0)