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
4ec161d4
Commit
4ec161d4
authored
Dec 07, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
646724d8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
8 deletions
+24
-8
BannerManager.kt
.../main/java/com/mints/goodmoney/ad/banner/BannerManager.kt
+5
-2
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+1
-1
LoginPresenter.kt
...java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
+1
-1
AboutusActivity.kt
.../java/com/mints/goodmoney/ui/activitys/AboutusActivity.kt
+9
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+2
-2
activity_aboutus.xml
GoodMoney/app/src/main/res/layout/activity_aboutus.xml
+1
-0
fragment_main_my.xml
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
+5
-2
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/banner/BannerManager.kt
View file @
4ec161d4
...
...
@@ -7,6 +7,7 @@ import com.bytedance.sdk.openadsdk.TTAdNative
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.utils.LogUtil
/**
* banner管理
...
...
@@ -30,7 +31,7 @@ object BannerManager {
.
setSupportDeepLink
(
true
)
.
setAdCount
(
1
)
//请求广告数量为1到3条
.
setExpressViewAcceptedSize
(
viewWidth
,
viewHeight
)
//期望模板广告view的size,单位dp
.
setImageAcceptedSize
(
640
,
320
)
//这个参数设置即可,不影响模板广告的size
.
setImageAcceptedSize
(
viewWidth
.
toInt
(),
viewHeight
.
toInt
()
)
//这个参数设置即可,不影响模板广告的size
.
build
()
it
.
loadBannerExpressAd
(
adSlot
,
object
:
TTAdNative
.
NativeExpressAdListener
{
override
fun
onNativeExpressAdLoad
(
ads
:
MutableList
<
TTNativeExpressAd
>?)
{
...
...
@@ -42,7 +43,8 @@ object BannerManager {
}
override
fun
onError
(
code
:
Int
,
msg
:
String
)
{
frameLayout
?.
removeAllViews
()
LogUtil
.
d
(
"BannerManager"
,
"onError code:${code} msg:${msg}"
)
// frameLayout?.removeAllViews()
}
})
}
...
...
@@ -61,6 +63,7 @@ object BannerManager {
override
fun
onRenderSuccess
(
view
:
View
,
p1
:
Float
,
p2
:
Float
)
{
frameLayout
?.
let
{
it
.
visibility
=
View
.
VISIBLE
it
.
removeAllViews
()
it
.
addView
(
view
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
4ec161d4
...
...
@@ -17,7 +17,7 @@ public class TtCsjAdManager {
public
static
final
String
TT_AD_NAME
=
Constant
.
MINTS_APP_NAME
;
/*banner*/
public
static
final
String
TT_AD_BANNER_MY
=
"9456
53342
"
;
// 个人中心
public
static
final
String
TT_AD_BANNER_MY
=
"9456
61050
"
;
// 个人中心
/*激励视频*/
public
static
final
String
TT_AD_VEDIO_MAIN_DEV
=
"945561938"
;
// 开发使用
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
View file @
4ec161d4
...
...
@@ -49,7 +49,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
val
message
:
String
=
baseResponse
.
getMessage
()
when
(
code
)
{
200
->
{
view
.
sendCodeSuc
()
}
else
->
{
view
.
showToast
(
message
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AboutusActivity.kt
View file @
4ec161d4
...
...
@@ -2,9 +2,13 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.view.View
import
android.view.View.OnLongClickListener
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.ConstantUtil
import
kotlinx.android.synthetic.main.activity_aboutus.*
import
kotlinx.android.synthetic.main.header_layout.*
...
...
@@ -26,6 +30,11 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
ivAboutasIcon
.
setOnLongClickListener
(
OnLongClickListener
{
ToastUtil
.
showLong
(
context
,
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
))
true
})
initListener
()
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
4ec161d4
...
...
@@ -160,18 +160,18 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 防止banner刷新太快
if
(
AntiShake
.
check
(
fl_my_banner
?.
id
))
return
BannerManager
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
fl_my_banner
,
560f
,
16
0f
)
BannerManager
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
fl_my_banner
,
600f
,
50
0f
)
}
}
override
fun
onDestroyView
()
{
fl_my_banner
?.
removeAllViews
()
item_clock_signview
.
onDestory
()
super
.
onDestroyView
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
fl_my_banner
?.
removeAllViews
()
BxmManager
.
onDestory
()
BannerManager
.
onDestroy
()
myPresenter
.
detachView
()
...
...
GoodMoney/app/src/main/res/layout/activity_aboutus.xml
View file @
4ec161d4
...
...
@@ -30,6 +30,7 @@
android:textSize=
"13sp"
/>
<ImageView
android:id=
"@+id/ivAboutasIcon"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center_horizontal"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
View file @
4ec161d4
...
...
@@ -40,8 +40,11 @@
<FrameLayout
android:id=
"@+id/fl_my_banner"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
/>
android:layout_height=
"280dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginLeft=
"4dp"
android:layout_marginRight=
"4dp"
android:visibility=
"gone"
/>
<include
layout=
"@layout/item_fragment_main_my_promotions"
/>
...
...
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