make settings layout work on even the tiniest of screens

This commit is contained in:
Kevin Hester 2021-02-11 13:37:51 +08:00
parent e40d5b604c
commit 705e0deae3
2 changed files with 183 additions and 175 deletions

View file

@ -745,8 +745,9 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
val hasBonded =
RadioInterfaceService.getBondedDeviceAddress(requireContext()) != null
// get rid of the warning text once at least one device is paired
binding.warningNotPaired.visibility = if (hasBonded) View.GONE else View.VISIBLE
// get rid of the warning text once at least one device is paired.
// If we are running on an emulator, always leave this message showing so we can test the worst case layout
binding.warningNotPaired.visibility = if (hasBonded && !RadioInterfaceService.isMockInterfaceAvailable(requireContext())) View.GONE else View.VISIBLE
}
/// Setup the GUI to do a classic (pre SDK 26 BLE scan)