Skip to content Skip to sidebar Skip to footer

Gridview Activity Cannot Be Call From Another Activity

This is an update from my previous questions How to call the Gridview Activity from another activity which I added my codes Here is my gallery.xml

Solution 1:

You should add a layout to wrap GridView in gallery.xml,otherwise its width and height will be 0dp.

Solution 2:

Your Gridview will not show up if the images are not available. Please try the same code by using ic_launcher in place of sample images.

Solution 3:

<?xml version="1.0" encoding="utf-8"?><mergexmlns:android="http://schemas.android.com/apk/res/android"><GridViewandroid:id="@+id/gridview"android:layout_width="match_parent"android:layout_height="match_parent"android:columnWidth="90dp"android:numColumns="auto_fit"android:verticalSpacing="10dp"android:horizontalSpacing="10dp"android:stretchMode="columnWidth"android:gravity="center"/></merge>

Post a Comment for "Gridview Activity Cannot Be Call From Another Activity"