File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed
app/src/main/java/com/akexorcist/localizationapp
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 55/captures
66* .iml
77local.properties
8+ .gradle /
9+ build /
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class MainActivity extends LocalizationActivity {
1717 @ Override
1818 public void onCreate (Bundle savedInstanceState ) {
1919 // You can set default language when first time running. Must to setup before onCreate was called.
20- setDefaultLanguage ("th " );
20+ setDefaultLanguage ("en " );
2121 super .onCreate (savedInstanceState );
2222 setContentView (R .layout .activity_main );
2323
Original file line number Diff line number Diff line change @@ -35,4 +35,4 @@ POM_DEVELOPER_NAME=Somkiat Khitwongwattana
3535ANDROID_BUILD_TOOLS_VERSION =26.0.2
3636ANDROID_COMPILE_SDK_VERSION =26
3737ANDROID_TARGET_SDK_VERSION =26
38- ANDROID_MIN_SDK =17
38+ ANDROID_MIN_SDK =16
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ public static Context applyLocalizationContext(Context baseContext) {
3636 config .setLocale (currentLocale );
3737 return context .createConfigurationContext (config );
3838 } else {
39+ config .locale = currentLocale ;
40+ context .getResources ().updateConfiguration (config ,
41+ context .getResources ().getDisplayMetrics ());
3942 return context ;
4043 }
4144 } else {
You can’t perform that action at this time.
0 commit comments