mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 918007 - Factor out method to enable/disable buttons (r=sriram)
This commit is contained in:
parent
d912c6ad42
commit
0d20ffdad1
@ -1564,12 +1564,17 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
}
|
||||
}
|
||||
|
||||
public void updateBackButton(boolean enabled) {
|
||||
Drawable drawable = mBack.getDrawable();
|
||||
if (drawable != null)
|
||||
drawable.setAlpha(enabled ? 255 : 77);
|
||||
public void setButtonEnabled(ImageButton button, boolean enabled) {
|
||||
final Drawable drawable = button.getDrawable();
|
||||
if (drawable != null) {
|
||||
drawable.setAlpha(enabled ? 255 : 61);
|
||||
}
|
||||
|
||||
mBack.setEnabled(enabled);
|
||||
button.setEnabled(enabled);
|
||||
}
|
||||
|
||||
public void updateBackButton(boolean enabled) {
|
||||
setButtonEnabled(mBack, enabled);
|
||||
}
|
||||
|
||||
public void updateForwardButton(final boolean enabled) {
|
||||
|
Loading…
Reference in New Issue
Block a user