Accessibility improvements (part 2)
This commit is contained in:
parent
3440f93ab4
commit
5dca0b41f0
2 changed files with 20 additions and 0 deletions
|
@ -208,6 +208,8 @@ public class MainActivity extends BaseActivity
|
|||
speedDial = findViewById(R.id.speedDial);
|
||||
speedDial.inflate(R.menu.menu_fab);
|
||||
|
||||
speedDial.getMainFab().setContentDescription(getString(R.string.button_add));
|
||||
|
||||
speedDial.setOnActionSelectedListener(new SpeedDialView.OnActionSelectedListener() {
|
||||
@Override
|
||||
public boolean onActionSelected(SpeedDialActionItem speedDialActionItem) {
|
||||
|
@ -227,6 +229,22 @@ public class MainActivity extends BaseActivity
|
|||
}
|
||||
});
|
||||
|
||||
speedDial.setOnChangeListener(new SpeedDialView.OnChangeListener() {
|
||||
@Override
|
||||
public boolean onMainActionSelected() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onToggleChanged(boolean isOpen) {
|
||||
if (isOpen) {
|
||||
speedDial.getMainFab().setContentDescription(getString(R.string.button_close_menu));
|
||||
} else {
|
||||
speedDial.getMainFab().setContentDescription(getString(R.string.button_add));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
final ProgressBar progressBar = findViewById(R.id.progressBar);
|
||||
progressBar.setVisibility(settings.isHideGlobalTimeoutEnabled() ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
|
|
@ -62,6 +62,8 @@
|
|||
<string name="button_card_options_format">More options for %1$s</string>
|
||||
<string name="button_card_copy">Copy token</string>
|
||||
<string name="button_card_copy_format">Copy %1$s token</string>
|
||||
<string name="button_add">Add new account</string>
|
||||
<string name="button_close_menu">Close menu</string>
|
||||
|
||||
<!-- Toast messages -->
|
||||
<string name="toast_auth_failed">Authentication failed, please try again!</string>
|
||||
|
|
Loading…
Reference in a new issue