Improve layout for tablets
This commit is contained in:
parent
3f5a6c5bfa
commit
97459686d4
8 changed files with 26 additions and 5 deletions
|
@ -14,6 +14,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="32dp"
|
||||||
|
android:layout_marginHorizontal="12dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="@dimen/setup_container_width"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="@dimen/setup_container_width"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
|
|
|
@ -31,14 +31,15 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingHorizontal="24dp"
|
android:paddingHorizontal="12dp"
|
||||||
app:collections="@{viewModel.collections}"
|
app:collections="@{viewModel.collections}"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:itemCount="4"
|
tools:itemCount="4"
|
||||||
|
app:spanCount="@integer/collection_colums"
|
||||||
tools:listitem="@layout/collection_item" />
|
tools:listitem="@layout/collection_item" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
app:layout_constraintTop_toBottomOf="@+id/image_banner"
|
app:layout_constraintTop_toBottomOf="@+id/image_banner"
|
||||||
app:layout_constraintVertical_bias="0.36"
|
app:layout_constraintVertical_bias="0.36"
|
||||||
app:servers="@{viewModel.servers}"
|
app:servers="@{viewModel.servers}"
|
||||||
app:spanCount="3"
|
app:spanCount="@integer/server_colums"
|
||||||
tools:itemCount="4"
|
tools:itemCount="4"
|
||||||
tools:listitem="@layout/server_item" />
|
tools:listitem="@layout/server_item" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
6
app/src/main/res/values-sw600dp/dimens.xml
Normal file
6
app/src/main/res/values-sw600dp/dimens.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<dimen name="setup_container_width">400dp</dimen>
|
||||||
|
<item name="server_colums" type="integer">6</item>
|
||||||
|
<item name="collection_colums" type="integer">3</item>
|
||||||
|
</resources>
|
5
app/src/main/res/values-sw720dp/dimens.xml
Normal file
5
app/src/main/res/values-sw720dp/dimens.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<item name="server_colums" type="integer">8</item>
|
||||||
|
<item name="collection_colums" type="integer">4</item>
|
||||||
|
</resources>
|
8
app/src/main/res/values/dimens.xml
Normal file
8
app/src/main/res/values/dimens.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<item name="match_parent" type="dimen">-1</item>
|
||||||
|
<item name="wrap_content" type="dimen">-2</item>
|
||||||
|
<dimen name="setup_container_width">@dimen/match_parent</dimen>
|
||||||
|
<item name="server_colums" type="integer">3</item>
|
||||||
|
<item name="collection_colums" type="integer">1</item>
|
||||||
|
</resources>
|
Loading…
Reference in a new issue