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
b0d61de4
Commit
b0d61de4
authored
Oct 18, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
8bac2198
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
75 additions
and
5 deletions
+75
-5
build.gradle.kts
app/build.gradle.kts
+8
-0
google-services.json
app/google-services.json
+29
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-0
MainActivity.kt
.../java/com/base/locationsharewhite/ui/main/MainActivity.kt
+5
-0
DialogView.kt
...n/java/com/base/locationsharewhite/ui/views/DialogView.kt
+11
-2
dialog_app_exit.xml
app/src/main/res/layout/dialog_app_exit.xml
+2
-2
dimens.xml
app/src/main/res/values/dimens.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
build.gradle.kts
build.gradle.kts
+3
-0
settings.gradle.kts
settings.gradle.kts
+6
-1
No files found.
app/build.gradle.kts
View file @
b0d61de4
plugins
{
alias
(
libs
.
plugins
.
androidApplication
)
alias
(
libs
.
plugins
.
jetbrainsKotlinAndroid
)
id
(
"com.google.gms.google-services"
)
id
(
"com.google.firebase.crashlytics"
)
}
android
{
...
...
@@ -61,4 +63,10 @@ dependencies {
implementation
(
"com.google.ads.mediation:facebook:6.17.0.0"
)
implementation
(
"com.google.ads.mediation:mintegral:16.7.21.0"
)
implementation
(
"com.google.ads.mediation:pangle:5.9.0.4.0"
)
//firebase
implementation
(
platform
(
"com.google.firebase:firebase-bom:32.3.1"
))
implementation
(
"com.google.firebase:firebase-messaging"
)
implementation
(
"com.google.firebase:firebase-analytics-ktx"
)
implementation
(
"com.google.firebase:firebase-crashlytics"
)
}
\ No newline at end of file
app/google-services.json
0 → 100644
View file @
b0d61de4
{
"project_info"
:
{
"project_number"
:
"953792647345"
,
"project_id"
:
"pdf-test-d0ae7"
,
"storage_bucket"
:
"pdf-test-d0ae7.appspot.com"
},
"client"
:
[
{
"client_info"
:
{
"mobilesdk_app_id"
:
"1:953792647345:android:c5234e8bfc859f8b20d290"
,
"android_client_info"
:
{
"package_name"
:
"com.base.locationsharewhite"
}
},
"oauth_client"
:
[],
"api_key"
:
[
{
"current_key"
:
"AIzaSyBT6B1oPmkojGX0TgBOI9bDkx5pdEFXWoo"
}
],
"services"
:
{
"appinvite_service"
:
{
"other_platform_oauth_client"
:
[]
}
}
}
],
"configuration_version"
:
"1"
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
b0d61de4
...
...
@@ -102,6 +102,14 @@
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<meta-data
android:name=
"com.google.android.gms.ads.APPLICATION_ID"
android:value=
"ca-app-pub-3940256099942544~3347511713"
/>
<meta-data
android:name=
"com.facebook.sdk.ApplicationId"
android:value=
"@string/facebook_app_id"
/>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/base/locationsharewhite/ui/main/MainActivity.kt
View file @
b0d61de4
...
...
@@ -5,6 +5,7 @@ import android.content.Intent
import
android.graphics.Color
import
android.os.Build
import
android.view.LayoutInflater
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.databinding.ActivityMainBinding
...
...
@@ -15,6 +16,7 @@ import com.base.locationsharewhite.map.MapUtils.getLastKnowLatLng
import
com.base.locationsharewhite.ui.howuse.HowUseActivity
import
com.base.locationsharewhite.ui.locationmap.LocationMapActivity
import
com.base.locationsharewhite.ui.set.SettingActivity
import
com.base.locationsharewhite.ui.views.DialogView.showAppExitDialog
import
com.base.locationsharewhite.utils.BarUtils
import
com.base.locationsharewhite.utils.LogEx
import
com.base.locationsharewhite.utils.PermissionUtils.checkLocationPermission
...
...
@@ -61,6 +63,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnMapReadyCallback {
override
fun
initListener
()
{
super
.
initListener
()
onBackPressedDispatcher
.
addCallback
{
showAppExitDialog
()
}
binding
.
llMapLocation
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
LocationMapActivity
::
class
.
java
))
}
...
...
app/src/main/java/com/base/locationsharewhite/ui/views/DialogView.kt
View file @
b0d61de4
package
com.base.locationsharewhite.ui.views
import
android.app.Activity
import
android.app.AlertDialog
import
android.content.Context
import
android.view.Gravity
...
...
@@ -29,7 +30,7 @@ object DialogView {
}
fun
Context
.
showAppExitDialog
()
{
fun
Activity
.
showAppExitDialog
()
{
val
dialog
=
AlertDialog
.
Builder
(
this
).
create
()
val
binding
=
DialogAppExitBinding
.
inflate
(
LayoutInflater
.
from
(
this
))
dialog
.
setView
(
binding
.
root
)
...
...
@@ -38,10 +39,18 @@ object DialogView {
dialog
.
show
()
val
params
=
dialog
.
window
?.
attributes
params
?.
width
=
resources
.
getDimensionPixelOffset
(
R
.
dimen
.
dp_3
75
)
params
?.
width
=
resources
.
getDimensionPixelOffset
(
R
.
dimen
.
dp_3
56
)
params
?.
height
=
LinearLayout
.
LayoutParams
.
WRAP_CONTENT
params
?.
gravity
=
Gravity
.
CENTER
dialog
.
window
?.
attributes
=
params
dialog
.
window
?.
setBackgroundDrawableResource
(
android
.
R
.
color
.
transparent
)
binding
.
tvCancel
.
setOnClickListener
{
dialog
.
dismiss
()
}
binding
.
tvQuit
.
setOnClickListener
{
dialog
.
dismiss
()
finish
()
}
}
}
\ No newline at end of file
app/src/main/res/layout/dialog_app_exit.xml
View file @
b0d61de4
...
...
@@ -52,13 +52,13 @@
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_
rate
"
android:id=
"@+id/tv_
quit
"
android:layout_width=
"134dp"
android:layout_height=
"48dp"
android:layout_marginStart=
"16dp"
android:background=
"@drawable/bg_f14b3f_10"
android:gravity=
"center"
android:text=
"@string/
rate
"
android:text=
"@string/
quit
"
android:textColor=
"@color/white"
android:textSize=
"20sp"
android:textStyle=
"bold"
/>
...
...
app/src/main/res/values/dimens.xml
View file @
b0d61de4
...
...
@@ -9,4 +9,5 @@
<dimen
name=
"dp_100"
>
100dp
</dimen>
<dimen
name=
"dp_200"
>
200dp
</dimen>
<dimen
name=
"dp_150"
>
150dp
</dimen>
<dimen
name=
"dp_356"
>
356dp
</dimen>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
b0d61de4
...
...
@@ -46,4 +46,6 @@
<string
name=
"cancel"
>
CANCEL
</string>
<string
name=
"rate"
>
RATE
</string>
<string
name=
"are_you_sure_you_want_to_exit_the_app"
>
Are you sure you want to\nexit the app?
</string>
<string
name=
"quit"
>
QUIT
</string>
<string
name=
"facebook_app_id"
>
123456789101112
</string>
</resources>
\ No newline at end of file
build.gradle.kts
View file @
b0d61de4
...
...
@@ -2,4 +2,7 @@
plugins
{
alias
(
libs
.
plugins
.
androidApplication
)
apply
false
alias
(
libs
.
plugins
.
jetbrainsKotlinAndroid
)
apply
false
id
(
"com.google.gms.google-services"
)
version
"4.4.1"
apply
false
id
(
"com.google.firebase.crashlytics"
)
version
"3.0.2"
apply
false
}
\ No newline at end of file
settings.gradle.kts
View file @
b0d61de4
...
...
@@ -16,7 +16,12 @@ dependencyResolutionManagement {
repositories
{
google
()
mavenCentral
()
maven
(
uri
(
"https://s01.oss.sonatype.org/content/groups/public"
))
maven
(
"https://s01.oss.sonatype.org/content/groups/public"
)
maven
(
"https://jitpack.io"
)
maven
(
"https://android-sdk.is.com"
)
maven
(
"https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea"
)
maven
(
"https://artifact.bytedance.com/repository/pangle"
)
maven
(
"https://dl-maven-android.mintegral.com/repository/se_sdk_for_android/"
)
}
}
...
...
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