From 4e145ee27e1318905792477ed98fbd9a000b3e05 Mon Sep 17 00:00:00 2001 From: yunusemrecetin Date: Mon, 25 Jun 2018 14:59:28 +0300 Subject: [PATCH 1/2] min sdk 17 to 16 --- .gitignore | 3 +++ .../main/java/com/akexorcist/localizationapp/MainActivity.java | 2 +- gradle.properties | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0a38ac0..4ed622d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ /captures *.iml local.properties +# Gradle files +.gradle/ +build/ \ No newline at end of file diff --git a/app/src/main/java/com/akexorcist/localizationapp/MainActivity.java b/app/src/main/java/com/akexorcist/localizationapp/MainActivity.java index 332958e..0782d22 100644 --- a/app/src/main/java/com/akexorcist/localizationapp/MainActivity.java +++ b/app/src/main/java/com/akexorcist/localizationapp/MainActivity.java @@ -17,7 +17,7 @@ public class MainActivity extends LocalizationActivity { @Override public void onCreate(Bundle savedInstanceState) { // You can set default language when first time running. Must to setup before onCreate was called. - setDefaultLanguage("th"); + setDefaultLanguage("en"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); diff --git a/gradle.properties b/gradle.properties index a7e38a3..fa3b178 100644 --- a/gradle.properties +++ b/gradle.properties @@ -35,4 +35,4 @@ POM_DEVELOPER_NAME=Somkiat Khitwongwattana ANDROID_BUILD_TOOLS_VERSION=26.0.2 ANDROID_COMPILE_SDK_VERSION=26 ANDROID_TARGET_SDK_VERSION=26 -ANDROID_MIN_SDK=17 +ANDROID_MIN_SDK=16 From f0e3b7e5bbec1c552b450ac7edfb1f5268904bbf Mon Sep 17 00:00:00 2001 From: yunusemrecetin Date: Mon, 25 Jun 2018 14:59:47 +0300 Subject: [PATCH 2/2] min sdk 17 to 16 --- .gitignore | 1 - .../localizationactivity/core/LocalizationUtility.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4ed622d..cde3d68 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,5 @@ /captures *.iml local.properties -# Gradle files .gradle/ build/ \ No newline at end of file diff --git a/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationUtility.java b/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationUtility.java index 1edf7e6..878d4ef 100644 --- a/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationUtility.java +++ b/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationUtility.java @@ -36,6 +36,9 @@ public static Context applyLocalizationContext(Context baseContext) { config.setLocale(currentLocale); return context.createConfigurationContext(config); } else { + config.locale = currentLocale; + context.getResources().updateConfiguration(config, + context.getResources().getDisplayMetrics()); return context; } } else {