Merge pull request #402 from BadDaemon/android12-redesign

Seedvault: Redesign SUW activities for 12
This commit is contained in:
Torsten Grote 2022-05-31 11:08:33 -03:00 committed by GitHub
commit 034ca5aa89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 174 additions and 152 deletions

View file

@ -11,9 +11,7 @@ import android.widget.TextView
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 @@ class RestoreProgressFragment : Fragment() {
appList.apply {
layoutManager = this@RestoreProgressFragment.layoutManager
adapter = this@RestoreProgressFragment.adapter
addItemDecoration(DividerItemDecoration(context, VERTICAL))
}
button.setText(R.string.restore_finished_button)

View file

@ -15,9 +15,7 @@ import android.widget.Toast.LENGTH_LONG
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 @@ class InstallProgressFragment : Fragment(), InstallItemListener {
appList.apply {
layoutManager = this@InstallProgressFragment.layoutManager
adapter = this@InstallProgressFragment.adapter
addItemDecoration(DividerItemDecoration(context, VERTICAL))
}
button.setText(R.string.restore_next)
button.setOnClickListener { viewModel.onNextClickedAfterInstallingApps() }

View file

@ -44,7 +44,6 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
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 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
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 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
warningText.setText(R.string.storage_fragment_warning_delete)
}
warningText.visibility = VISIBLE
divider.visibility = VISIBLE
}
listView.adapter = adapter

View file

@ -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" />

View file

@ -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>

View file

@ -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>

View file

@ -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" />

View file

@ -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>

View file

@ -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" />

View file

@ -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"

View file

@ -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" />

View file

@ -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"

View file

@ -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" />

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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"

View file

@ -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>