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
a8cb22bc
Commit
a8cb22bc
authored
Dec 12, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
77ab198d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-0
BaseActivity.kt
...n/java/com/base/locationsharewhite/helper/BaseActivity.kt
+1
-1
MainActivity.kt
.../java/com/base/locationsharewhite/ui/main/MainActivity.kt
+5
-3
SplashActivity.kt
...a/com/base/locationsharewhite/ui/splash/SplashActivity.kt
+1
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
a8cb22bc
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
<activity
<activity
android:name=
".ui.main.MainActivity"
android:name=
".ui.main.MainActivity"
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
...
...
app/src/main/java/com/base/locationsharewhite/helper/BaseActivity.kt
View file @
a8cb22bc
...
@@ -112,7 +112,7 @@ abstract class BaseActivity<T : ViewBinding> : AppCompatActivity() {
...
@@ -112,7 +112,7 @@ abstract class BaseActivity<T : ViewBinding> : AppCompatActivity() {
//需要设置启动模式,避免AndroidManifest.xml设置singleTop启动模式导致重复启动不生效
//需要设置启动模式,避免AndroidManifest.xml设置singleTop启动模式导致重复启动不生效
//这种方式如果设置了singleTop或者singleTask的,再次回到该activity无法改变于语言,因为还在堆栈里没有重新创建
//这种方式如果设置了singleTop或者singleTask的,再次回到该activity无法改变于语言,因为还在堆栈里没有重新创建
needRecreate
()
needRecreate
()
if
(
false
)
{
if
(
needRecreate
()
)
{
LogEx
.
logDebug
(
TAG
,
"changeLanguage recreate"
)
LogEx
.
logDebug
(
TAG
,
"changeLanguage recreate"
)
recreate
()
recreate
()
}
else
{
}
else
{
...
...
app/src/main/java/com/base/locationsharewhite/ui/main/MainActivity.kt
View file @
a8cb22bc
...
@@ -3,6 +3,7 @@ package com.base.locationsharewhite.ui.main
...
@@ -3,6 +3,7 @@ package com.base.locationsharewhite.ui.main
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
androidx.activity.addCallback
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
androidx.core.view.updatePadding
...
@@ -50,17 +51,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
...
@@ -50,17 +51,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
private
var
actionId
:
Int
?
=
null
private
var
actionId
:
Int
?
=
null
override
fun
initView
()
{
override
fun
initView
()
{
LogEx
.
logDebug
(
TAG
,
"initView"
)
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
val
recreated
=
changeLanguage
(
this
)
val
recreated
=
changeLanguage
(
this
,
intent
.
extras
?:
Bundle
()
)
if
(
recreated
)
return
if
(
recreated
)
return
mainPresenter
=
MainPresenter
(
this
)
mainPresenter
=
MainPresenter
(
this
)
actionId
=
intent
.
extras
?.
getInt
(
"actionId"
)
actionId
=
intent
.
extras
?.
getInt
(
"actionId"
)
// LogEx.logDebug(TAG, "initView actionId=$actionId", true)
val
where
=
intent
.
extras
?.
getString
(
"where"
)
LogEx
.
logDebug
(
TAG
,
"initView actionId=$actionId where=$where"
,
true
)
//
//
// val flag1 = checkLocationPermission()
// val flag1 = checkLocationPermission()
// val flag2 = checkBackgroundLocationPermission()
// val flag2 = checkBackgroundLocationPermission()
...
...
app/src/main/java/com/base/locationsharewhite/ui/splash/SplashActivity.kt
View file @
a8cb22bc
...
@@ -162,6 +162,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
...
@@ -162,6 +162,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
else
->
{
else
->
{
startActivity
(
Intent
(
this
,
MainActivity
::
class
.
java
).
apply
{
startActivity
(
Intent
(
this
,
MainActivity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
actionId
)
putExtra
(
"actionId"
,
actionId
)
putExtra
(
"where"
,
"actionId else"
)
})
})
}
}
...
...
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