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
...
@@ -9,8 +9,6 @@ import com.base.locationsharewhite.bean.ConstObject.appLanguageSp
import
com.base.locationsharewhite.bean.ConstObject.changeLanguageSp
import
com.base.locationsharewhite.bean.ConstObject.changeLanguageSp
import
com.base.locationsharewhite.ui.main.MainActivity
import
com.base.locationsharewhite.ui.main.MainActivity
import
com.base.locationsharewhite.utils.ActivityLauncher
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
()
{
abstract
class
BaseActivity
<
T
:
ViewBinding
>
:
AppCompatActivity
()
{
private
val
TAG
=
"BaseActivity"
private
val
TAG
=
"BaseActivity"
...
...
app/src/main/java/com/base/locationsharewhite/helper/MyApplication.kt
View file @
5aee5b23
...
@@ -29,13 +29,13 @@ class MyApplication : Application() {
...
@@ -29,13 +29,13 @@ class MyApplication : Application() {
lateinit
var
appContext
:
MyApplication
lateinit
var
appContext
:
MyApplication
var
splashLanguage
:
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 mainLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var
setLanguage
:
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 settingsLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var
howUseLanguage
:
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 renameLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var
locationMapLanguage
:
String
=
Locale
.
getDefault
().
language
+
"_"
+
Locale
.
getDefault
().
country
//
var locationMapLanguage: String = Locale.getDefault().language + "_" + Locale.getDefault().country
var
umpCanAd
:
Boolean
=
true
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>() {
...
@@ -22,8 +22,8 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
BarUtils
.
setStatusBarColor
(
this
,
Color
.
WHITE
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
WHITE
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
val
isRecreate
=
isLanguageRecreate
(
MyApplication
.
mainLanguage
)
//
val isRecreate = isLanguageRecreate(MyApplication.mainLanguage)
if
(
isRecreate
)
return
//
if (isRecreate) return
}
}
override
fun
initListener
()
{
override
fun
initListener
()
{
...
@@ -44,12 +44,12 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
...
@@ -44,12 +44,12 @@ class HowUseActivity : BaseActivity<ActivityHowUseBinding>() {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
howUseLanguage
,
TAG
)
{
//
val isRecreate = updateAppLanguage(MyApplication.howUseLanguage, TAG) {
MyApplication
.
howUseLanguage
=
it
//
MyApplication.howUseLanguage = it
}
//
}
if
(
isRecreate
)
{
//
if (isRecreate) {
return
//
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
...
@@ -70,9 +70,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
locationPresenter
=
LocationPresenter
(
this
,
lifecycleScope
)
locationPresenter
=
LocationPresenter
(
this
,
lifecycleScope
)
if
(
isLanguageRecreate
(
MyApplication
.
locationMapLanguage
))
{
//
if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
return
//
return
}
//
}
val
mapFragment
=
val
mapFragment
=
supportFragmentManager
.
findFragmentById
(
R
.
id
.
map
)
as
SupportMapFragment
?
supportFragmentManager
.
findFragmentById
(
R
.
id
.
map
)
as
SupportMapFragment
?
...
@@ -195,9 +195,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -195,9 +195,9 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override
fun
initListener
()
{
override
fun
initListener
()
{
super
.
initListener
()
super
.
initListener
()
if
(
isLanguageRecreate
(
MyApplication
.
locationMapLanguage
))
{
//
if (isLanguageRecreate(MyApplication.locationMapLanguage)) {
return
//
return
}
//
}
onBackPressedDispatcher
.
addCallback
{
onBackPressedDispatcher
.
addCallback
{
finishToMain
()
finishToMain
()
}
}
...
@@ -410,12 +410,12 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -410,12 +410,12 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
locationMapLanguage
)
{
//
val isRecreate = updateAppLanguage(MyApplication.locationMapLanguage) {
MyApplication
.
locationMapLanguage
=
it
//
MyApplication.locationMapLanguage = it
}
//
}
if
(
isRecreate
)
{
//
if (isRecreate) {
return
//
return
}
//
}
StayJobService
.
getGoogleServiceLocationDelay
=
30
StayJobService
.
getGoogleServiceLocationDelay
=
30
if
(!
checkLocationPermission
()
||
!
checkBackgroundLocationPermission
())
{
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 {
...
@@ -64,9 +64,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
if
(
isLanguageRecreate
(
MyApplication
.
mainLanguage
))
{
//
if (isLanguageRecreate(MyApplication.mainLanguage)) {
return
//
return
}
//
}
mainPresenter
=
MainPresenter
(
this
)
mainPresenter
=
MainPresenter
(
this
)
actionId
=
intent
.
extras
?.
getInt
(
"actionId"
)
actionId
=
intent
.
extras
?.
getInt
(
"actionId"
)
...
@@ -101,12 +101,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
...
@@ -101,12 +101,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
mainLanguage
,
TAG
)
{
//
val isRecreate = updateAppLanguage(MyApplication.mainLanguage, TAG) {
MyApplication
.
mainLanguage
=
it
//
MyApplication.mainLanguage = it
}
//
}
if
(
isRecreate
)
{
//
if (isRecreate) {
return
//
return
}
//
}
mainPresenter
.
startLocationJob
(
lifecycleScope
)
mainPresenter
.
startLocationJob
(
lifecycleScope
)
showAllowAllTimeDialog
()
showAllowAllTimeDialog
()
...
@@ -146,9 +146,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
...
@@ -146,9 +146,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override
fun
initListener
()
{
override
fun
initListener
()
{
super
.
initListener
()
super
.
initListener
()
if
(
isLanguageRecreate
(
MyApplication
.
mainLanguage
))
{
//
if (isLanguageRecreate(MyApplication.mainLanguage)) {
return
//
return
}
//
}
onBackPressedDispatcher
.
addCallback
{
onBackPressedDispatcher
.
addCallback
{
showAppExitDialog
()
showAppExitDialog
()
}
}
...
...
app/src/main/java/com/base/locationsharewhite/ui/set/LanguageActivity.kt
View file @
5aee5b23
...
@@ -85,12 +85,12 @@ class LanguageActivity : BaseActivity<ActivityLanguageBinding>() {
...
@@ -85,12 +85,12 @@ class LanguageActivity : BaseActivity<ActivityLanguageBinding>() {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
setLanguage
,
TAG
)
{
//
val isRecreate = updateAppLanguage(MyApplication.setLanguage, TAG) {
MyApplication
.
setLanguage
=
it
//
MyApplication.setLanguage = it
}
//
}
if
(
isRecreate
)
{
//
if (isRecreate) {
return
//
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>() {
...
@@ -151,12 +151,12 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
renameLanguage
,
TAG
)
{
//
val isRecreate = updateAppLanguage(MyApplication.renameLanguage, TAG) {
MyApplication
.
renameLanguage
=
it
//
MyApplication.renameLanguage = it
}
//
}
if
(
isRecreate
)
{
//
if (isRecreate) {
return
//
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>() {
...
@@ -62,12 +62,12 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
val
isRecreate
=
updateAppLanguage
(
MyApplication
.
settingsLanguage
,
TAG
)
{
//
val isRecreate = updateAppLanguage(MyApplication.settingsLanguage, TAG) {
MyApplication
.
settingsLanguage
=
it
//
MyApplication.settingsLanguage = it
}
//
}
if
(
isRecreate
)
{
//
if (isRecreate) {
return
//
return
}
//
}
LocationLoginUtils
.
login
()
LocationLoginUtils
.
login
()
LocationLoginUtils
.
loginCallBack
=
{
LocationLoginUtils
.
loginCallBack
=
{
runOnUiThread
{
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