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