am e08f3b3f: Merge "Resolve CompoundButton\'s foreground drawable for layout direction change" into mnc-dev

* commit 'e08f3b3ff5ec89bc8c94b5d3d6518afde8e3b8a4':
  Resolve CompoundButton's foreground drawable for layout direction change
This commit is contained in:
Doris Liu
2015-06-30 21:49:18 +00:00
committed by Android Git Automerger

View File

@@ -244,6 +244,17 @@ public abstract class CompoundButton extends Button implements Checkable {
}
}
/**
* @hide
*/
@Override
public void onResolveDrawables(@ResolvedLayoutDir int layoutDirection) {
super.onResolveDrawables(layoutDirection);
if (mButtonDrawable != null) {
mButtonDrawable.setLayoutDirection(layoutDirection);
}
}
/**
* @return the drawable used as the compound button image
* @see #setButtonDrawable(Drawable)