mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-27 15:45:30 +03: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
b22ad8035c
commit
bf331abcdc
@ -14,7 +14,7 @@
|
||||
android:layout_height="150dp"
|
||||
android:contentDescription="@string/icon"
|
||||
android:focusable="false"
|
||||
app:shapeAppearanceOverlay="@style/RoundedAppImage"
|
||||
app:shapeAppearance="?attr/shapeAppearanceSmallComponent"
|
||||
tools:src="@drawable/default_icon" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -15,7 +15,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_large"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -9,7 +9,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_large"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -18,7 +18,7 @@
|
||||
android:focusable="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearanceOverlay="@style/RoundedAppImage"
|
||||
app:shapeAppearance="?attr/shapeAppearanceSmallComponent"
|
||||
tools:src="@drawable/default_icon" />
|
||||
|
||||
<TextView
|
||||
|
@ -111,7 +111,7 @@
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_large"
|
||||
app:cardElevation="2dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/sub_text" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="grid_padding">8dp</dimen>
|
||||
<dimen name="corner_radius">8dp</dimen>
|
||||
<dimen name="corner_radius">6dp</dimen>
|
||||
<dimen name="corner_radius_large">12dp</dimen>
|
||||
</resources>
|
||||
|
@ -1,11 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="RoundedAppImage">
|
||||
<style name="ShapeAppearance.App.SmallComponent" parent="ShapeAppearance.MaterialComponents.SmallComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/corner_radius</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.MaterialComponents.MediumComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/corner_radius</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/corner_radius_large</item>
|
||||
<item name="cornerSizeTopRight">@dimen/corner_radius_large</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/corner_radius</item>
|
||||
</style>
|
||||
|
||||
<style name="ChipChoice" parent="Widget.MaterialComponents.Chip.Choice">
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="chipStartPadding">8dp</item>
|
||||
|
@ -15,8 +15,11 @@
|
||||
|
||||
<item name="chipChoiceStyle">@style/ChipChoice</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog</item>
|
||||
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.MaterialComponents.BottomSheetDialog</item>
|
||||
<item name="alertDialogTheme">@style/ThemeOverlay.App.MaterialAlertDialog</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 name="AppTheme" parent="BaseAppTheme">
|
||||
|
Loading…
Reference in New Issue
Block a user