Add landscape layout for onboarding page
This commit is contained in:
@@ -65,8 +65,7 @@
|
|||||||
tools:targetApi="m">
|
tools:targetApi="m">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".view.ui.onboarding.OnboardingActivity"
|
android:name=".view.ui.onboarding.OnboardingActivity">
|
||||||
android:screenOrientation="portrait">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
|||||||
@@ -22,15 +22,16 @@ package com.aurora.store.view.ui.splash
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import com.aurora.store.MainActivity
|
import com.aurora.store.MainActivity
|
||||||
import com.aurora.store.R
|
import com.aurora.store.R
|
||||||
import com.aurora.store.data.AuthState
|
import com.aurora.store.data.AuthState
|
||||||
import com.aurora.store.data.event.BusEvent
|
import com.aurora.store.data.event.BusEvent
|
||||||
import com.aurora.store.databinding.ActivitySplashBinding
|
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.load
|
||||||
import com.aurora.store.util.extensions.open
|
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.BaseActivity
|
||||||
import com.aurora.store.view.ui.commons.BlacklistActivity
|
import com.aurora.store.view.ui.commons.BlacklistActivity
|
||||||
import com.aurora.store.view.ui.spoof.SpoofActivity
|
import com.aurora.store.view.ui.spoof.SpoofActivity
|
||||||
@@ -175,9 +176,9 @@ class SplashActivity : BaseActivity() {
|
|||||||
|
|
||||||
private fun updateActionLayout(isVisible: Boolean) {
|
private fun updateActionLayout(isVisible: Boolean) {
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
B.layoutAction.visibility = View.VISIBLE
|
B.layoutAction.show()
|
||||||
} else {
|
} else {
|
||||||
B.layoutAction.visibility = View.INVISIBLE
|
B.layoutAction.hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/layout_top"
|
android:id="@+id/layout_top"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
@@ -48,7 +48,8 @@
|
|||||||
android:id="@+id/img_icon"
|
android:id="@+id/img_icon"
|
||||||
android:layout_width="@dimen/icon_size_avatar"
|
android:layout_width="@dimen/icon_size_avatar"
|
||||||
android:layout_height="@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"
|
android:minWidth="176dp"
|
||||||
app:srcCompat="@drawable/bg_placeholder" />
|
app:srcCompat="@drawable/bg_placeholder" />
|
||||||
|
|
||||||
@@ -57,8 +58,7 @@
|
|||||||
style="@style/TextAppearance.Aurora.Title"
|
style="@style/TextAppearance.Aurora.Title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/img_icon"
|
android:layout_centerInParent="true"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginTop="@dimen/margin_normal"
|
android:layout_marginTop="@dimen/margin_normal"
|
||||||
android:layout_marginBottom="@dimen/margin_xsmall"
|
android:layout_marginBottom="@dimen/margin_xsmall"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/layout_action"
|
android:id="@+id/layout_action"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|||||||
84
app/src/main/res/layout-land/fragment_onboarding_accent.xml
Normal file
84
app/src/main/res/layout-land/fragment_onboarding_accent.xml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Aurora Store
|
||||||
|
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
||||||
|
~
|
||||||
|
~ Aurora Store is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 2 of the License, or
|
||||||
|
~ (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ Aurora Store is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
~
|
||||||
|
-->
|
||||||
|
|
||||||
|
<FrameLayout 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">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:divider="@drawable/divider"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:showDividers="middle"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:includeFontPadding="true"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_title_accent"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="?colorAccent"
|
||||||
|
android:textSize="42sp"
|
||||||
|
app:fontFamily="@font/montserrat_regular" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AuroraTextStyle.Subtitle.Alt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_theme_select"
|
||||||
|
android:textAlignment="textStart" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.airbnb.epoxy.EpoxyRecyclerView
|
||||||
|
android:id="@+id/epoxy_recycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:padding="@dimen/padding_normal"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:itemSpacing="@dimen/margin_small"
|
||||||
|
tools:listitem="@layout/view_theme" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/theme_switch_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:translationZ="15dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</FrameLayout>
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Aurora Store
|
||||||
|
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
||||||
|
~
|
||||||
|
~ Aurora Store is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 2 of the License, or
|
||||||
|
~ (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ Aurora Store is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
~
|
||||||
|
-->
|
||||||
|
|
||||||
|
<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_height="match_parent"
|
||||||
|
android:divider="@drawable/divider"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:showDividers="middle">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:includeFontPadding="true"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_title_installer"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="?colorAccent"
|
||||||
|
android:textSize="42sp"
|
||||||
|
app:fontFamily="@font/montserrat_regular" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AuroraTextStyle.Subtitle.Alt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_installer_select"
|
||||||
|
android:textAlignment="textStart" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.airbnb.epoxy.EpoxyRecyclerView
|
||||||
|
android:id="@+id/epoxy_recycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:padding="@dimen/padding_normal"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:itemSpacing="@dimen/margin_small"
|
||||||
|
tools:listitem="@layout/view_installer" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
85
app/src/main/res/layout-land/fragment_onboarding_theme.xml
Normal file
85
app/src/main/res/layout-land/fragment_onboarding_theme.xml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Aurora Store
|
||||||
|
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
||||||
|
~
|
||||||
|
~ Aurora Store is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 2 of the License, or
|
||||||
|
~ (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ Aurora Store is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
~
|
||||||
|
-->
|
||||||
|
|
||||||
|
<FrameLayout 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">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:divider="@drawable/divider"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:showDividers="middle"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:includeFontPadding="true"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_title_theme"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="?colorAccent"
|
||||||
|
android:textSize="42sp"
|
||||||
|
app:fontFamily="@font/montserrat_regular" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AuroraTextStyle.Subtitle.Alt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_theme_select"
|
||||||
|
android:textAlignment="textStart" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.airbnb.epoxy.EpoxyRecyclerView
|
||||||
|
android:id="@+id/epoxy_recycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:padding="@dimen/padding_normal"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:itemSpacing="@dimen/margin_small"
|
||||||
|
tools:listitem="@layout/view_theme" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/theme_switch_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:translationZ="15dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</FrameLayout>
|
||||||
72
app/src/main/res/layout-land/fragment_onboarding_welcome.xml
Normal file
72
app/src/main/res/layout-land/fragment_onboarding_welcome.xml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Aurora Store
|
||||||
|
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
||||||
|
~
|
||||||
|
~ Aurora Store is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation, either version 2 of the License, or
|
||||||
|
~ (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ Aurora Store is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
~
|
||||||
|
-->
|
||||||
|
|
||||||
|
<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_height="match_parent"
|
||||||
|
android:divider="@drawable/divider"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:showDividers="middle">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:includeFontPadding="true"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_title_welcome"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="?colorAccent"
|
||||||
|
android:textSize="42sp"
|
||||||
|
app:fontFamily="@font/montserrat_regular" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AuroraTextStyle.Subtitle.Alt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/padding_normal"
|
||||||
|
android:paddingEnd="@dimen/padding_normal"
|
||||||
|
android:text="@string/onboarding_welcome_select"
|
||||||
|
android:textAlignment="textStart" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.airbnb.epoxy.EpoxyRecyclerView
|
||||||
|
android:id="@+id/epoxy_recycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:padding="@dimen/padding_normal"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:itemSpacing="@dimen/margin_small"
|
||||||
|
tools:listitem="@layout/view_theme" />
|
||||||
|
</LinearLayout>
|
||||||
@@ -23,14 +23,12 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
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="vertical"
|
|
||||||
android:showDividers="middle">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
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="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
|||||||
Reference in New Issue
Block a user