ViewPager里面放有动态添加的Fragment在里面使用GridView不显示(适配器getView方法不执行)
以下是对适配器添加的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>
求大神指导怎么解决不显示的问题!