Seedvault: redesign SUW activities
Change-Id: I2effdf5f11c8d92899f328abf0027e7bfd1a57ba
This commit is contained in:
parent
4a1077f056
commit
994ad1d08d
14 changed files with 374 additions and 416 deletions
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
<activity
|
||||
android:name=".ui.storage.StorageActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
android:theme="@style/SudThemeGlifV3.Light" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.storage.PermissionGrantActivity"
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
android:exported="true"
|
||||
android:label="@string/restore_title"
|
||||
android:permission="com.stevesoltys.seedvault.RESTORE_BACKUP"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
android:theme="@style/SudThemeGlifV3.Light">
|
||||
<intent-filter>
|
||||
<action android:name="com.stevesoltys.seedvault.RESTORE_BACKUP" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
package com.stevesoltys.seedvault.restore
|
||||
|
||||
import android.app.Activity.RESULT_OK
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewStub
|
||||
import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.google.android.setupcompat.util.ResultCodes.RESULT_SKIP
|
||||
import com.google.android.setupdesign.GlifLayout
|
||||
import com.stevesoltys.seedvault.R
|
||||
import com.stevesoltys.seedvault.ui.getColorAccent
|
||||
import org.calyxos.backup.storage.api.SnapshotItem
|
||||
import org.calyxos.backup.storage.ui.restore.SnapshotFragment
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
|
@ -27,12 +29,16 @@ internal class RestoreFilesFragment : SnapshotFragment() {
|
|||
|
||||
val topStub: ViewStub = v.findViewById(R.id.topStub)
|
||||
topStub.layoutResource = R.layout.header_snapshots
|
||||
topStub.inflate()
|
||||
val header = topStub.inflate()
|
||||
val suwLayout: GlifLayout = header.findViewById(R.id.setup_wizard_layout)
|
||||
val icon: Drawable = suwLayout.getIcon()
|
||||
icon.setTintList(getColorAccent(requireContext()))
|
||||
suwLayout.setIcon(icon)
|
||||
|
||||
val bottomStub: ViewStub = v.findViewById(R.id.bottomStub)
|
||||
bottomStub.layoutResource = R.layout.footer_snapshots
|
||||
val footer = bottomStub.inflate()
|
||||
val skipView: TextView = footer.findViewById(R.id.skipView)
|
||||
val skipView: Button = footer.findViewById(R.id.skipView)
|
||||
skipView.setOnClickListener {
|
||||
requireActivity().apply {
|
||||
// SetupWizard handles this
|
||||
|
|
@ -56,6 +62,11 @@ internal class RestoreFilesStartedFragment : Fragment() {
|
|||
): View {
|
||||
val v: View = inflater.inflate(R.layout.fragment_restore_files_started, container, false)
|
||||
|
||||
val suwLayout: GlifLayout = v.findViewById(R.id.setup_wizard_layout)
|
||||
val icon: Drawable = suwLayout.getIcon()
|
||||
icon.setTintList(getColorAccent(requireContext()))
|
||||
suwLayout.setIcon(icon)
|
||||
|
||||
val button: Button = v.findViewById(R.id.button)
|
||||
button.setOnClickListener {
|
||||
requireActivity().apply {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.stevesoltys.seedvault.restore
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
|
@ -15,8 +16,10 @@ import androidx.recyclerview.widget.DividerItemDecoration
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.setupdesign.GlifLayout
|
||||
import com.stevesoltys.seedvault.R
|
||||
import com.stevesoltys.seedvault.ui.AppBackupState.FAILED_NOT_INSTALLED
|
||||
import com.stevesoltys.seedvault.ui.getColorAccent
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class RestoreProgressFragment : Fragment() {
|
||||
|
|
@ -26,8 +29,8 @@ class RestoreProgressFragment : Fragment() {
|
|||
private val layoutManager = LinearLayoutManager(context)
|
||||
private val adapter = RestoreProgressAdapter()
|
||||
|
||||
private lateinit var suwLayout: GlifLayout
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var titleView: TextView
|
||||
private lateinit var backupNameView: TextView
|
||||
private lateinit var appList: RecyclerView
|
||||
private lateinit var button: Button
|
||||
|
|
@ -39,17 +42,21 @@ class RestoreProgressFragment : Fragment() {
|
|||
): View {
|
||||
val v: View = inflater.inflate(R.layout.fragment_restore_progress, container, false)
|
||||
|
||||
suwLayout = v.findViewById(R.id.setup_wizard_layout)
|
||||
progressBar = v.findViewById(R.id.progressBar)
|
||||
titleView = v.findViewById(R.id.titleView)
|
||||
backupNameView = v.findViewById(R.id.backupNameView)
|
||||
appList = v.findViewById(R.id.appList)
|
||||
button = v.findViewById(R.id.button)
|
||||
|
||||
val icon: Drawable = suwLayout.getIcon()
|
||||
icon.setTintList(getColorAccent(requireContext()))
|
||||
suwLayout.setIcon(icon)
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
titleView.setText(R.string.restore_restoring)
|
||||
suwLayout.setHeaderText(R.string.restore_restoring)
|
||||
|
||||
appList.apply {
|
||||
layoutManager = this@RestoreProgressFragment.layoutManager
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.stevesoltys.seedvault.restore
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
|
@ -7,21 +8,25 @@ import android.view.View.INVISIBLE
|
|||
import android.view.View.VISIBLE
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
|
||||
import android.widget.Button
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.setupdesign.GlifLayout
|
||||
import com.stevesoltys.seedvault.R
|
||||
import com.stevesoltys.seedvault.ui.getColorAccent
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class RestoreSetFragment : Fragment() {
|
||||
|
||||
private val viewModel: RestoreViewModel by sharedViewModel()
|
||||
|
||||
private lateinit var suwLayout: GlifLayout
|
||||
private lateinit var listView: RecyclerView
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var errorView: TextView
|
||||
private lateinit var skipView: TextView
|
||||
private lateinit var skipView: Button
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
|
|
@ -30,11 +35,16 @@ class RestoreSetFragment : Fragment() {
|
|||
): View {
|
||||
val v: View = inflater.inflate(R.layout.fragment_restore_set, container, false)
|
||||
|
||||
suwLayout = v.findViewById(R.id.setup_wizard_layout)
|
||||
listView = v.findViewById(R.id.listView)
|
||||
progressBar = v.findViewById(R.id.progressBar)
|
||||
errorView = v.findViewById(R.id.errorView)
|
||||
skipView = v.findViewById(R.id.skipView)
|
||||
|
||||
val icon: Drawable = suwLayout.getIcon()
|
||||
icon.setTintList(getColorAccent(requireContext()))
|
||||
suwLayout.setIcon(icon)
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.stevesoltys.seedvault.restore.install
|
|||
import android.content.ActivityNotFoundException
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
|
@ -19,8 +20,10 @@ import androidx.recyclerview.widget.DividerItemDecoration
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.setupdesign.GlifLayout
|
||||
import com.stevesoltys.seedvault.R
|
||||
import com.stevesoltys.seedvault.restore.RestoreViewModel
|
||||
import com.stevesoltys.seedvault.ui.getColorAccent
|
||||
import org.koin.androidx.viewmodel.ext.android.sharedViewModel
|
||||
|
||||
class InstallProgressFragment : Fragment(), InstallItemListener {
|
||||
|
|
@ -30,8 +33,8 @@ class InstallProgressFragment : Fragment(), InstallItemListener {
|
|||
private val layoutManager = LinearLayoutManager(context)
|
||||
private val adapter = InstallProgressAdapter(this)
|
||||
|
||||
private lateinit var suwLayout: GlifLayout
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var titleView: TextView
|
||||
private lateinit var backupNameView: TextView
|
||||
private lateinit var appList: RecyclerView
|
||||
private lateinit var button: Button
|
||||
|
|
@ -43,17 +46,21 @@ class InstallProgressFragment : Fragment(), InstallItemListener {
|
|||
): View {
|
||||
val v: View = inflater.inflate(R.layout.fragment_restore_progress, container, false)
|
||||
|
||||
suwLayout = v.findViewById(R.id.setup_wizard_layout)
|
||||
progressBar = v.findViewById(R.id.progressBar)
|
||||
titleView = v.findViewById(R.id.titleView)
|
||||
backupNameView = v.findViewById(R.id.backupNameView)
|
||||
appList = v.findViewById(R.id.appList)
|
||||
button = v.findViewById(R.id.button)
|
||||
|
||||
val icon: Drawable = suwLayout.getIcon()
|
||||
icon.setTintList(getColorAccent(requireContext()))
|
||||
suwLayout.setIcon(icon)
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
titleView.setText(R.string.restore_installing_packages)
|
||||
suwLayout.setHeaderText(R.string.restore_installing_packages)
|
||||
|
||||
appList.apply {
|
||||
layoutManager = this@InstallProgressFragment.layoutManager
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import android.content.Intent
|
|||
import android.content.Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
|
||||
import android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||
import android.content.Intent.FLAG_GRANT_WRITE_URI_PERMISSION
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
|
|
@ -14,6 +15,7 @@ import android.view.View
|
|||
import android.view.View.INVISIBLE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
|
|
@ -21,9 +23,11 @@ import androidx.activity.result.contract.ActivityResultContracts.OpenDocumentTre
|
|||
import androidx.annotation.RequiresPermission
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.setupdesign.GlifLayout
|
||||
import com.google.android.setupcompat.util.ResultCodes.RESULT_SKIP
|
||||
import com.stevesoltys.seedvault.R
|
||||
import com.stevesoltys.seedvault.ui.INTENT_EXTRA_IS_RESTORE
|
||||
import com.stevesoltys.seedvault.ui.getColorAccent
|
||||
import com.stevesoltys.seedvault.ui.storage.StorageOption.SafOption
|
||||
import org.koin.androidx.viewmodel.ext.android.getSharedViewModel
|
||||
|
||||
|
|
@ -40,14 +44,14 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
}
|
||||
}
|
||||
|
||||
private lateinit var suwLayout: GlifLayout
|
||||
private lateinit var viewModel: StorageViewModel
|
||||
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
|
||||
private lateinit var skipView: Button
|
||||
|
||||
private val adapter by lazy { StorageOptionAdapter(viewModel.isRestoreOperation, this) }
|
||||
|
||||
|
|
@ -58,7 +62,7 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
): View {
|
||||
val v: View = inflater.inflate(R.layout.fragment_storage_root, container, false)
|
||||
|
||||
titleView = v.findViewById(R.id.titleView)
|
||||
suwLayout = v.findViewById(R.id.setup_wizard_layout)
|
||||
warningIcon = v.findViewById(R.id.warningIcon)
|
||||
warningText = v.findViewById(R.id.warningText)
|
||||
divider = v.findViewById(R.id.divider)
|
||||
|
|
@ -66,6 +70,10 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
progressBar = v.findViewById(R.id.progressBar)
|
||||
skipView = v.findViewById(R.id.skipView)
|
||||
|
||||
val icon: Drawable = suwLayout.getIcon()
|
||||
icon.setTintList(getColorAccent(requireContext()))
|
||||
suwLayout.setIcon(icon)
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +87,7 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
}
|
||||
|
||||
if (viewModel.isRestoreOperation) {
|
||||
titleView.text = getString(R.string.storage_fragment_restore_title)
|
||||
suwLayout.setHeaderText(R.string.restore_restoring)
|
||||
skipView.visibility = VISIBLE
|
||||
skipView.setOnClickListener {
|
||||
// SetupWizard handles this
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/skipView"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackground"
|
||||
|
|
|
|||
|
|
@ -1,33 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_cloud_restore"
|
||||
app:sucHeaderText="@string/restore_storage_in_progress_title">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_cloud_restore"
|
||||
app:tint="?android:colorAccent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
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" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/infoView"
|
||||
|
|
@ -37,14 +22,14 @@
|
|||
android:text="@string/restore_storage_in_progress_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
style="@style/SudGlifButton.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/restore_storage_got_it"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -54,3 +39,4 @@
|
|||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
|
@ -1,15 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_cloud_download"
|
||||
app:sucHeaderText="@string/restore_installing_packages">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:indeterminate="false"
|
||||
android:padding="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -18,41 +28,16 @@
|
|||
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"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/progressBar"
|
||||
app:srcCompat="@drawable/ic_cloud_download"
|
||||
app:tint="?android:colorAccent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
android:layout_width="wrap_content"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backupNameView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
tools:text="Pixel 2 XL" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/progressBar"
|
||||
tools:text="Pixel 2 XL"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/appList"
|
||||
|
|
@ -68,17 +53,13 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
style="@style/ActionPrimaryButton"
|
||||
style="@style/SudGlifButton.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
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_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_cloud_download"
|
||||
app:sucHeaderText="@string/restore_installing_packages">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_cloud_download"
|
||||
app:tint="?android:colorAccent"
|
||||
tools:ignore="ContentDescription" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
android:layout_width="wrap_content"
|
||||
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" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/listView"
|
||||
|
|
@ -36,7 +32,6 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
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/titleView"
|
||||
|
|
@ -47,7 +42,6 @@
|
|||
style="?android:progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/skipView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView" />
|
||||
|
|
@ -60,25 +54,20 @@
|
|||
android:textColor="?android:colorError"
|
||||
android:textSize="18sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@+id/skipView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
tools:text="@string/restore_set_empty_result"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/skipView"
|
||||
style="@style/SudGlifButton.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:padding="16dp"
|
||||
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" />
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
|
|
|||
|
|
@ -1,33 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_storage"
|
||||
app:sucHeaderText="@string/restore_installing_packages">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_storage"
|
||||
app:tint="?android:colorAccent"
|
||||
tools:ignore="ContentDescription" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
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"
|
||||
tools:text="@string/storage_check_fragment_backup_title" />
|
||||
tools:text="@string/storage_check_fragment_backup_title"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/patienceView"
|
||||
|
|
@ -48,10 +43,10 @@
|
|||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/backButton"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/patienceView"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -67,14 +62,14 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/patienceView"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:text="@string/storage_check_fragment_backup_error"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/backButton"
|
||||
style="@style/ActionPrimaryButton"
|
||||
style="@style/SudGlifButton.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
|
|
@ -85,3 +80,4 @@
|
|||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
|
@ -1,62 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:icon="@drawable/ic_storage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
app:sucHeaderText="@string/storage_fragment_backup_title">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_storage"
|
||||
app:tint="?android:colorAccent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleView"
|
||||
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"
|
||||
tools:text="Choose where to store backup (is a short title, but it can be longer)" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/SudContentFrame">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/warningIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/ic_warning"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/warningText"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/warningText"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="visible"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warningText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/storage_fragment_warning"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/warningIcon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/warningIcon"
|
||||
tools:visibility="visible"
|
||||
style="@style/SudItemTitle.GlifDescription" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
|
|
@ -92,20 +72,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView" />
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/skipView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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" />
|
||||
tools:visibility="visible"
|
||||
style="@style/SudGlifButton.Secondary" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
|
|
|
|||
|
|
@ -5,29 +5,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
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="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"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:icon="@drawable/ic_cloud_download"
|
||||
app:sucHeaderText="@string/restore_storage_choose_snapshot" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -12,4 +12,6 @@
|
|||
<color name="green">#558B2F</color>
|
||||
<color name="yellow">#F9A825</color>
|
||||
<color name="davx5_background">#7cb342</color>
|
||||
|
||||
<color name="sud_color_accent_glif_v3_light">@color/accent</color>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue