0
我有gidLayout的問題。我有這個網格:網格佈局要素髮行
這是它的外觀在Android Studio中。但是當我在平板電腦上安裝應用程序時,所有元素都看起來很糟糕。
所有元素都正確放置在他的行和列,但其 背景不碰。像layout_columnWeight和layout_rowWeight沒有作品.. 見200ºC文本元素:
網絡佈局的代碼和XML的所有元素:
<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="12"
android:rowCount="12"
android:background="@color/black"
android:layout_weight="1"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Barra notificacions"
android:id="@+id/textView"
android:layout_row="0"
android:layout_column="0"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
android:gravity="center_vertical|center_horizontal"
android:background="@color/fondoGrid"
android:layout_margin="1dp"
android:layout_gravity="fill_horizontal"
android:layout_columnSpan="7" />
...other textViews
你試過'
kujeensiti
是的,但在這種情況下,所有的元素具有與屏幕的。 – WIngenia