-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
login: smoother wifi dialog (fixes #5387) #5394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is also some double space between Bluetooth/Wifi
and is on
d.getButton(AlertDialog.BUTTON_POSITIVE)?.apply { | ||
textSize = 14f | ||
setPadding(20,20,20,20) | ||
} | ||
d.getButton(AlertDialog.BUTTON_NEGATIVE)?.apply { | ||
textSize = 14f | ||
setPadding(20,20,20,20) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val pd = AlertDialog.Builder(context, R.style.CustomAlertDialog) if you update this line to val pd = AlertDialog.Builder(context, R.style.AlertDialogTheme) where you change the dialog theme you won't need this line
var message = "" | ||
if (NetworkUtils.isBluetoothEnabled()) message += "Bluetooth/" | ||
if (NetworkUtils.isWifiEnabled()) message += "WiFi/" | ||
message = message.trim().removeSuffix("/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huitk this works but why are we adding the /
then removing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove only the last "/" because if only Wifi is on, it will show WIfi/ instead if wifi. Or if both wifi and Bluetooth are on, it will show Bluetooth/Wifi/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huitk can it be and
since we are sure both bluetooth and wifi are on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes #5387
To test:
On DialogUtils.kt
On LoginActivity.kt