Merge "sysui: fix indicator direction."

This commit is contained in:
TreeHugger Robot
2016-05-11 19:35:25 +00:00
committed by Android (Google) Code Review

View File

@@ -32,8 +32,7 @@ public class ExpandableIndicator extends ImageView {
@Override
protected void onFinishInflate() {
super.onFinishInflate();
final int res = getDrawableResourceId(mExpanded);
setImageResource(res);
updateIndicatorDrawable();
setContentDescription(getContentDescription(mExpanded));
}
@@ -53,6 +52,7 @@ public class ExpandableIndicator extends ImageView {
/** Whether the icons are using the default direction or the opposite */
public void setDefaultDirection(boolean isDefaultDirection) {
mIsDefaultDirection = isDefaultDirection;
updateIndicatorDrawable();
}
private int getDrawableResourceId(boolean expanded) {
@@ -69,4 +69,9 @@ public class ExpandableIndicator extends ImageView {
return expanded ? mContext.getString(R.string.accessibility_quick_settings_collapse)
: mContext.getString(R.string.accessibility_quick_settings_expand);
}
private void updateIndicatorDrawable() {
final int res = getDrawableResourceId(mExpanded);
setImageResource(res);
}
}