Improve app updates page [1/2]

This commit is contained in:
Rahul Kumar Patel
2021-03-08 00:17:45 +05:30
parent 23ed1bd1a1
commit 527989a393
15 changed files with 526 additions and 202 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="?colorAccent" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="28dp" />
<solid android:color="?colorAccent" />
</shape>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp"/>
<stroke
android:width="1dp"
android:color="@color/colorPrimaryAlt" />
</shape>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="28dp"/>
<stroke
android:width="1dp"
android:color="@color/colorPrimaryAlt" />
</shape>

View File

@@ -41,19 +41,40 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_icon"
<RelativeLayout
android:id="@+id/head_flipper"
android:layout_width="@dimen/icon_size_medium"
android:layout_height="@dimen/icon_size_medium" />
android:layout_height="@dimen/icon_size_medium">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_icon"
android:layout_width="@dimen/icon_size_medium"
android:layout_height="@dimen/icon_size_medium" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_progress_percent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:visibility="gone"
android:background="@drawable/bg_rounded"
android:gravity="center"
android:paddingStart="@dimen/padding_normal"
android:paddingEnd="@dimen/padding_normal"
android:text="0%"
android:textAlignment="center"
android:textSize="12sp"
app:fontFamily="@font/gilroy_extra_bold" />
</RelativeLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_normal"
android:layout_marginEnd="@dimen/margin_normal"
android:layout_toStartOf="@+id/layout_action"
android:layout_toEndOf="@id/img_icon"
android:layout_toStartOf="@+id/headerIndicator"
android:layout_toEndOf="@id/head_flipper"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Aurora.Line1" />
@@ -91,41 +112,32 @@
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Aurora.Line3" />
<LinearLayout
android:id="@+id/layout_action"
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/headerIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/layout_action"
android:layout_toStartOf="@id/layout_action"
android:adjustViewBounds="true"
android:clickable="true"
android:focusable="true"
android:padding="@dimen/margin_small"
app:srcCompat="@drawable/ic_arrow_right"
app:tint="?colorControlNormal" />
<LinearLayout
android:id="@+id/layout_action"
android:layout_width="100dp"
android:layout_height="@dimen/height_button"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="2">
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/headerIndicator"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:clickable="true"
android:focusable="true"
android:padding="@dimen/margin_small"
app:srcCompat="@drawable/ic_arrow_right"
app:tint="?colorControlNormal" />
<View
android:layout_width="1dp"
android:layout_height="@dimen/icon_size_small"
android:layout_marginStart="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_small"
android:background="@drawable/bg_placeholder"
android:backgroundTint="?android:colorControlNormal" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/checkbox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.aurora.store.view.custom.layouts.button.UpdateButton
android:id="@+id/btn_action"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
</com.github.florent37.expansionpanel.ExpansionHeader>

View File

@@ -0,0 +1,78 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ViewFlipper
android:id="@+id/view_flipper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inAnimation="@anim/fade_in"
android:outAnimation="@anim/fade_out"
tools:ignore="UselessParent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/btnPositive"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_update"
android:textAppearance="@style/TextAppearance.Aurora.Line1" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/btnQueued"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:enabled="false"
android:text="@string/download_queued"
android:textAppearance="@style/TextAppearance.Aurora.Line1" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/btnNegative"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_cancel"
android:textAppearance="@style/TextAppearance.Aurora.Line1"
android:textColor="@color/colorRed" />
</RelativeLayout>
</ViewFlipper>
</RelativeLayout>