Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
location share white
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
location share white
Commits
5aee5b23
Commit
5aee5b23
authored
Nov 28, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
fb582f48
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
59 deletions
+57
-59
BaseActivity.kt
...n/java/com/base/locationsharewhite/helper/BaseActivity.kt
+0
-2
MyApplication.kt
.../java/com/base/locationsharewhite/helper/MyApplication.kt
+7
-7
HowUseActivity.kt
...a/com/base/locationsharewhite/ui/howuse/HowUseActivity.kt
+8
-8
LocationMapActivity.kt
.../locationsharewhite/ui/locationmap/LocationMapActivity.kt
+12
-12
MainActivity.kt
.../java/com/base/locationsharewhite/ui/main/MainActivity.kt
+12
-12
LanguageActivity.kt
...va/com/base/locationsharewhite/ui/set/LanguageActivity.kt
+6
-6
RenameActivity.kt
...java/com/base/locationsharewhite/ui/set/RenameActivity.kt
+6
-6
SettingActivity.kt
...ava/com/base/locationsharewhite/ui/set/SettingActivity.kt
+6
-6
No files found.
app/src/main/java/com/base/locationsharewhite/helper/BaseActivity.kt
View file @
5aee5b23
...
...
@@ -9,8 +9,6 @@ import com.base.locationsharewhite.bean.ConstObject.appLanguageSp
import
com.base.locationsharewhite.bean.ConstObject.changeLanguageSp
import
com.base.locationsharewhite.ui.main.MainActivity
import
com.base.locationsharewhite.utils.ActivityLauncher
import
com.base.locationsharewhite.utils.LanguageUtils.changeAppLanguage
import
com.base.locationsharewhite.utils.LogEx
abstract
class
BaseActivity
<
T
:
ViewBinding
>
:
AppCompatActivity
()
{
private
val
TAG
=
"BaseActivity"
...
...
app/src/main/java/com/base/locationsharewhite/helper/MyApplication.kt
View file @
5aee5b23
...
...
@@ -29,13 +29,13 @@ class MyApplication : Application() {
lateinit
var
appContext
:
MyApplication
var
splashLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
var
mainLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
var
setLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
var
settingsLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
var
howUseLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
var
renameLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
var
locationMapLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
//
var splashLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
//
var mainLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
//
var setLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
//
var settingsLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
//
var howUseLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
//
var renameLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
//
var locationMapLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var
umpCanAd
:
Boolean
=
true
...
...
app/src/main/java/com/base/locationsharewhite/ui/howuse/HowUseActivity.kt
View file @
5aee5b23
...
...
@@ -22,8 +22,8 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
BarUtils
.
setStatusBarColor
(
this
,
Color
.
WHITE
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
val
isRecreate
=
isLanguageRecreate
(
MyApplication
.
mainLanguage
)
if
(
isRecreate
)
return
//
val isRecreate = isLanguageRecreate(MyApplication.mainLanguage)
//
if (isRecreate) return
}
override
fun
initListener
()
{
...
...
@@ -44,12 +44,12 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
override
fun
onResume
()
{
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
howUseLanguage
,
TAG
)
{
MyApplication
.
howUseLanguage
=
it
}
if
(
isRecreate
)
{
return
}
//
val isRecreate = updateAppLanguage(MyApplication.howUseLanguage, TAG) {
//
MyApplication.howUseLanguage = it
//
}
//
if (isRecreate) {
//
return
//
}
}
}
\ No newline at end of file
app/src/main/java/com/base/locationsharewhite/ui/locationmap/LocationMapActivity.kt
View file @
5aee5b23
...
...
@@ -70,9 +70,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
locationPresenter
=
LocationPresenter
(
this
,
lifecycleScope
)
if
(
isLanguageRecreate
(
MyApplication
.
locationMapLanguage
))
{
return
}
//
if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
//
return
//
}
val
mapFragment
=
supportFragmentManager
.
findFragmentById
(
R
.
id
.
map
)
as
SupportMapFragment
?
...
...
@@ -195,9 +195,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override
fun
initListener
()
{
super
.
initListener
()
if
(
isLanguageRecreate
(
MyApplication
.
locationMapLanguage
))
{
return
}
//
if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
//
return
//
}
onBackPressedDispatcher
.
addCallback
{
finishToMain
()
}
...
...
@@ -410,12 +410,12 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override
fun
onResume
()
{
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
locationMapLanguage
)
{
MyApplication
.
locationMapLanguage
=
it
}
if
(
isRecreate
)
{
return
}
//
val isRecreate = updateAppLanguage(MyApplication.locationMapLanguage) {
//
MyApplication.locationMapLanguage = it
//
}
//
if (isRecreate) {
//
return
//
}
StayJobService
.
getGoogleServiceLocationDelay
=
30
if
(!
checkLocationPermission
()
||
!
checkBackgroundLocationPermission
())
{
...
...
app/src/main/java/com/base/locationsharewhite/ui/main/MainActivity.kt
View file @
5aee5b23
...
...
@@ -64,9 +64,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
if
(
isLanguageRecreate
(
MyApplication
.
mainLanguage
))
{
return
}
//
if (isLanguageRecreate(MyApplication.mainLanguage)) {
//
return
//
}
mainPresenter
=
MainPresenter
(
this
)
actionId
=
intent
.
extras
?.
getInt
(
"actionId"
)
...
...
@@ -101,12 +101,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override
fun
onResume
()
{
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
mainLanguage
,
TAG
)
{
MyApplication
.
mainLanguage
=
it
}
if
(
isRecreate
)
{
return
}
//
val isRecreate = updateAppLanguage(MyApplication.mainLanguage, TAG) {
//
MyApplication.mainLanguage = it
//
}
//
if (isRecreate) {
//
return
//
}
mainPresenter
.
startLocationJob
(
lifecycleScope
)
showAllowAllTimeDialog
()
...
...
@@ -146,9 +146,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override
fun
initListener
()
{
super
.
initListener
()
if
(
isLanguageRecreate
(
MyApplication
.
mainLanguage
))
{
return
}
//
if (isLanguageRecreate(MyApplication.mainLanguage)) {
//
return
//
}
onBackPressedDispatcher
.
addCallback
{
showAppExitDialog
()
}
...
...
app/src/main/java/com/base/locationsharewhite/ui/set/LanguageActivity.kt
View file @
5aee5b23
...
...
@@ -85,12 +85,12 @@ class LanguageActivity : BaseActivity<ActivityLanguageBinding>() {
override
fun
onResume
()
{
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
setLanguage
,
TAG
)
{
MyApplication
.
setLanguage
=
it
}
if
(
isRecreate
)
{
return
}
//
val isRecreate = updateAppLanguage(MyApplication.setLanguage, TAG) {
//
MyApplication.setLanguage = it
//
}
//
if (isRecreate) {
//
return
//
}
}
}
\ No newline at end of file
app/src/main/java/com/base/locationsharewhite/ui/set/RenameActivity.kt
View file @
5aee5b23
...
...
@@ -151,12 +151,12 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
override
fun
onResume
()
{
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
renameLanguage
,
TAG
)
{
MyApplication
.
renameLanguage
=
it
}
if
(
isRecreate
)
{
return
}
//
val isRecreate = updateAppLanguage(MyApplication.renameLanguage, TAG) {
//
MyApplication.renameLanguage = it
//
}
//
if (isRecreate) {
//
return
//
}
}
}
\ No newline at end of file
app/src/main/java/com/base/locationsharewhite/ui/set/SettingActivity.kt
View file @
5aee5b23
...
...
@@ -62,12 +62,12 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
override
fun
onResume
()
{
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
settingsLanguage
,
TAG
)
{
MyApplication
.
settingsLanguage
=
it
}
if
(
isRecreate
)
{
return
}
//
val isRecreate = updateAppLanguage(MyApplication.settingsLanguage, TAG) {
//
MyApplication.settingsLanguage = it
//
}
//
if (isRecreate) {
//
return
//
}
LocationLoginUtils
.
login
()
LocationLoginUtils
.
loginCallBack
=
{
runOnUiThread
{
...
...
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