Merge "Fix custom buttons with translated string" into udc-qpr-dev

This commit is contained in:
Brandon Dayauon
2023-06-14 16:13:48 +00:00
committed by Android (Google) Code Review
6 changed files with 53 additions and 13 deletions

View File

@@ -91,10 +91,7 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
}
setInsets(mActivityContext.getDeviceProfile().getInsets());
StringCache cache = mActivityContext.getStringCache();
if (cache != null) {
mTextView.setText(cache.workProfilePauseButton);
}
updateStringFromCache();
getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
}
@@ -212,4 +209,11 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
public int getScrollThreshold() {
return mScrollThreshold;
}
public void updateStringFromCache(){
StringCache cache = mActivityContext.getStringCache();
if (cache != null) {
mTextView.setText(cache.workProfilePauseButton);
}
}
}