Search in sources :

Example 21 with ButtonConfig

use of com.android.internal.utils.du.Config.ButtonConfig in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ActionFragment method loadAndSetConfigs.

private void loadAndSetConfigs() {
    mButtons = Config.getConfig(getActivity(), mDefaults);
    mDefaultButtons = Config.getDefaultConfig(getActivity(), mDefaults);
    for (ActionPreference pref : mPrefHolder) {
        pref.setDefaults(mDefaults);
        ButtonConfig button = mButtons.get(pref.getConfigMap().button);
        ActionConfig action = button.getActionConfig(pref.getConfigMap().action);
        pref.setActionConfig(action);
        ButtonConfig defButton = mDefaultButtons.get(pref.getConfigMap().button);
        ActionConfig defAction = defButton.getActionConfig(pref.getConfigMap().action);
        pref.setDefaultActionConfig(defAction);
    }
}
Also used : ActionConfig(com.android.internal.utils.du.Config.ActionConfig) ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig) ActionPreference(com.android.settings.rr.Preferences.ActionPreference)

Example 22 with ButtonConfig

use of com.android.internal.utils.du.Config.ButtonConfig in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class FlingSettings method iconPicked.

@Override
public void iconPicked(String iconType, String iconPackage, String iconName) {
    if (TextUtils.isEmpty(iconType) || TextUtils.isEmpty(iconPackage) || TextUtils.isEmpty(iconName)) {
        return;
    }
    ButtonConfig logoConfig = ButtonConfig.getButton(mContext, FLING_LOGO_URI, true);
    logoConfig.setCustomIconUri(iconType, iconPackage, iconName);
    ButtonConfig.setButton(mContext, logoConfig, FLING_LOGO_URI, true);
}
Also used : ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig)

Example 23 with ButtonConfig

use of com.android.internal.utils.du.Config.ButtonConfig in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class FlingSettings method imagePicked.

@Override
public void imagePicked(Uri uri) {
    if (uri != null) {
        ButtonConfig logoConfig = ButtonConfig.getButton(mContext, FLING_LOGO_URI, true);
        logoConfig.setCustomImageUri(uri);
        ButtonConfig.setButton(mContext, logoConfig, FLING_LOGO_URI, true);
    }
}
Also used : ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig)

Example 24 with ButtonConfig

use of com.android.internal.utils.du.Config.ButtonConfig in project android_packages_apps_crDroidSettings by crdroidandroid.

the class Fling method imagePicked.

@Override
public void imagePicked(Uri uri) {
    if (uri != null) {
        ButtonConfig logoConfig = ButtonConfig.getButton(mContext, FLING_LOGO_URI, true);
        logoConfig.setCustomImageUri(uri);
        ButtonConfig.setButton(mContext, logoConfig, FLING_LOGO_URI, true);
    }
}
Also used : ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig)

Example 25 with ButtonConfig

use of com.android.internal.utils.du.Config.ButtonConfig in project android_packages_apps_crDroidSettings by crdroidandroid.

the class Fling method iconPicked.

@Override
public void iconPicked(String iconType, String iconPackage, String iconName) {
    if (TextUtils.isEmpty(iconType) || TextUtils.isEmpty(iconPackage) || TextUtils.isEmpty(iconName)) {
        return;
    }
    ButtonConfig logoConfig = ButtonConfig.getButton(mContext, FLING_LOGO_URI, true);
    logoConfig.setCustomIconUri(iconType, iconPackage, iconName);
    ButtonConfig.setButton(mContext, logoConfig, FLING_LOGO_URI, true);
}
Also used : ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig)

Aggregations

ButtonConfig (com.android.internal.utils.du.Config.ButtonConfig)25 SmartButtonView (com.android.systemui.navigation.smartbar.SmartButtonView)8 ActionConfig (com.android.internal.utils.du.Config.ActionConfig)7 OpaLayout (com.android.systemui.navigation.OpaLayout)5 ContentResolver (android.content.ContentResolver)3 Point (android.graphics.Point)3 Intent (android.content.Intent)2 Message (android.os.Message)2 FrameLayout (android.widget.FrameLayout)2 ActionPreference (com.android.settings.rr.Preferences.ActionPreference)2 ActionPreference (com.crdroid.settings.preferences.ActionPreference)2 Drawable (android.graphics.drawable.Drawable)1 ViewGroup (android.view.ViewGroup)1 ScaleType (android.widget.ImageView.ScaleType)1 LinearLayout (android.widget.LinearLayout)1 ConfigMap (com.android.internal.utils.du.ActionConstants.ConfigMap)1 SmartBackButtonDrawable (com.android.systemui.navigation.smartbar.SmartBackButtonDrawable)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1