Experimental: Revamp whole onboarding UI

This commit is contained in:
Rahul Patel
2024-07-21 04:14:17 +05:30
parent d30574885f
commit d1eaf290da
6 changed files with 49 additions and 80 deletions

View File

@@ -20,12 +20,9 @@
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@drawable/divider"
android:orientation="horizontal"
android:showDividers="middle"> android:showDividers="middle">
<LinearLayout <LinearLayout
@@ -39,8 +36,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:includeFontPadding="true" android:includeFontPadding="true"
android:paddingStart="@dimen/padding_normal"
android:paddingEnd="@dimen/padding_normal"
android:text="@string/onboarding_title_permissions" android:text="@string/onboarding_title_permissions"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="?colorAccent" android:textColor="?colorAccent"
@@ -50,8 +45,6 @@
style="@style/AuroraTextStyle.Subtitle.Alt" style="@style/AuroraTextStyle.Subtitle.Alt"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/padding_normal"
android:paddingEnd="@dimen/padding_normal"
android:text="@string/onboarding_permission_select" android:text="@string/onboarding_permission_select"
android:textAlignment="textStart" /> android:textAlignment="textStart" />
</LinearLayout> </LinearLayout>
@@ -63,9 +56,7 @@
android:layout_weight="1" android:layout_weight="1"
android:clipToPadding="false" android:clipToPadding="false"
android:overScrollMode="never" android:overScrollMode="never"
android:padding="@dimen/padding_normal" android:padding="@dimen/padding_medium"
android:scrollbars="none" android:scrollbars="none"
app:itemSpacing="@dimen/margin_small" tools:listitem="@layout/view_permission" />
tools:listitem="@layout/view_installer" />
</LinearLayout> </LinearLayout>

View File

@@ -20,13 +20,10 @@
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@drawable/divider" android:orientation="horizontal">
android:orientation="horizontal"
android:showDividers="middle">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -39,8 +36,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:includeFontPadding="true" android:includeFontPadding="true"
android:paddingStart="@dimen/padding_normal"
android:paddingEnd="@dimen/padding_normal"
android:text="@string/onboarding_title_welcome" android:text="@string/onboarding_title_welcome"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="?colorAccent" android:textColor="?colorAccent"
@@ -50,8 +45,6 @@
style="@style/AuroraTextStyle.Subtitle.Alt" style="@style/AuroraTextStyle.Subtitle.Alt"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/padding_normal"
android:paddingEnd="@dimen/padding_normal"
android:text="@string/onboarding_welcome_select" android:text="@string/onboarding_welcome_select"
android:textAlignment="textStart" /> android:textAlignment="textStart" />
@@ -64,8 +57,7 @@
android:layout_weight="1" android:layout_weight="1"
android:clipToPadding="false" android:clipToPadding="false"
android:overScrollMode="never" android:overScrollMode="never"
android:padding="@dimen/padding_normal" android:padding="@dimen/padding_medium"
android:scrollbars="none" android:scrollbars="none"
app:itemSpacing="@dimen/margin_small" tools:listitem="@layout/view_dash" />
tools:listitem="@layout/view_theme" />
</LinearLayout> </LinearLayout>

View File

@@ -10,7 +10,6 @@
android:id="@+id/appCompatTextView2" android:id="@+id/appCompatTextView2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_small"
android:includeFontPadding="true" android:includeFontPadding="true"
android:paddingStart="@dimen/padding_normal" android:paddingStart="@dimen/padding_normal"
android:paddingEnd="@dimen/padding_normal" android:paddingEnd="@dimen/padding_normal"
@@ -45,18 +44,17 @@
app:layout_constraintTop_toBottomOf="@+id/appCompatTextView"> app:layout_constraintTop_toBottomOf="@+id/appCompatTextView">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/padding_medium">
<RelativeLayout <LinearLayout
android:id="@+id/playStoreLayout" android:id="@+id/playStoreLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_normal" android:orientation="vertical"
android:layout_marginVertical="@dimen/margin_small" android:padding="@dimen/padding_small"
android:background="@drawable/bg_outlined_padded"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appCompatTextView"> app:layout_constraintTop_toBottomOf="@+id/appCompatTextView">
@@ -66,40 +64,34 @@
style="@style/AuroraTextStyle.Subtitle" style="@style/AuroraTextStyle.Subtitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toStartOf="@id/playStoreButton"
android:text="@string/app_link_play_store" /> android:text="@string/app_link_play_store" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/playStoreDesc" android:id="@+id/playStoreDesc"
style="@style/AuroraTextStyle.Line1" style="@style/AuroraTextStyle.Line2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/playStoreTitle"
android:layout_alignStart="@id/playStoreTitle"
android:layout_alignEnd="@id/playStoreTitle"
android:layout_marginTop="@dimen/margin_xxsmall"
android:maxLines="5" android:maxLines="5"
android:text="@string/google_play_store_desc" /> android:text="@string/google_play_store_desc" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/playStoreButton" android:id="@+id/playStoreButton"
style="@style/Widget.Material3.Button.TextButton.Dialog.Flush" style="@style/Widget.Material3.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:insetTop="@dimen/margin_small"
android:layout_centerVertical="true" android:insetBottom="@dimen/margin_xsmall"
android:layout_marginStart="@dimen/margin_small" android:text="@string/action_enable"
android:text="@string/action_enable" /> android:textColorHighlight="?colorOnPrimary"
</RelativeLayout> app:cornerRadius="@dimen/margin_small" />
</LinearLayout>
<RelativeLayout <LinearLayout
android:id="@+id/marketLayout" android:id="@+id/marketLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_normal" android:orientation="vertical"
android:layout_marginVertical="@dimen/margin_small" android:padding="@dimen/padding_small"
android:background="@drawable/bg_outlined_padded"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/playStoreLayout"> app:layout_constraintTop_toBottomOf="@+id/playStoreLayout">
@@ -109,31 +101,27 @@
style="@style/AuroraTextStyle.Subtitle" style="@style/AuroraTextStyle.Subtitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toStartOf="@id/marketButton"
android:text="@string/app_link_android_market" /> android:text="@string/app_link_android_market" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/marketDesc" android:id="@+id/marketDesc"
style="@style/AuroraTextStyle.Line1" style="@style/AuroraTextStyle.Line2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/marketTitle"
android:layout_alignStart="@id/marketTitle"
android:layout_alignEnd="@id/marketTitle"
android:layout_marginTop="@dimen/margin_xxsmall"
android:maxLines="5" android:maxLines="5"
android:text="@string/android_market_desc" /> android:text="@string/android_market_desc" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/marketButton" android:id="@+id/marketButton"
style="@style/Widget.Material3.Button.TextButton.Dialog.Flush" style="@style/Widget.Material3.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:insetTop="@dimen/margin_small"
android:layout_centerVertical="true" android:insetBottom="@dimen/margin_xsmall"
android:layout_marginStart="@dimen/margin_small" android:text="@string/action_enable"
android:text="@string/action_enable" /> android:textColorHighlight="?colorOnPrimary"
</RelativeLayout> app:cornerRadius="@dimen/margin_small" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -20,7 +20,6 @@
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -54,9 +53,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipToPadding="false" android:clipToPadding="false"
android:overScrollMode="never" android:overScrollMode="never"
android:padding="@dimen/padding_normal" android:padding="@dimen/padding_medium"
android:scrollbars="none" android:scrollbars="none"
app:itemSpacing="@dimen/margin_small"
tools:listitem="@layout/view_permission" /> tools:listitem="@layout/view_permission" />
</LinearLayout> </LinearLayout>

View File

@@ -54,8 +54,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipToPadding="false" android:clipToPadding="false"
android:overScrollMode="never" android:overScrollMode="never"
android:padding="@dimen/padding_normal" android:padding="@dimen/padding_medium"
android:scrollbars="none" android:scrollbars="none"
app:itemSpacing="@dimen/margin_small" tools:listitem="@layout/view_dash" />
tools:listitem="@layout/view_theme" />
</LinearLayout> </LinearLayout>

View File

@@ -17,37 +17,38 @@
~ ~
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_outlined_padded" android:background="?selectableItemBackground"
android:orientation="horizontal"> android:orientation="vertical"
android:padding="@dimen/padding_small">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/line1" android:id="@+id/line1"
style="@style/AuroraTextStyle.Subtitle" style="@style/AuroraTextStyle.Subtitle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toStartOf="@id/btn_action" /> tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/line2" android:id="@+id/line2"
style="@style/AuroraTextStyle.Line1" style="@style/AuroraTextStyle.Line2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/line1"
android:layout_alignStart="@id/line1"
android:layout_alignEnd="@id/line1"
android:maxLines="5" android:maxLines="5"
android:layout_marginTop="@dimen/margin_xxsmall" /> tools:text="Description" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_action" android:id="@+id/btn_action"
style="@style/Widget.Material3.Button.TextButton.Dialog.Flush" style="@style/Widget.Material3.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:insetTop="@dimen/margin_small"
android:layout_centerVertical="true" android:insetBottom="@dimen/margin_xsmall"
android:layout_marginStart="@dimen/margin_small" android:text="@string/action_grant"
android:text="@string/action_grant" /> android:textColorHighlight="?colorOnPrimary"
</RelativeLayout> app:cornerRadius="@dimen/margin_small" />
</LinearLayout>