0
gidLayoutに問題があります。グリッドレイアウト要素の問題
これは、それはアンドロイドスタジオでどのように見えるかです:私はこのグリッドを持っています。しかし、タブレットにアプリをインストールすると、すべての要素が悪く見えます。
すべての要素は、行と列に正しく配置されますが、背景は接触しません。 layout_columnWeightとlayout_rowWeightが動作しないような... 200℃のテキスト要素を参照してください:あなたはlayout_width=wrap_content
を設定する必要が
<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
を試しましたか?はい、この場合、すべての要素には画面のwithがあります。 – WIngenia