Remove warnings when choosing backup location in UI
This commit is contained in:
parent
bfa17fa5ec
commit
a268116e06
3 changed files with 1 additions and 42 deletions
|
@ -20,7 +20,6 @@ import android.view.View
|
|||
import android.view.View.INVISIBLE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.activity.result.contract.ActivityResultContracts.OpenDocumentTree
|
||||
|
@ -47,8 +46,6 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
|
||||
private lateinit var viewModel: StorageViewModel
|
||||
private lateinit var titleView: TextView
|
||||
private lateinit var warningIcon: ImageView
|
||||
private lateinit var warningText: TextView
|
||||
private lateinit var listView: RecyclerView
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var skipView: TextView
|
||||
|
@ -63,8 +60,6 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
val v: View = inflater.inflate(R.layout.fragment_storage_options, container, false)
|
||||
|
||||
titleView = v.requireViewById(R.id.titleView)
|
||||
warningIcon = v.requireViewById(R.id.warningIcon)
|
||||
warningText = v.requireViewById(R.id.warningText)
|
||||
listView = v.requireViewById(R.id.listView)
|
||||
progressBar = v.requireViewById(R.id.progressBar)
|
||||
skipView = v.requireViewById(R.id.skipView)
|
||||
|
@ -90,12 +85,6 @@ internal class StorageOptionsFragment : Fragment(), StorageOptionClickedListener
|
|||
requireActivity().setResult(RESULT_FIRST_USER)
|
||||
requireActivity().finishAfterTransition()
|
||||
}
|
||||
} else {
|
||||
warningIcon.visibility = VISIBLE
|
||||
if (viewModel.hasStorageSet) {
|
||||
warningText.setText(R.string.storage_fragment_warning_delete)
|
||||
}
|
||||
warningText.visibility = VISIBLE
|
||||
}
|
||||
|
||||
listView.adapter = adapter
|
||||
|
|
|
@ -29,34 +29,6 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/imageView"
|
||||
tools:text="Choose where to store backup (is a short title, but it can be longer)" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/warningIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:src="@drawable/ic_warning"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/warningText"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/warningText"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<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="40dp"
|
||||
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" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/listView"
|
||||
style="@style/SudContent"
|
||||
|
@ -66,7 +38,7 @@
|
|||
app:layout_constraintBottom_toTopOf="@+id/skipView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/warningText"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleView"
|
||||
app:layout_goneMarginTop="16dp"
|
||||
tools:listitem="@layout/list_item_storage_root" />
|
||||
|
||||
|
|
|
@ -78,8 +78,6 @@
|
|||
<!-- Storage Location -->
|
||||
<string name="storage_fragment_backup_title">Choose where to store backups</string>
|
||||
<string name="storage_fragment_restore_title">Where to find your backups?</string>
|
||||
<string name="storage_fragment_warning">People with access to your storage location can learn which apps you use, but do not get access to the apps\' data.</string>
|
||||
<string name="storage_fragment_warning_delete">Existing backups in this location will be deleted.</string>
|
||||
<string name="storage_user_selected_location_title">User-chosen location</string>
|
||||
<string name="storage_fake_drive_title">USB flash drive</string>
|
||||
<string name="storage_fake_drive_summary">Needs to be plugged in</string>
|
||||
|
|
Loading…
Reference in a new issue