Untitled

 avatar
unknown
java
2 years ago
630 B
3
Indexable
/**
 * Loads up the logo button accordingly to the current app state. <br>
 * If the app is activated, the button should display the logo, and be located well above the
 * screen center. <br>
 * If not, it should display the turn-on picture, and be located slightly above the center.
 * @param context The application context.
 */
private ImageButton loadLogoButton(Context context) {
    ImageButton button = (ImageButton) this.findViewById(R.id.logo_button);
    Drawable icon = DrawableUtils.get(context, this.state == AppState.ON ? "icon.isle" : "icon.off");
    button.setImageDrawable(icon);
    return button;
}