Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
2df5abe6
Commit
2df5abe6
authored
Jul 26, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new api
parent
250fc738
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
src/main/java/com/common/base/BaseApplication.java
+3
-0
src/main/java/tech/starwin/utils/context_utils/AppLanguageUtils.java
+0
-10
No files found.
src/main/java/com/common/base/BaseApplication.java
View file @
2df5abe6
...
...
@@ -25,6 +25,8 @@ import com.tencent.bugly.crashreport.CrashReport;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
java.util.Locale
;
import
io.github.inflationx.viewpump.ViewPump
;
import
io.github.inflationx.viewpump.ViewPumpContextWrapper
;
import
tech.starwin.BuildConfig
;
...
...
@@ -42,6 +44,7 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override
protected
void
attachBaseContext
(
Context
base
)
{
DeviceInfo
.
initDefaultLanguage
(
Locale
.
getDefault
());
initLibCnofig
();
// Context languageContext = AppLanguageUtils.attachBaseContext(base, LibConfig.LANGUAGE);
// super.attachBaseContext(ViewPumpContextWrapper.wrap(Philology.INSTANCE.wrap(languageContext)));
...
...
src/main/java/tech/starwin/utils/context_utils/AppLanguageUtils.java
View file @
2df5abe6
...
...
@@ -19,16 +19,6 @@ public class AppLanguageUtils {
public
static
void
setLanguage
(
Context
context
,
String
language
)
{
if
(
DeviceInfo
.
DEFAULT_LANGUAGE
==
""
)
{
DeviceInfo
.
DEFAULT_LANGUAGE
=
"country="
+
Locale
.
getDefault
().
getCountry
()
+
"&"
+
"language="
+
Locale
.
getDefault
().
getLanguage
()
+
"&"
+
"display_country="
+
Locale
.
getDefault
().
getDisplayCountry
()
+
"&"
+
"display_language="
+
Locale
.
getDefault
().
getDisplayLanguage
()
+
"&"
+
"display_name="
+
Locale
.
getDefault
().
getDisplayName
();
}
Resources
resources
=
context
.
getApplicationContext
().
getResources
();
DisplayMetrics
dm
=
resources
.
getDisplayMetrics
();
Configuration
config
=
resources
.
getConfiguration
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment