forked from upstream-mirrors/quik
Display progress when backing up or restoring
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
~
|
||||
~ This file is part of QKSMS.
|
||||
~
|
||||
~ QKSMS 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 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ QKSMS 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 QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
</vector>
|
||||
@@ -33,8 +33,90 @@
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/progressIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:tint="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="@id/progressSummary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressTitle"
|
||||
tools:src="@drawable/ic_file_download_black_24dp" />
|
||||
|
||||
<com.moez.QKSMS.common.widget.QkTextView
|
||||
android:id="@+id/progressTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/progressCancel"
|
||||
app:layout_constraintStart_toEndOf="@id/progressIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:textSize="primary"
|
||||
tools:text="Restoring from backup" />
|
||||
|
||||
<com.moez.QKSMS.common.widget.QkTextView
|
||||
android:id="@+id/progressSummary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
app:layout_constraintEnd_toEndOf="@id/progressTitle"
|
||||
app:layout_constraintStart_toStartOf="@id/progressTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/progressTitle"
|
||||
app:textSize="secondary"
|
||||
tools:text="8 minutes remaining" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/progressCancel"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_close_black_24dp"
|
||||
android:tint="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="@id/progressSummary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/progressTitle" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/progressTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/progressSummary" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="?android:attr/divider"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/progressBar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.moez.QKSMS.common.widget.PreferenceView
|
||||
android:id="@+id/backup"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -146,6 +146,8 @@
|
||||
<string name="gallery_toast_saved">Saved to gallery</string>
|
||||
|
||||
<string name="backup_title">Backup and restore</string>
|
||||
<string name="backup_backing_up">Backing up messages</string>
|
||||
<string name="backup_restoring">Restoring from backup</string>
|
||||
<string name="backup_last">Last backup</string>
|
||||
<string name="backup_never">Never</string>
|
||||
<string name="backup_restore_title">Restore</string>
|
||||
|
||||
Reference in New Issue
Block a user