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);
}
Aggregations