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