[Android] Fix onboarding theme icon size
Nicolas Pomepuy
git at videolan.org
Thu Apr 30 09:37:48 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Apr 30 07:48:40 2020 +0200| [deefbb6311a5de9bf8f5be5cb055b6ba95b2b38e] | committer: Nicolas Pomepuy
Fix onboarding theme icon size
Fixes #1298
> https://code.videolan.org/videolan/vlc-android/commit/deefbb6311a5de9bf8f5be5cb055b6ba95b2b38e
---
.../src/main/res/drawable/ic_theme_dark.xml | 4 ++--
.../src/main/res/drawable/ic_theme_daynight.xml | 4 ++--
.../src/main/res/drawable/ic_theme_light.xml | 4 ++--
.../vlc-android/res/layout/onboarding_theme.xml | 24 ++++++++++++++--------
4 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/application/resources/src/main/res/drawable/ic_theme_dark.xml b/application/resources/src/main/res/drawable/ic_theme_dark.xml
index a1f19fb2d..fa8c247ce 100644
--- a/application/resources/src/main/res/drawable/ic_theme_dark.xml
+++ b/application/resources/src/main/res/drawable/ic_theme_dark.xml
@@ -23,8 +23,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="100dp"
- android:height="160dp"
+ android:width="75dp"
+ android:height="120dp"
android:viewportWidth="26.458332"
android:viewportHeight="42.333332">
<path
diff --git a/application/resources/src/main/res/drawable/ic_theme_daynight.xml b/application/resources/src/main/res/drawable/ic_theme_daynight.xml
index 250f43ecc..bda917a82 100644
--- a/application/resources/src/main/res/drawable/ic_theme_daynight.xml
+++ b/application/resources/src/main/res/drawable/ic_theme_daynight.xml
@@ -23,8 +23,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="100dp"
- android:height="160dp"
+ android:width="75dp"
+ android:height="120dp"
android:viewportWidth="26.458332"
android:viewportHeight="42.333332">
<path
diff --git a/application/resources/src/main/res/drawable/ic_theme_light.xml b/application/resources/src/main/res/drawable/ic_theme_light.xml
index a96293ca1..ebac01aa7 100644
--- a/application/resources/src/main/res/drawable/ic_theme_light.xml
+++ b/application/resources/src/main/res/drawable/ic_theme_light.xml
@@ -23,8 +23,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="100dp"
- android:height="160dp"
+ android:width="75dp"
+ android:height="120dp"
android:viewportWidth="26.458332"
android:viewportHeight="42.333332">
<path
diff --git a/application/vlc-android/res/layout/onboarding_theme.xml b/application/vlc-android/res/layout/onboarding_theme.xml
index 6745c6011..0c6bc8805 100644
--- a/application/vlc-android/res/layout/onboarding_theme.xml
+++ b/application/vlc-android/res/layout/onboarding_theme.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- xmlns:tools="http://schemas.android.com/tools"
tools:background="@color/onboarding_grey">
<TextView
@@ -56,10 +56,14 @@
android:id="@+id/dayNightTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="8dp"
android:background="@drawable/theme_selection_rounded"
android:padding="16dp"
app:layout_constraintBottom_toTopOf="@+id/guideline3"
- app:layout_constraintEnd_toStartOf="@+id/guideline2"
+ app:layout_constraintEnd_toStartOf="@+id/lightTheme"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline3">
@@ -67,7 +71,6 @@
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
app:srcCompat="@drawable/ic_theme_daynight" />
</FrameLayout>
@@ -75,17 +78,18 @@
android:id="@+id/lightTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:padding="16dp"
app:layout_constraintBottom_toTopOf="@+id/guideline3"
- app:layout_constraintEnd_toStartOf="@+id/guideline5"
- app:layout_constraintStart_toStartOf="@+id/guideline2"
+ app:layout_constraintEnd_toStartOf="@+id/darkTheme"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/dayNightTheme"
app:layout_constraintTop_toTopOf="@+id/guideline3">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
app:srcCompat="@drawable/ic_theme_light" />
</FrameLayout>
@@ -93,16 +97,18 @@
android:id="@+id/darkTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="16dp"
android:padding="16dp"
app:layout_constraintBottom_toTopOf="@+id/guideline3"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="@+id/guideline5"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/lightTheme"
app:layout_constraintTop_toTopOf="@+id/guideline3">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
app:srcCompat="@drawable/ic_theme_dark" />
</FrameLayout>
@@ -113,8 +119,8 @@
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="24dp"
- android:maxWidth="250dp"
android:background="@drawable/theme_selection_rounded"
+ android:maxWidth="250dp"
android:padding="8dp"
android:text="@string/daynight_legacy_explanation"
android:textAlignment="center"
More information about the Android
mailing list