Merge "sysui: fix indicator direction."
This commit is contained in:
committed by
Android (Google) Code Review
commit
ff2a83a15f
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user