Rework App Dialog Buttons

Aligning the buttons to the bottom of the game image was determined to look odd due to the amount of padding between the title and buttons. They are now back to being below the title but the buttons have been resized with "Play" being a wide button while "Pin" has been replaced with Google Material Icons's "Add To Home Screen" icon and sized down to an icon-only button.
This commit is contained in:
PixelyIon 2021-11-11 13:47:20 +05:30
parent 6a0ad25c27
commit 43b9d95dbc
2 changed files with 19 additions and 4 deletions

View File

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M18,1.01L8,1c-1.1,0 -2,0.9 -2,2v3h2V5h10v14H8v-1H6v3c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM10,15h2V8H5v2h3.59L3,15.59 4.41,17 10,11.41z"/>
</vector>

View File

@ -45,12 +45,12 @@
tools:text="Nintendo" /> tools:text="Nintendo" />
<com.google.android.flexbox.FlexboxLayout <com.google.android.flexbox.FlexboxLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="start" android:layout_gravity="start"
android:layout_marginTop="8dp" android:layout_marginTop="12dp"
app:layout_constraintStart_toStartOf="@id/game_title" app:layout_constraintStart_toStartOf="@id/game_title"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@id/game_subtitle"
app:flexWrap="wrap"> app:flexWrap="wrap">
<Button <Button
@ -62,6 +62,7 @@
android:focusedByDefault="true" android:focusedByDefault="true"
android:text="@string/play" android:text="@string/play"
android:textColor="?attr/colorAccent" android:textColor="?attr/colorAccent"
app:layout_minWidth="146dp"
app:icon="@drawable/ic_play" app:icon="@drawable/ic_play"
app:iconTint="?attr/colorAccent" /> app:iconTint="?attr/colorAccent" />
@ -71,7 +72,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:text="@string/pin" app:layout_maxWidth="55dp"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:icon="@drawable/ic_add_home"
android:textColor="?attr/colorAccent" /> android:textColor="?attr/colorAccent" />
</com.google.android.flexbox.FlexboxLayout> </com.google.android.flexbox.FlexboxLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>