Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
30ae1db2
Commit
30ae1db2
authored
Jan 28, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化umeng bug
parent
8efd08e8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
16 deletions
+36
-16
build.gradle
GoodMoney/app/build.gradle
+2
-2
DownloadApkManager.kt
...in/java/com/mints/goodmoney/manager/DownloadApkManager.kt
+18
-10
CpdService.java
...app/src/main/java/com/mints/goodmoney/net/CpdService.java
+1
-1
WzFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/WzFragment.kt
+8
-0
dialog_task.xml
GoodMoney/app/src/main/res/layout/dialog_task.xml
+2
-1
fragment_main_wz.xml
GoodMoney/app/src/main/res/layout/fragment_main_wz.xml
+5
-2
No files found.
GoodMoney/app/build.gradle
View file @
30ae1db2
...
@@ -9,8 +9,8 @@ android {
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.mints.goodmoney"
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
6
versionCode
1
7
versionName
"1.1.
5
"
versionName
"1.1.
6
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/DownloadApkManager.kt
View file @
30ae1db2
...
@@ -104,10 +104,13 @@ object DownloadApkManager {
...
@@ -104,10 +104,13 @@ object DownloadApkManager {
PRDownloader
.
download
(
url
,
cachePath
,
apkName
)
PRDownloader
.
download
(
url
,
cachePath
,
apkName
)
.
build
()
.
build
()
.
setOnProgressListener
{
progress
->
.
setOnProgressListener
{
progress
->
if
(!
activity
!!
.
isFinishing
())
{
downloadProgressDialog
?.
setProgress
(
progress
)
downloadProgressDialog
?.
setProgress
(
progress
)
}
}
}
.
start
(
object
:
OnDownloadListener
{
.
start
(
object
:
OnDownloadListener
{
override
fun
onDownloadComplete
()
{
override
fun
onDownloadComplete
()
{
if
(!
activity
!!
.
isFinishing
())
{
downloadProgressDialog
?.
dismiss
()
downloadProgressDialog
?.
dismiss
()
try
{
try
{
mDownloadListener
?.
onDownloadSuccess
(
cachePath
+
apkName
)
mDownloadListener
?.
onDownloadSuccess
(
cachePath
+
apkName
)
...
@@ -117,11 +120,14 @@ object DownloadApkManager {
...
@@ -117,11 +120,14 @@ object DownloadApkManager {
e
.
printStackTrace
()
e
.
printStackTrace
()
}
}
}
}
}
override
fun
onError
(
error
:
Error
)
{
override
fun
onError
(
error
:
Error
)
{
if
(!
activity
!!
.
isFinishing
())
{
downloadProgressDialog
?.
dismiss
()
downloadProgressDialog
?.
dismiss
()
CacheUtil
.
clearAllCache
(
context
)
CacheUtil
.
clearAllCache
(
context
)
}
}
}
})
})
}
}
...
@@ -213,6 +219,8 @@ object DownloadApkManager {
...
@@ -213,6 +219,8 @@ object DownloadApkManager {
this
.
downloadProgressDialog
=
null
this
.
downloadProgressDialog
=
null
this
.
mDownloadListener
=
null
this
.
mDownloadListener
=
null
this
.
activity
=
null
this
.
activity
=
null
PRDownloader
.
cancelAll
()
}
}
fun
setOnMyDownloadListener
(
onMyDownloadListener
:
OnMyDownloadListener
?)
{
fun
setOnMyDownloadListener
(
onMyDownloadListener
:
OnMyDownloadListener
?)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/net/CpdService.java
View file @
30ae1db2
...
@@ -26,7 +26,7 @@ import rx.Observable;
...
@@ -26,7 +26,7 @@ import rx.Observable;
*/
*/
public
interface
CpdService
{
public
interface
CpdService
{
String
CPD_IP
=
"http://api.musesmobi.com:8111/api/cpd/1/detail/default/"
;
//测试
String
CPD_IP
=
"http://api.musesmobi.com:8111/api/cpd/1/detail/default/"
;
/**
/**
* 请求广告
* 请求广告
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/WzFragment.kt
View file @
30ae1db2
...
@@ -2,6 +2,7 @@ package com.mints.goodmoney.ui.fragment
...
@@ -2,6 +2,7 @@ package com.mints.goodmoney.ui.fragment
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.View
import
android.webkit.*
import
android.webkit.*
import
cn.sharesdk.framework.Platform
import
cn.sharesdk.framework.Platform
import
cn.sharesdk.framework.PlatformActionListener
import
cn.sharesdk.framework.PlatformActionListener
...
@@ -17,6 +18,7 @@ import com.mints.goodmoney.mvp.views.BaseView
...
@@ -17,6 +18,7 @@ import com.mints.goodmoney.mvp.views.BaseView
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.goodmoney.utils.ToastUtil
import
kotlinx.android.synthetic.main.fragment_main_wz.*
import
kotlinx.android.synthetic.main.fragment_main_wz.*
import
kotlinx.android.synthetic.main.header_layout.*
import
java.lang.StringBuilder
import
java.lang.StringBuilder
import
java.util.HashMap
import
java.util.HashMap
...
@@ -33,7 +35,13 @@ class WzFragment : BaseFragment(), BaseView {
...
@@ -33,7 +35,13 @@ class WzFragment : BaseFragment(), BaseView {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_wz
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_wz
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
tv_title
.
text
=
"新闻分享"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
iv_left_icon
.
setOnClickListener
{
blTurntableWebview
.
goBack
()
}
}
}
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
...
...
GoodMoney/app/src/main/res/layout/dialog_task.xml
View file @
30ae1db2
...
@@ -61,7 +61,8 @@
...
@@ -61,7 +61,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:gravity=
"center_horizontal"
/>
android:gravity=
"center_horizontal"
android:lines=
"2"
/>
</LinearLayout>
</LinearLayout>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_wz.xml
View file @
30ae1db2
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
Frame
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:orientation=
"vertical"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<include
layout=
"@layout/header_layout"
/>
<WebView
<WebView
android:id=
"@+id/blTurntableWebview"
android:id=
"@+id/blTurntableWebview"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:background=
"@color/black"
android:background=
"@color/black"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
</
Frame
Layout>
</
Linear
Layout>
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