Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Downgrade min sdk #25

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/captures
*.iml
local.properties
.gradle/
build/
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down