Skip to content

Commit d0d87b5

Browse files
Merge pull request #1 from cnt-interactive/downgrade_min_sdk
Downgrade min sdk
2 parents aa49732 + f0e3b7e commit d0d87b5

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
/captures
66
*.iml
77
local.properties
8+
.gradle/
9+
build/

app/src/main/java/com/akexorcist/localizationapp/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ POM_DEVELOPER_NAME=Somkiat Khitwongwattana
3535
ANDROID_BUILD_TOOLS_VERSION=26.0.2
3636
ANDROID_COMPILE_SDK_VERSION=26
3737
ANDROID_TARGET_SDK_VERSION=26
38-
ANDROID_MIN_SDK=17
38+
ANDROID_MIN_SDK=16

localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationUtility.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)