From b6ccf6d3cffc9459276a85ee626cedc84fbcd7ee Mon Sep 17 00:00:00 2001 From: Rahul Kumar Patel Date: Tue, 16 Feb 2021 09:15:56 +0530 Subject: [PATCH] Add landscape layout for onboarding page --- app/src/main/AndroidManifest.xml | 3 +- .../store/view/ui/splash/SplashActivity.kt | 7 +- .../main/res/layout-land/activity_splash.xml | 10 +-- .../fragment_onboarding_accent.xml | 84 ++++++++++++++++++ .../fragment_onboarding_installer.xml | 72 ++++++++++++++++ .../layout-land/fragment_onboarding_theme.xml | 85 +++++++++++++++++++ .../fragment_onboarding_welcome.xml | 72 ++++++++++++++++ .../res/layout/fragment_onboarding_accent.xml | 6 +- 8 files changed, 325 insertions(+), 14 deletions(-) create mode 100644 app/src/main/res/layout-land/fragment_onboarding_accent.xml create mode 100644 app/src/main/res/layout-land/fragment_onboarding_installer.xml create mode 100644 app/src/main/res/layout-land/fragment_onboarding_theme.xml create mode 100644 app/src/main/res/layout-land/fragment_onboarding_welcome.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9cbd6969b..8c66a5958 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -65,8 +65,7 @@ tools:targetApi="m"> + android:name=".view.ui.onboarding.OnboardingActivity"> diff --git a/app/src/main/java/com/aurora/store/view/ui/splash/SplashActivity.kt b/app/src/main/java/com/aurora/store/view/ui/splash/SplashActivity.kt index 41872eba9..7eccb4cbf 100644 --- a/app/src/main/java/com/aurora/store/view/ui/splash/SplashActivity.kt +++ b/app/src/main/java/com/aurora/store/view/ui/splash/SplashActivity.kt @@ -22,15 +22,16 @@ package com.aurora.store.view.ui.splash import android.os.Bundle import android.view.Menu import android.view.MenuItem -import android.view.View import androidx.lifecycle.ViewModelProvider import com.aurora.store.MainActivity import com.aurora.store.R import com.aurora.store.data.AuthState import com.aurora.store.data.event.BusEvent import com.aurora.store.databinding.ActivitySplashBinding +import com.aurora.store.util.extensions.hide import com.aurora.store.util.extensions.load import com.aurora.store.util.extensions.open +import com.aurora.store.util.extensions.show import com.aurora.store.view.ui.commons.BaseActivity import com.aurora.store.view.ui.commons.BlacklistActivity import com.aurora.store.view.ui.spoof.SpoofActivity @@ -175,9 +176,9 @@ class SplashActivity : BaseActivity() { private fun updateActionLayout(isVisible: Boolean) { if (isVisible) { - B.layoutAction.visibility = View.VISIBLE + B.layoutAction.show() } else { - B.layoutAction.visibility = View.INVISIBLE + B.layoutAction.hide() } } diff --git a/app/src/main/res/layout-land/activity_splash.xml b/app/src/main/res/layout-land/activity_splash.xml index 226f3b328..9a32333c9 100644 --- a/app/src/main/res/layout-land/activity_splash.xml +++ b/app/src/main/res/layout-land/activity_splash.xml @@ -40,7 +40,7 @@ @@ -48,7 +48,8 @@ android:id="@+id/img_icon" android:layout_width="@dimen/icon_size_avatar" android:layout_height="@dimen/icon_size_avatar" - android:layout_centerInParent="true" + android:layout_above="@id/txt_title" + android:layout_centerHorizontal="true" android:minWidth="176dp" app:srcCompat="@drawable/bg_placeholder" /> @@ -57,8 +58,7 @@ style="@style/TextAppearance.Aurora.Title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/img_icon" - android:layout_centerHorizontal="true" + android:layout_centerInParent="true" android:layout_marginTop="@dimen/margin_normal" android:layout_marginBottom="@dimen/margin_xsmall" android:text="@string/app_name" @@ -77,7 +77,7 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_onboarding_installer.xml b/app/src/main/res/layout-land/fragment_onboarding_installer.xml new file mode 100644 index 000000000..ce1a18788 --- /dev/null +++ b/app/src/main/res/layout-land/fragment_onboarding_installer.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_onboarding_theme.xml b/app/src/main/res/layout-land/fragment_onboarding_theme.xml new file mode 100644 index 000000000..851eba898 --- /dev/null +++ b/app/src/main/res/layout-land/fragment_onboarding_theme.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_onboarding_welcome.xml b/app/src/main/res/layout-land/fragment_onboarding_welcome.xml new file mode 100644 index 000000000..f6ce91dd6 --- /dev/null +++ b/app/src/main/res/layout-land/fragment_onboarding_welcome.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_onboarding_accent.xml b/app/src/main/res/layout/fragment_onboarding_accent.xml index 7687bd122..86934a464 100644 --- a/app/src/main/res/layout/fragment_onboarding_accent.xml +++ b/app/src/main/res/layout/fragment_onboarding_accent.xml @@ -23,14 +23,12 @@ 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:divider="@drawable/divider" - android:orientation="vertical" - android:showDividers="middle"> + android:layout_height="match_parent">