Search in sources :

Example 1 with AndroidActionBarIconGenerator

use of com.android.tools.idea.npw.assetstudio.icon.AndroidActionBarIconGenerator in project android by JetBrains.

the class ConfigureIconPanel method updateBindingsAndUiForActiveIconType.

private void updateBindingsAndUiForActiveIconType() {
    myOutputName.set(myIconType.toOutputName("name"));
    myGeneralBindings.bind(myIconGenerator.sourceAsset(), new AsOptionalExpression<>(myActiveAsset));
    myGeneralBindings.bind(myIconGenerator.name(), myOutputName);
    switch(myIconType) {
        case LAUNCHER:
            AndroidLauncherIconGenerator launcherIconGenerator = (AndroidLauncherIconGenerator) myIconGenerator;
            myGeneralBindings.bind(launcherIconGenerator.useForegroundColor(), myIgnoreForegroundColor.not());
            myGeneralBindings.bindTwoWay(myForegroundColor, launcherIconGenerator.foregroundColor());
            myGeneralBindings.bindTwoWay(myBackgroundColor, launcherIconGenerator.backgroundColor());
            myGeneralBindings.bindTwoWay(myCropped, launcherIconGenerator.cropped());
            myGeneralBindings.bindTwoWay(myShape, launcherIconGenerator.shape());
            myGeneralBindings.bindTwoWay(myDogEared, launcherIconGenerator.dogEared());
            break;
        case ACTIONBAR:
            AndroidActionBarIconGenerator actionBarIconGenerator = (AndroidActionBarIconGenerator) myIconGenerator;
            myGeneralBindings.bindTwoWay(myThemeColor, actionBarIconGenerator.customColor());
            myGeneralBindings.bindTwoWay(myTheme, actionBarIconGenerator.theme());
            break;
        case NOTIFICATION:
            // No special options
            break;
    }
}
Also used : AndroidActionBarIconGenerator(com.android.tools.idea.npw.assetstudio.icon.AndroidActionBarIconGenerator) AndroidLauncherIconGenerator(com.android.tools.idea.npw.assetstudio.icon.AndroidLauncherIconGenerator)

Aggregations

AndroidActionBarIconGenerator (com.android.tools.idea.npw.assetstudio.icon.AndroidActionBarIconGenerator)1 AndroidLauncherIconGenerator (com.android.tools.idea.npw.assetstudio.icon.AndroidLauncherIconGenerator)1