mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Merge "Fix custom buttons with translated string" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
383cc17a6f
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user