Java Code Examples for android.view.ContextThemeWrapper#applyOverrideConfiguration()

The following examples show how to use android.view.ContextThemeWrapper#applyOverrideConfiguration() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocaleUtils.java    From kcanotify_h5-master with GNU General Public License v3.0 5 votes vote down vote up
public static void updateConfig(ContextThemeWrapper wrapper) {
    if(sLocale != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        Configuration configuration = new Configuration();
        configuration.setLocale(sLocale);
        wrapper.applyOverrideConfiguration(configuration);
    }
}
 
Example 2
Source File: LocaleUtils.java    From kcanotify with GNU General Public License v3.0 5 votes vote down vote up
public static void updateConfig(ContextThemeWrapper wrapper) {
    if(sLocale != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        Configuration configuration = new Configuration();
        configuration.setLocale(sLocale);
        wrapper.applyOverrideConfiguration(configuration);
    }
}