Merge pull request #402 from BadDaemon/android12-redesign
Seedvault: Redesign SUW activities for 12
diff --git a/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreProgressFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreProgressFragment.kt
index 5c24f8b..17bf9fc 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreProgressFragment.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreProgressFragment.kt
@@ -11,9 +11,7 @@
import androidx.appcompat.app.AlertDialog
import androidx.core.content.ContextCompat.getColor
import androidx.fragment.app.Fragment
-import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
-import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
import androidx.recyclerview.widget.RecyclerView
import com.stevesoltys.seedvault.R
import com.stevesoltys.seedvault.ui.AppBackupState.FAILED_NOT_INSTALLED
@@ -54,7 +52,6 @@
appList.apply {
layoutManager = this@RestoreProgressFragment.layoutManager
adapter = this@RestoreProgressFragment.adapter
- addItemDecoration(DividerItemDecoration(context, VERTICAL))
}
button.setText(R.string.restore_finished_button)
diff --git a/app/src/main/java/com/stevesoltys/seedvault/restore/install/InstallProgressFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/restore/install/InstallProgressFragment.kt
index 5063385..0bdfc50 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/restore/install/InstallProgressFragment.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/restore/install/InstallProgressFragment.kt
@@ -15,9 +15,7 @@
import androidx.activity.result.contract.ActivityResultContract
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
-import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
-import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
import androidx.recyclerview.widget.RecyclerView
import com.stevesoltys.seedvault.R
import com.stevesoltys.seedvault.restore.RestoreViewModel
@@ -58,7 +56,6 @@
appList.apply {
layoutManager = this@InstallProgressFragment.layoutManager
adapter = this@InstallProgressFragment.adapter
- addItemDecoration(DividerItemDecoration(context, VERTICAL))
}
button.setText(R.string.restore_next)
button.setOnClickListener { viewModel.onNextClickedAfterInstallingApps() }
diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt
index a1e3eb6..6214633 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt
@@ -44,7 +44,6 @@
private lateinit var titleView: TextView
private lateinit var warningIcon: ImageView
private lateinit var warningText: TextView
- private lateinit var divider: View
private lateinit var listView: RecyclerView
private lateinit var progressBar: ProgressBar
private lateinit var skipView: TextView
@@ -61,7 +60,6 @@
titleView = v.findViewById(R.id.titleView)
warningIcon = v.findViewById(R.id.warningIcon)
warningText = v.findViewById(R.id.warningText)
- divider = v.findViewById(R.id.divider)
listView = v.findViewById(R.id.listView)
progressBar = v.findViewById(R.id.progressBar)
skipView = v.findViewById(R.id.skipView)
@@ -93,7 +91,6 @@
warningText.setText(R.string.storage_fragment_warning_delete)
}
warningText.visibility = VISIBLE
- divider.visibility = VISIBLE
}
listView.adapter = adapter
diff --git a/app/src/main/res/layout/footer_snapshots.xml b/app/src/main/res/layout/footer_snapshots.xml
index d6c75b3..0dda3f3 100644
--- a/app/src/main/res/layout/footer_snapshots.xml
+++ b/app/src/main/res/layout/footer_snapshots.xml
@@ -6,12 +6,12 @@
<TextView
android:id="@+id/skipView"
+ style="@style/SudSecondaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="40dp"
android:background="?android:selectableItemBackground"
- android:padding="16dp"
android:text="@string/restore_storage_skip"
- android:textColor="?android:colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
diff --git a/app/src/main/res/layout/fragment_recovery_code_input.xml b/app/src/main/res/layout/fragment_recovery_code_input.xml
index 10f51f5..add2f19 100644
--- a/app/src/main/res/layout/fragment_recovery_code_input.xml
+++ b/app/src/main/res/layout/fragment_recovery_code_input.xml
@@ -60,29 +60,24 @@
<Button
android:id="@+id/doneButton"
- style="@style/ActionPrimaryButton"
+ style="@style/SudPrimaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginEnd="8dp"
- android:layout_marginBottom="8dp"
+ android:layout_marginEnd="40dp"
android:text="@string/recovery_code_done_button"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/newCodeButton"
- app:layout_constraintStart_toStartOf="parent" />
+ app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/newCodeButton"
- style="@style/Widget.AppCompat.Button.Borderless"
+ style="@style/SudSecondaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginEnd="8dp"
- android:layout_marginBottom="8dp"
+ android:layout_marginStart="40dp"
android:text="@string/recovery_code_verification_generate_new"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/doneButton"
+ app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/layout/fragment_recovery_code_output.xml b/app/src/main/res/layout/fragment_recovery_code_output.xml
index effa6ef..5384d18 100644
--- a/app/src/main/res/layout/fragment_recovery_code_output.xml
+++ b/app/src/main/res/layout/fragment_recovery_code_output.xml
@@ -71,16 +71,12 @@
<Button
android:id="@+id/confirmCodeButton"
- style="@style/ActionPrimaryButton"
+ style="@style/SudPrimaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginEnd="8dp"
- android:layout_marginBottom="8dp"
android:text="@string/recovery_code_confirm_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/wordList" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/layout/fragment_restore_files_started.xml b/app/src/main/res/layout/fragment_restore_files_started.xml
index df39a4a..07c1003 100644
--- a/app/src/main/res/layout/fragment_restore_files_started.xml
+++ b/app/src/main/res/layout/fragment_restore_files_started.xml
@@ -7,10 +7,7 @@
<ImageView
android:id="@+id/imageView"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="16dp"
- app:layout_constraintEnd_toEndOf="parent"
+ style="@style/SudHeaderIcon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_cloud_restore"
@@ -19,21 +16,19 @@
<TextView
android:id="@+id/titleView"
+ style="@style/SudHeaderTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:gravity="center"
android:text="@string/restore_storage_in_progress_title"
- android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<TextView
android:id="@+id/infoView"
+ style="@style/SudContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
android:text="@string/restore_storage_in_progress_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -41,15 +36,13 @@
<Button
android:id="@+id/button"
- style="@style/Widget.AppCompat.Button.Colored"
+ style="@style/SudPrimaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
+ android:layout_marginEnd="40dp"
android:text="@string/restore_storage_got_it"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="1.0"
- app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoView"
app:layout_constraintVertical_bias="1.0" />
diff --git a/app/src/main/res/layout/fragment_restore_progress.xml b/app/src/main/res/layout/fragment_restore_progress.xml
index 96d717c..d283378 100644
--- a/app/src/main/res/layout/fragment_restore_progress.xml
+++ b/app/src/main/res/layout/fragment_restore_progress.xml
@@ -5,61 +5,60 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <ProgressBar
- android:id="@+id/progressBar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="0dp"
- android:layout_height="4dp"
- android:indeterminate="false"
- android:padding="0dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- tools:max="23"
- tools:progress="5" />
-
<ImageView
android:id="@+id/imageView"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="16dp"
- app:layout_constraintEnd_toEndOf="parent"
+ style="@style/SudHeaderIcon"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/progressBar"
+ app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_cloud_download"
app:tint="?android:colorAccent"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/titleView"
- android:layout_width="wrap_content"
+ style="@style/SudHeaderTitle"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
android:text="@string/restore_installing_packages"
android:textColor="?android:textColorSecondary"
- android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
+ <ProgressBar
+ android:id="@+id/progressBar"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="0dp"
+ android:layout_height="4dp"
+ android:layout_marginStart="40dp"
+ android:layout_marginEnd="40dp"
+ android:indeterminate="false"
+ app:layout_constraintBottom_toTopOf="@+id/appList"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/backupNameView"
+ tools:max="23"
+ tools:progress="5" />
+
<TextView
android:id="@+id/backupNameView"
+ style="@style/SudDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
android:textColor="?android:textColorTertiary"
- android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleView"
tools:text="Pixel 2 XL" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/appList"
+ style="@style/SudContent"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_marginTop="16dp"
- android:layout_marginBottom="16dp"
+ android:layout_marginStart="0dp"
+ android:layout_marginEnd="0dp"
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -68,17 +67,14 @@
<Button
android:id="@+id/button"
- style="@style/ActionPrimaryButton"
+ style="@style/SudPrimaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp"
- android:layout_marginBottom="16dp"
+ android:layout_marginEnd="40dp"
android:enabled="false"
android:text="@string/restore_next"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="1.0"
- app:layout_constraintStart_toStartOf="parent" />
+ app:layout_constraintTop_toBottomOf="@+id/appList" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/layout/fragment_restore_set.xml b/app/src/main/res/layout/fragment_restore_set.xml
index 4fa5f92..e62fa0d 100644
--- a/app/src/main/res/layout/fragment_restore_set.xml
+++ b/app/src/main/res/layout/fragment_restore_set.xml
@@ -7,10 +7,7 @@
<ImageView
android:id="@+id/imageView"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="16dp"
- app:layout_constraintEnd_toEndOf="parent"
+ style="@style/SudHeaderIcon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_cloud_download"
@@ -19,22 +16,21 @@
<TextView
android:id="@+id/titleView"
- android:layout_width="wrap_content"
+ style="@style/SudHeaderTitle"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
android:text="@string/restore_choose_restore_set"
- android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listView"
+ style="@style/SudContent"
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginStart="0dp"
+ android:layout_marginEnd="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/skipView"
app:layout_constraintEnd_toEndOf="parent"
@@ -54,9 +50,9 @@
<TextView
android:id="@+id/errorView"
+ style="@style/SudContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
android:textColor="?android:colorError"
android:textSize="18sp"
android:visibility="invisible"
@@ -69,15 +65,13 @@
<TextView
android:id="@+id/skipView"
+ style="@style/SudSecondaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:selectableItemBackground"
- android:padding="16dp"
+ android:layout_marginStart="40dp"
android:text="@string/restore_skip_apps"
- android:textColor="?android:colorAccent"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/listView" />
diff --git a/app/src/main/res/layout/fragment_storage_check.xml b/app/src/main/res/layout/fragment_storage_check.xml
index 22c1185..cae192d 100644
--- a/app/src/main/res/layout/fragment_storage_check.xml
+++ b/app/src/main/res/layout/fragment_storage_check.xml
@@ -7,10 +7,7 @@
<ImageView
android:id="@+id/imageView"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="16dp"
- app:layout_constraintEnd_toEndOf="parent"
+ style="@style/SudHeaderIcon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_storage"
@@ -19,11 +16,9 @@
<TextView
android:id="@+id/titleView"
+ style="@style/SudHeaderTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:gravity="center_horizontal"
- android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
@@ -31,10 +26,9 @@
<TextView
android:id="@+id/patienceView"
+ style="@style/SudContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:gravity="center_horizontal"
android:text="@string/storage_check_fragment_patience"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -45,9 +39,9 @@
style="?android:progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
+ android:layout_marginStart="40dp"
android:layout_marginTop="32dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginEnd="40dp"
app:layout_constraintBottom_toTopOf="@+id/backButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -56,11 +50,9 @@
<TextView
android:id="@+id/errorView"
+ style="@style/SudContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginTop="32dp"
- android:layout_marginEnd="16dp"
android:textColor="?android:colorError"
android:textSize="18sp"
android:visibility="invisible"
@@ -74,10 +66,10 @@
<Button
android:id="@+id/backButton"
- style="@style/ActionPrimaryButton"
+ style="@style/SudSecondaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
+ android:layout_marginStart="40dp"
android:text="@string/storage_check_fragment_error_button"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
diff --git a/app/src/main/res/layout/fragment_storage_root.xml b/app/src/main/res/layout/fragment_storage_root.xml
index e03dbde..df5b0ac 100644
--- a/app/src/main/res/layout/fragment_storage_root.xml
+++ b/app/src/main/res/layout/fragment_storage_root.xml
@@ -7,10 +7,7 @@
<ImageView
android:id="@+id/imageView"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="16dp"
- app:layout_constraintEnd_toEndOf="parent"
+ style="@style/SudHeaderIcon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_storage"
@@ -19,12 +16,10 @@
<TextView
android:id="@+id/titleView"
+ style="@style/SudHeaderTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:gravity="center"
android:text="@string/storage_fragment_backup_title"
- android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
@@ -34,7 +29,7 @@
android:id="@+id/warningIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
+ android:layout_marginStart="40dp"
android:src="@drawable/ic_warning"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/warningText"
@@ -49,7 +44,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginEnd="40dp"
android:text="@string/storage_fragment_warning"
android:textSize="16sp"
android:visibility="gone"
@@ -58,27 +53,16 @@
app:layout_constraintTop_toBottomOf="@+id/titleView"
tools:visibility="visible" />
- <View
- android:id="@+id/divider"
- android:layout_width="0dp"
- android:layout_height="1dp"
- android:layout_marginTop="16dp"
- android:background="@color/divider"
- android:visibility="gone"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/warningText"
- tools:visibility="visible" />
-
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listView"
+ style="@style/SudContent"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/skipView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/divider"
+ app:layout_constraintTop_toBottomOf="@+id/warningText"
app:layout_goneMarginTop="16dp"
tools:listitem="@layout/list_item_storage_root" />
@@ -94,16 +78,15 @@
<TextView
android:id="@+id/skipView"
+ style="@style/SudSecondaryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="40dp"
android:background="?android:selectableItemBackground"
- android:padding="16dp"
android:text="@string/restore_skip"
android:textColor="?android:colorAccent"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/listView"
tools:visibility="visible" />
diff --git a/app/src/main/res/layout/header_snapshots.xml b/app/src/main/res/layout/header_snapshots.xml
index fb712f2..42a79f7 100644
--- a/app/src/main/res/layout/header_snapshots.xml
+++ b/app/src/main/res/layout/header_snapshots.xml
@@ -7,10 +7,7 @@
<ImageView
android:id="@+id/imageView"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_margin="16dp"
- app:layout_constraintEnd_toEndOf="parent"
+ style="@style/SudHeaderIcon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_cloud_download"
@@ -19,12 +16,10 @@
<TextView
android:id="@+id/titleView"
+ style="@style/SudHeaderTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:gravity="center"
android:text="@string/restore_storage_choose_snapshot"
- android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/app/src/main/res/layout/list_item_app_section_title.xml b/app/src/main/res/layout/list_item_app_section_title.xml
index c988c31..26b41d4 100644
--- a/app/src/main/res/layout/list_item_app_section_title.xml
+++ b/app/src/main/res/layout/list_item_app_section_title.xml
@@ -3,6 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="40dp"
+ android:paddingEnd="40dp"
android:textColor="?android:textColorPrimary"
tools:text="@string/backup_section_not_allowed" />
diff --git a/app/src/main/res/layout/list_item_app_status.xml b/app/src/main/res/layout/list_item_app_status.xml
index 67e906c..434e508 100644
--- a/app/src/main/res/layout/list_item_app_status.xml
+++ b/app/src/main/res/layout/list_item_app_status.xml
@@ -5,9 +5,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:selectableItemBackground"
- android:paddingStart="16dp"
+ android:layout_marginStart="40dp"
+ android:layout_marginEnd="40dp"
android:paddingTop="8dp"
- android:paddingEnd="16dp"
android:paddingBottom="8dp">
<ImageView
diff --git a/app/src/main/res/layout/list_item_restore_set.xml b/app/src/main/res/layout/list_item_restore_set.xml
index a05234a..748ec0e 100644
--- a/app/src/main/res/layout/list_item_restore_set.xml
+++ b/app/src/main/res/layout/list_item_restore_set.xml
@@ -4,6 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="40dp"
+ android:layout_marginEnd="40dp"
android:background="?android:selectableItemBackground"
tools:showIn="@layout/fragment_restore_set">
@@ -11,7 +13,6 @@
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
diff --git a/app/src/main/res/layout/list_item_storage_root.xml b/app/src/main/res/layout/list_item_storage_root.xml
index 24f2a77..a0bbe45 100644
--- a/app/src/main/res/layout/list_item_storage_root.xml
+++ b/app/src/main/res/layout/list_item_storage_root.xml
@@ -10,7 +10,6 @@
android:id="@+id/iconView"
android:layout_width="32dp"
android:layout_height="32dp"
- android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
@@ -25,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginEnd="40dp"
android:textColor="?android:attr/textColorPrimary"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/summaryView"
@@ -41,7 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginEnd="40dp"
android:layout_marginBottom="16dp"
android:textColor="?android:attr/textColorTertiary"
android:textSize="12sp"
diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml
index 7bb73bd..d175daa 100644
--- a/app/src/main/res/values-night/colors.xml
+++ b/app/src/main/res/values-night/colors.xml
@@ -2,7 +2,7 @@
<resources>
<color name="accent">@*android:color/accent_device_default_dark</color>
<color name="primary">@*android:color/primary_device_default_settings</color>
- <color name="primaryDark">@*android:color/primary_dark_device_default_settings</color>
+ <color name="primaryDark">@android:color/black</color>
<color name="background">@color/primaryDark</color>
<color name="actionBarPrimary">@color/background</color>
<color name="statusBarColor">@android:color/transparent</color>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 9525e4e..cc089a8 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -5,7 +5,7 @@
<color name="primaryDark">@*android:color/primary_dark_device_default_settings_light</color>
<color name="background">@*android:color/background_device_default_light</color>
<color name="actionBarPrimary">@*android:color/primary_device_default_light</color>
- <color name="statusBarColor">@*android:color/primary_dark_material_light_light_status_bar
+ <color name="statusBarColor">@*android:color/primary_device_default_settings_light
</color>
<color name="red">@*android:color/error_color_device_default_dark</color>
<color name="divider">#20ffffff</color>
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 169dde2..b69809f 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -11,7 +11,8 @@
<item name="android:windowLightStatusBar">@bool/isLight</item>
<item name="android:statusBarColor">@color/statusBarColor</item>
<item name="actionBarTheme">@style/Theme.ActionBar</item>
- <item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:windowLightNavigationBar">@bool/isLight</item>
+ <item name="android:navigationBarColor">@color/primary</item>
</style>
<style name="Theme.ActionBar" parent="Theme.AppCompat.DayNight.DarkActionBar">
@@ -26,4 +27,84 @@
<!-- Copied from Settings -->
<style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored" />
+ <style name="SudHeaderTitle">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">3</item>
+ <item name="android:textSize">36sp</item>
+ <item name="android:layout_marginBottom">16dp</item>
+ <item name="android:layout_marginLeft">40dp</item>
+ <item name="android:layout_marginRight">40dp</item>
+ <item name="android:lineSpacingExtra">3.67sp</item>
+ <item name="android:paddingBottom">2dp</item>
+ <item name="android:paddingTop">16dp</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ </style>
+
+ <style name="SudIconContainer">
+ <item name="android:layout_marginLeft">40dp</item>
+ <item name="android:layout_marginRight">40dp</item>
+ <item name="android:layout_marginTop">56dp</item>
+ <item name="android:maxHeight">32dp</item>
+ </style>
+
+ <style name="SudHeaderIcon">
+ <item name="android:layout_marginLeft">40dp</item>
+ <item name="android:layout_marginRight">40dp</item>
+ <item name="android:layout_marginTop">32dp</item>
+ <item name="android:layout_width">48dp</item>
+ <item name="android:layout_height">48dp</item>
+ <item name="android:scaleType">fitCenter</item>
+ <item name="android:adjustViewBounds">true</item>
+ </style>
+
+ <style name="SudDescription">
+ <item name="android:layout_gravity">top</item>
+ <item name="android:layout_marginTop">3dp</item>
+ <item name="android:layout_marginBottom">12dp</item>
+ <item name="android:layout_marginLeft">40dp</item>
+ <item name="android:layout_marginStart">40dp</item>
+ <item name="android:layout_marginRight">40dp</item>
+ <item name="android:layout_marginEnd">40dp</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textDirection">locale</item>
+ <item name="android:gravity">start</item>
+ <item name="android:textAlignment">gravity</item>
+ <item name="android:lineSpacingExtra">3.67sp</item>
+ </style>
+
+ <style name="SudContent" parent="SudDescription">
+ <item name="android:layout_marginTop">32dp</item>
+ <item name="android:layout_marginBottom">6dp</item>
+ <item name="android:layout_marginStart">40dp</item>
+ <item name="android:layout_marginEnd">40dp</item>
+ <item name="android:gravity">start</item>
+ <item name="android:textAlignment">gravity</item>
+ </style>
+
+ <style name="SudPrimaryButton" parent="Widget.AppCompat.Button.Colored">
+ <item name="android:buttonStyle">@style/SudPrimaryButton</item>
+ <item name="android:theme">@style/SudPrimaryButton</item>
+ <item name="buttonStyle">@style/SudPrimaryButton</item>
+ <item name="android:paddingLeft">16dp</item>
+ <item name="android:paddingRight">16dp</item>
+ <item name="android:layout_marginTop">16dp</item>
+ <item name="android:layout_marginBottom">16dp</item>
+ <item name="android:stateListAnimator">@null</item>
+ <item name="android:buttonCornerRadius">28dp</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:minHeight">56dp</item>
+ <item name="textAllCaps">false</item>
+ </style>
+
+ <style name="SudSecondaryButton" parent="Widget.AppCompat.Button.Borderless.Colored">
+ <item name="android:buttonStyle">@style/SudSecondaryButton</item>
+ <item name="android:theme">@style/SudSecondaryButton</item>
+ <item name="buttonStyle">@style/SudSecondaryButton</item>
+ <item name="android:paddingLeft">16dp</item>
+ <item name="android:paddingRight">16dp</item>
+ <item name="android:layout_marginTop">16dp</item>
+ <item name="android:layout_marginBottom">16dp</item>
+ <item name="android:minHeight">56dp</item>
+ <item name="textAllCaps">false</item>
+ </style>
</resources>
diff --git a/storage/lib/src/main/res/layout/fragment_snapshot.xml b/storage/lib/src/main/res/layout/fragment_snapshot.xml
index 6fcd08a..86ca440 100644
--- a/storage/lib/src/main/res/layout/fragment_snapshot.xml
+++ b/storage/lib/src/main/res/layout/fragment_snapshot.xml
@@ -20,7 +20,10 @@
android:id="@+id/list"
android:layout_width="0dp"
android:layout_height="0dp"
- android:padding="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="40dp"
+ android:paddingEnd="40dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/bottomStub"
app:layout_constraintEnd_toEndOf="parent"
@@ -32,7 +35,7 @@
android:id="@+id/emptyStateView"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
+ android:layout_margin="40dp"
android:gravity="center"
android:text="@string/snapshots_empty"
android:visibility="invisible"
diff --git a/storage/lib/src/main/res/layout/item_snapshot.xml b/storage/lib/src/main/res/layout/item_snapshot.xml
index 7824311..57c05d4 100644
--- a/storage/lib/src/main/res/layout/item_snapshot.xml
+++ b/storage/lib/src/main/res/layout/item_snapshot.xml
@@ -4,8 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
- app:cardCornerRadius="8dp"
+ android:layout_marginBottom="8dp"
+ app:cardCornerRadius="16dp"
tools:showIn="@layout/fragment_snapshot">
<androidx.constraintlayout.widget.ConstraintLayout
@@ -13,14 +13,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
- android:padding="8dp">
+ android:padding="16dp">
<TextView
android:id="@+id/nameView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItem"
- app:layout_constraintEnd_toEndOf="parent"
+ android:layout_marginEnd="8dp"
+ app:layout_constraintEnd_toStartOf="@+id/sizeView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Backup name which might be quite long, who knows...?" />
@@ -41,11 +42,10 @@
android:id="@+id/sizeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="@+id/nameView"
+ app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/timeView"
- app:layout_constraintTop_toBottomOf="@+id/nameView"
+ app:layout_constraintTop_toTopOf="parent"
tools:text="35 GB" />
</androidx.constraintlayout.widget.ConstraintLayout>