I've got the following layout XML file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <GridView android:id="@+id/main_grid_screen" android:layout_width="fill_parent" android:layout_height="fill_parent" android:numColumns="auto_fit" android:verticalSpacing="30dp" android:horizontalSpacing="10dp" android:columnWidth="90dp" android:stretchMode="columnWidth" android:gravity="center" /> <Button android:id="@+id/clickable_area" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/view_items_area" /> </LinearLayout>
The GridView shows up perfectly fine; however, the Button below it is completely absent. If I place the Button tag above the GridView, it appears. What gives?
I think it is because of the fill_parent attributes. The GridView is most likely taking up the entire screen and blocking your view of the button. You could try wrap_content instead.
with JQuery .html? Why can't I add pointers I can't add html elements dynamically in IE Why can't I change elements from a linq IEnumerable in a for loop? Why can't I see elements in a shared queue from my Perl thread? Why can't I edit elements of IEnumerable? Can I programmatically add a linkbutton to gridview? Why can't I have a literal list slice right after a print in Perl? Why can't I .add a Dictionary(Key, Value) in a foreach? Why can't I add a string containing a script tag to innerHTML in IE Why I can't add a class library project reference to a Silverlight project? Why can't I shrink a transaction log file, even after backup? Why canu2019t I run Xcode debugger highlighting the call stack after a crash/exception? Why can't I modify an object after animating it?