kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
clean up snackbar
rodzic
45895cdcf6
commit
a42ba77bf2
|
@ -156,7 +156,7 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
|
|||
requireActivity().startActivity(shareIntent)
|
||||
} catch (ex: ActivityNotFoundException) {
|
||||
Snackbar.make(
|
||||
binding.shareButton,
|
||||
requireView(),
|
||||
R.string.no_app_found,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
|
@ -179,7 +179,7 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
|
|||
|
||||
// Tell the user to try again
|
||||
Snackbar.make(
|
||||
binding.editableCheckbox,
|
||||
requireView(),
|
||||
R.string.radio_sleeping,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
|
|
|
@ -899,7 +899,7 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
fun weNeedAccess(warningReason: String) {
|
||||
warn("Telling user we need need location access")
|
||||
|
||||
Snackbar.make(binding.changeRadioButton, warningReason, Snackbar.LENGTH_INDEFINITE)
|
||||
Snackbar.make(requireView(), warningReason, Snackbar.LENGTH_INDEFINITE)
|
||||
.apply { view.findViewById<TextView>(R.id.snackbar_text).isSingleLine = false }
|
||||
.setAction(R.string.okay) {
|
||||
// dismiss
|
||||
|
@ -969,7 +969,7 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
// Warn user if BLE is disabled
|
||||
if (scanModel.bluetoothAdapter?.isEnabled != true) {
|
||||
Snackbar.make(
|
||||
binding.changeRadioButton,
|
||||
requireView(),
|
||||
R.string.error_bluetooth,
|
||||
Snackbar.LENGTH_INDEFINITE
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue