Allow to skip app restore to reach file restore
This commit is contained in:
parent
bdefb04a0d
commit
9ca6cf2aae
3 changed files with 12 additions and 9 deletions
|
@ -22,19 +22,19 @@ class RestoreSetFragment : Fragment() {
|
|||
private lateinit var listView: RecyclerView
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var errorView: TextView
|
||||
private lateinit var backView: TextView
|
||||
private lateinit var skipView: TextView
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
): View {
|
||||
val v: View = inflater.inflate(R.layout.fragment_restore_set, container, false)
|
||||
|
||||
listView = v.findViewById(R.id.listView)
|
||||
progressBar = v.findViewById(R.id.progressBar)
|
||||
errorView = v.findViewById(R.id.errorView)
|
||||
backView = v.findViewById(R.id.backView)
|
||||
skipView = v.findViewById(R.id.skipView)
|
||||
|
||||
return v
|
||||
}
|
||||
|
@ -49,7 +49,9 @@ class RestoreSetFragment : Fragment() {
|
|||
onRestoreResultsLoaded(result)
|
||||
})
|
||||
|
||||
backView.setOnClickListener { requireActivity().finishAfterTransition() }
|
||||
skipView.setOnClickListener {
|
||||
viewModel.onFinishClickedAfterRestoringAppData()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@+id/backView"
|
||||
app:layout_constraintBottom_toTopOf="@+id/skipView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
|
@ -47,7 +47,7 @@
|
|||
style="?android:progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/backView"
|
||||
app:layout_constraintBottom_toTopOf="@+id/skipView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView" />
|
||||
|
@ -60,7 +60,7 @@
|
|||
android:textColor="?android:colorError"
|
||||
android:textSize="18sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@+id/backView"
|
||||
app:layout_constraintBottom_toTopOf="@+id/skipView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
|
@ -68,11 +68,11 @@
|
|||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backView"
|
||||
android:id="@+id/skipView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/restore_back"
|
||||
android:text="@string/restore_skip"
|
||||
android:textColor="?android:colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -136,6 +136,7 @@
|
|||
<string name="restore_choose_restore_set">Choose a backup to restore</string>
|
||||
<string name="restore_restore_set_times">Last backup %1$s · First %2$s.</string>
|
||||
<string name="restore_back">Don\'t restore</string>
|
||||
<string name="restore_skip">Skip restoring apps</string>
|
||||
<string name="restore_invalid_location_title">No backups found</string>
|
||||
<string name="restore_invalid_location_message">We could not find any backups at this location.\n\nPlease choose another location that contains a %s folder.</string>
|
||||
<string name="restore_set_error">An error occurred while loading the backups.</string>
|
||||
|
|
Loading…
Reference in a new issue