Search in sources :

Example 6 with ScaleType

use of android.widget.ImageView.ScaleType in project android_packages_apps_DUI by DirtyUnicorns.

the class SmartBarEditor method swapConfigs.

private void swapConfigs(OpaLayout v1, OpaLayout v2) {
    ButtonConfig config1 = v1.getButton().getButtonConfig();
    ButtonConfig config2 = v2.getButton().getButtonConfig();
    int[] padding1 = SmartBarHelper.getViewPadding(v1);
    int[] padding2 = SmartBarHelper.getViewPadding(v2);
    ScaleType scale1 = v1.getButton().getScaleType();
    ScaleType scale2 = v2.getButton().getScaleType();
    v1.getButton().setButtonConfig(config2);
    v2.getButton().setButtonConfig(config1);
    mHost.setButtonDrawable(v1.getButton());
    mHost.setButtonDrawable(v2.getButton());
    SmartBarHelper.applyPaddingToView(v1, padding2);
    SmartBarHelper.applyPaddingToView(v2, padding1);
    v1.getButton().setScaleType(scale2);
    v2.getButton().setScaleType(scale1);
}
Also used : ButtonConfig(com.android.internal.utils.du.Config.ButtonConfig) ScaleType(android.widget.ImageView.ScaleType)

Aggregations

ScaleType (android.widget.ImageView.ScaleType)6 NetworkResponse (com.android.volley.NetworkResponse)3 Test (org.junit.Test)3 Matrix (android.graphics.Matrix)1 RectF (android.graphics.RectF)1 Drawable (android.graphics.drawable.Drawable)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 ButtonConfig (com.android.internal.utils.du.Config.ButtonConfig)1