compose: Migrate onboarding logic to compose

* Still needs implementation for showing microG installation screen on huawei
* No anonymous mode on huawei
* Needs handling for showing permissions screen via settings

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-11-26 16:06:58 +08:00
parent 41b12cfbd8
commit 709e0ec1ca
42 changed files with 527 additions and 2307 deletions

View File

@@ -1,109 +0,0 @@
<?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/>.
~
-->
<RelativeLayout 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:id="@+id/top_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/bottom_layout"
android:layout_alignParentTop="true"
android:gravity="center"
android:orientation="horizontal">
<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:text="@string/onboarding_title_gsf"
android:textAlignment="textStart"
android:textColor="?colorAccent"
android:textSize="42sp" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AuroraTextStyle.Subtitle.Alt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onboarding_title_gsf_desc"
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:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:padding="@dimen/padding_medium"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/view_dash" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:divider="@drawable/divider"
android:orientation="vertical"
android:paddingStart="@dimen/padding_large"
android:paddingEnd="@dimen/padding_large"
android:showDividers="middle">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/checkbox_agreement"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/padding_large"
android:paddingEnd="@dimen/padding_xxsmall"
android:text="@string/onboarding_gms_agreement" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_microG"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:maxWidth="@dimen/width_button"
android:text="@string/action_install_microG" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="24dp"
android:visibility="invisible" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,81 +0,0 @@
<?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:orientation="vertical"
android:showDividers="middle">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:visibility="gone"
app:navigationIcon="@drawable/ic_arrow_back"
app:title="@string/onboarding_title_permissions" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<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:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="true"
android:text="@string/onboarding_title_permissions"
android:textAlignment="textStart"
android:textColor="?colorAccent"
android:textSize="42sp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/subtitle"
style="@style/AuroraTextStyle.Subtitle.Alt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/onboarding_permission_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_medium"
android:scrollbars="none"
tools:listitem="@layout/view_permission" />
</LinearLayout>
</LinearLayout>

View File

@@ -1,63 +0,0 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<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:text="@string/onboarding_title_welcome"
android:textAlignment="textStart"
android:textColor="?colorAccent"
android:textSize="42sp" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/AuroraTextStyle.Subtitle.Alt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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_medium"
android:scrollbars="none"
tools:listitem="@layout/view_dash" />
</LinearLayout>