mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 19:51:52 +01:00
Improve design consistency across the app
Game images, buttons and dialogs now have a consistent corner radius, across all game list layouts.
This commit is contained in:
parent
f63fdf26c9
commit
6848e69638
@ -14,7 +14,7 @@
|
|||||||
android:layout_height="150dp"
|
android:layout_height="150dp"
|
||||||
android:contentDescription="@string/icon"
|
android:contentDescription="@string/icon"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
app:shapeAppearanceOverlay="@style/RoundedAppImage"
|
app:shapeAppearance="?attr/shapeAppearanceMediumComponent"
|
||||||
tools:src="@drawable/default_icon" />
|
tools:src="@drawable/default_icon" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
app:cardCornerRadius="16dp"
|
app:cardCornerRadius="@dimen/cornerRadiusMedium"
|
||||||
app:cardElevation="2dp">
|
app:cardElevation="2dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="7.5dp"
|
android:layout_margin="7.5dp"
|
||||||
app:cardCornerRadius="14dp">
|
app:cardCornerRadius="@dimen/cornerRadiusMedium"
|
||||||
|
app:cardElevation="2dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:shapeAppearanceOverlay="@style/RoundedAppImage"
|
app:shapeAppearance="?attr/shapeAppearanceSmallComponent"
|
||||||
tools:src="@drawable/default_icon" />
|
tools:src="@drawable/default_icon" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/card_content_padding">
|
android:padding="@dimen/cornerRadiusMedium">
|
||||||
|
|
||||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||||
android:id="@+id/radio_button"
|
android:id="@+id/radio_button"
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
app:cardCornerRadius="16dp"
|
app:cardCornerRadius="@dimen/cornerRadiusMedium"
|
||||||
app:cardElevation="2dp"
|
app:cardElevation="2dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/sub_text" />
|
app:layout_constraintTop_toBottomOf="@id/sub_text" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="grid_padding">8dp</dimen>
|
<dimen name="grid_padding">8dp</dimen>
|
||||||
<dimen name="onScreenItemHorizontalMargin">10dp</dimen>
|
<dimen name="onScreenItemHorizontalMargin">10dp</dimen>
|
||||||
<dimen name="card_content_padding">12dp</dimen>
|
<dimen name="cornerRadius">6dp</dimen>
|
||||||
<dimen name="corner_radius">8dp</dimen>
|
<dimen name="cornerRadiusMedium">12dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,9 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<style name="ShapeAppearance.App.SmallComponent" parent="ShapeAppearance.MaterialComponents.SmallComponent">
|
||||||
<style name="RoundedAppImage">
|
|
||||||
<item name="cornerFamily">rounded</item>
|
<item name="cornerFamily">rounded</item>
|
||||||
<item name="cornerSize">@dimen/corner_radius</item>
|
<item name="cornerSize">@dimen/cornerRadius</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.MaterialComponents.MediumComponent">
|
||||||
|
<item name="cornerFamily">rounded</item>
|
||||||
|
<item name="cornerSize">@dimen/cornerRadiusMedium</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- android:elevation makes BottomSheetDialog background color brighter than it should be -->
|
||||||
|
<style name="ThemeOverlay.App.BottomSheetDialog" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
|
||||||
|
<item name="bottomSheetStyle">@style/Widget.App.BottomSheet</item>
|
||||||
|
</style>
|
||||||
|
<style name="Widget.App.BottomSheet" parent="Widget.MaterialComponents.BottomSheet.Modal">
|
||||||
|
<item name="android:elevation">@null</item>
|
||||||
|
<item name="shapeAppearanceOverlay">@style/ShapeAppearance.App.BottomSheetDialog</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="ShapeAppearance.App.BottomSheetDialog" parent="">
|
||||||
|
<item name="cornerSizeTopLeft">@dimen/cornerRadiusMedium</item>
|
||||||
|
<item name="cornerSizeTopRight">@dimen/cornerRadiusMedium</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- Workaround for AndroidX Preference as it doesn't use MaterialAlertDialogBuilder -->
|
||||||
|
<style name="ThemeOverlay.App.MaterialAlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
|
||||||
|
<item name="android:dialogCornerRadius">@dimen/cornerRadiusMedium</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ChipChoice.Material">
|
<style name="ChipChoice.Material">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources>
|
||||||
|
|
||||||
<style name="BaseAppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="BaseAppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorOnPrimary">@android:color/white</item>
|
<item name="colorOnPrimary">@android:color/white</item>
|
||||||
@ -14,8 +13,11 @@
|
|||||||
|
|
||||||
<item name="chipChoiceStyle">@style/ChipChoice</item>
|
<item name="chipChoiceStyle">@style/ChipChoice</item>
|
||||||
|
|
||||||
<item name="alertDialogTheme">@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog</item>
|
<item name="alertDialogTheme">@style/ThemeOverlay.App.MaterialAlertDialog</item>
|
||||||
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.MaterialComponents.BottomSheetDialog</item>
|
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.App.BottomSheetDialog</item>
|
||||||
|
|
||||||
|
<item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.App.SmallComponent</item>
|
||||||
|
<item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.App.MediumComponent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme" parent="BaseAppTheme">
|
<style name="AppTheme" parent="BaseAppTheme">
|
||||||
|
Loading…
Reference in New Issue
Block a user