Improve installer & related UI

This commit is contained in:
Rahul Kumar Patel
2021-02-25 08:57:30 +05:30
parent b877552634
commit 0e1ae6364d
34 changed files with 1379 additions and 158 deletions

View File

@@ -131,7 +131,7 @@
android:text="@string/account_login_using"
android:textAlignment="center" />
<com.aurora.store.view.custom.StateButton
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_google"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"
@@ -140,7 +140,7 @@
app:btnStateIcon="@drawable/ic_google"
app:btnStateText="@string/account_google" />
<com.aurora.store.view.custom.StateButton
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_anonymous"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"
@@ -181,7 +181,7 @@
android:text="@string/account_logout"
android:textAlignment="center" />
<com.aurora.store.view.custom.StateButton
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_logout"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"

View File

@@ -89,7 +89,7 @@
android:text="@string/account_login_using"
android:textAlignment="center" />
<com.aurora.store.view.custom.StateButton
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_google"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"
@@ -98,7 +98,7 @@
app:btnStateIcon="@drawable/ic_google"
app:btnStateText="@string/account_google" />
<com.aurora.store.view.custom.StateButton
<com.aurora.store.view.custom.layouts.button.StateButton
android:id="@+id/btn_anonymous"
android:layout_width="@dimen/width_button"
android:layout_height="wrap_content"

View File

@@ -36,9 +36,13 @@
<ViewFlipper
android:id="@+id/view_flipper"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:animateFirstView="true"
android:inAnimation="@anim/fade_in"
android:outAnimation="@anim/fade_out"
tools:ignore="UselessParent">
<com.aurora.store.view.custom.ActionButton
<com.aurora.store.view.custom.layouts.button.ActionButton
android:id="@+id/btn_download"
android:layout_width="match_parent"
android:layout_height="@dimen/height_button"
@@ -113,7 +117,6 @@
</LinearLayout>
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_cancel"
android:layout_width="@dimen/icon_size_small"
@@ -125,7 +128,6 @@
android:padding="@dimen/padding_medium"
app:srcCompat="@drawable/ic_cancel" />
</RelativeLayout>
</ViewFlipper>
<LinearLayout

View File

@@ -0,0 +1,110 @@
<?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="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/divider"
android:orientation="vertical"
android:padding="@dimen/padding_large"
android:showDividers="middle">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_icon"
android:layout_width="@dimen/icon_size_category"
android:layout_height="@dimen/icon_size_category"
android:layout_centerVertical="true"
tools:src="@drawable/bg_circle" />
<TextView
android:id="@+id/txt_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/margin_normal"
android:layout_marginBottom="@dimen/margin_normal"
android:layout_toEndOf="@id/img_icon"
android:maxLines="1"
android:text="@string/title_installer"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />
</RelativeLayout>
<TextView
android:id="@+id/txt_line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="3"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Aurora.Line1"
tools:text="Title" />
<TextView
android:id="@+id/txt_line2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="10"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Aurora.Line2"
android:textColor="@color/colorRed"
tools:text="Error" />
<TextView
android:id="@+id/txt_line3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="10"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Aurora.Line2"
tools:text="Extra" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_secondary"
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog.Flush"
android:layout_width="0dp"
android:layout_height="@dimen/height_button"
android:layout_weight="1"
android:text="@string/action_copy" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_primary"
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog.Flush"
android:layout_width="0dp"
android:layout_height="@dimen/height_button"
android:layout_weight="1"
android:text="@string/action_ok" />
</LinearLayout>
</LinearLayout>

View File

@@ -21,37 +21,59 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="@dimen/height_button">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn"
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
<ViewFlipper
android:id="@+id/view_flipper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:paddingVertical="@dimen/padding_normal"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textAllCaps="true"
android:textAppearance="@style/TextAppearance.Aurora.SubTitle"
android:textColor="@color/colorWhite"
app:iconPadding="@dimen/padding_large"
app:iconTint="?colorAccent"
tools:text="Install" />
android:layout_height="match_parent"
android:animateFirstView="true"
android:inAnimation="@anim/fade_in"
android:outAnimation="@anim/fade_out"
tools:ignore="UselessParent">
<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/progress"
style="?android:attr/progressBarStyle"
android:layout_width="@dimen/icon_size_default"
android:layout_height="@dimen/icon_size_default"
android:layout_alignEnd="@id/btn"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/icon_size_default"
android:elevation="8dp"
android:indeterminateTint="@color/colorWhite"
android:progressTint="@color/colorWhite"
android:visibility="invisible"
tools:visibility="visible" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn"
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog.Flush"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:textAllCaps="true"
android:textAppearance="@style/TextAppearance.Aurora.SubTitle"
app:iconPadding="@dimen/padding_large"
app:iconTint="@color/colorWhite"
tools:text="Install" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.aurora.store.view.custom.progress.AuroraProgressView
android:id="@+id/progress"
android:layout_width="@dimen/icon_size_small"
android:layout_height="@dimen/icon_size_small"
android:layout_centerInParent="true"
tools:indicatorColor="@color/colorAccent" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
app:srcCompat="@drawable/ic_check"
app:tint="@color/colorWhite" />
</RelativeLayout>
</ViewFlipper>
</RelativeLayout>