Ich habe ein LinearLayout in meiner Android-Anwendung.Android GridView verbirgt meine Tasten
gut funktioniert mit nur zwei Tasten - aber wenn ich die Gridview hinzugefügt, es versteckt sich nun die beiden Buttons - unabhängig davon, ob ich über oder unter dem Gridview
legte sieKann jemand helfen?
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:numColumns="4"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"/>
<Button android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:layout_width="fill_parent"
android:text="@string/week" />
<Button android:layout_weight="1"
android:layout_marginTop="5px"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="@string/day" />
Die Blockzitate halten Abschnitte des XML-Dokuments versteckt. Das obige Xml hat ein Root-Level LinearLayout mit einer auf 'vertical' gesetzten Ausrichtung. – KennetRunner