android - Can not scroll and click item on gridview inside scrollview -
okay guys, have layout this
<scrollview android:id="@+id/scrollviewtree" android:layout_width="match_parent" android:layout_height="wrap_content" > <include android:id="@+id/layoutgallery" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/layout_gallery_obstruction" > </include> </scrollview>
and *layout_gallery_obstruction*
?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" > <textview android:id="@+id/textviewgalleryobs" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbaseline="@+id/buttongalleryobs" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:text="@string/obstruction_title_gallery" /> <button android:id="@+id/buttongalleryobs" android:layout_width="100dp" android:layout_height="35dp" android:layout_marginleft="30dp" android:layout_torightof="@+id/textviewgalleryobs" android:text="@string/obstruction_gallery_add" android:textsize="12sp" /> <gridview android:id="@+id/gridviewgalleryobs" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignleft="@+id/textviewgalleryobs" android:layout_below="@+id/buttongalleryobs" android:columnwidth="90dp" android:gravity="center" android:horizontalspacing="5dp" android:numcolumns="4" android:stretchmode="columnwidth" android:verticalspacing="5dp" > </gridview> </relativelayout>
i using custom adapter gridview , layout cell
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <imagebutton android:id="@+id/imagebutton1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:background="@android:color/transparent" android:contentdescription="@string/app_name" /> </relativelayout>
okay problem is, can't scroll gridview , , can't click item on gridview . know how fix ? in adv . :)
enable gridview property as
android:nestedscrollingenabled="true".
Comments
Post a Comment