Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
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
王雪伟
xxsq
Commits
358761de
Commit
358761de
authored
Nov 17, 2022
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改大图关闭功能
parent
0d0a6abd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
15 deletions
+58
-15
version.properties
app/version.properties
+2
-2
UserCenterFragment.kt
...n/java/com/zxbw/modulemain/fragment/UserCenterFragment.kt
+38
-3
fragment_layout_user_center.xml
...eMain/src/main/res/layout/fragment_layout_user_center.xml
+11
-8
CSJAdManager.kt
...ZxAd/src/main/java/com/zx/ad/platform/csj/CSJAdManager.kt
+7
-2
No files found.
app/version.properties
View file @
358761de
PACKAGE_NAME
=
com.zxhl.economize
VERSION_CODE
=
4
VERSION_NAME
=
1.0.3
\ No newline at end of file
VERSION_CODE
=
5
VERSION_NAME
=
1.0.4
\ No newline at end of file
moduleMain/src/main/java/com/zxbw/modulemain/fragment/UserCenterFragment.kt
View file @
358761de
package
com.zxbw.modulemain.fragment
import
android.content.Intent
import
android.net.Uri
import
android.text.TextUtils
import
android.util.Log
import
android.view.View
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.resource.bitmap.CircleCrop
import
com.bumptech.glide.request.RequestOptions
import
com.bytedance.sdk.openadsdk.TTAdDislike.DislikeInteractionCallback
import
com.bytedance.sdk.openadsdk.TTAdNative
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.zx.ad.AdManager
...
...
@@ -24,10 +23,10 @@ import com.zxhl.cms.net.ApiClient
import
com.zxhl.cms.net.RxSchedulers
import
com.zxhl.cms.net.SettingPreference
import
com.zxhl.cms.net.callback.BaseObserver
import
com.zxhl.cms.pay.H5PayUtil
import
com.zxhl.cms.utils.*
import
kotlinx.android.synthetic.main.fragment_layout_user_center.*
/**
* Created by gaoleichao on 2019/3/12
*/
...
...
@@ -248,6 +247,7 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
if
(
p0
?.
isNotEmpty
()
==
true
)
{
id_fragment_user_ad_layout
?.
visibility
=
View
.
VISIBLE
mTTAd
=
p0
.
get
(
0
)
bindDislike
(
mTTAd
)
mTTAd
?.
setExpressInteractionListener
(
object
:
TTNativeExpressAd
.
ExpressAdInteractionListener
{
override
fun
onAdClicked
(
p0
:
View
?,
p1
:
Int
)
{
...
...
@@ -278,4 +278,39 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
})
}
}
/**
* 设置广告的不喜欢,开发者可自定义样式
* @param ad
* @param customStyle 是否自定义样式,true:样式自定义
*/
private
fun
bindDislike
(
ad
:
TTNativeExpressAd
?)
{
//使用默认模板中默认dislike弹出样式
ad
?.
setDislikeCallback
(
mActivity
,
object
:
DislikeInteractionCallback
{
override
fun
onShow
()
{}
override
fun
onSelected
(
position
:
Int
,
value
:
String
,
enforce
:
Boolean
)
{
// showToast("点击 $value")
id_fragment_user_ad_layout
.
removeAllViews
()
//用户选择不喜欢原因后,移除广告展示
if
(
enforce
)
{
// TToast.show(mContext, "模版Banner 穿山甲sdk强制将view关闭了")
}
}
override
fun
onCancel
()
{
// showToast("取消")
}
fun
onRefuse
()
{}
})
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
if
(
mTTAd
!=
null
)
{
mTTAd
?.
destroy
()
}
}
}
\ No newline at end of file
moduleMain/src/main/res/layout/fragment_layout_user_center.xml
View file @
358761de
...
...
@@ -221,9 +221,9 @@
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"16dp"
android:layout_marginRight=
"16dp"
android:visibility=
"gone"
android:background=
"@drawable/shape_ffffff_r10_s"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<LinearLayout
android:layout_width=
"0dp"
...
...
@@ -570,24 +570,27 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/id_tv_daili"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"16dp"
android:background=
"@color/white"
android:gravity=
"center"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
android:text=
"申请成为代理"
android:textColor=
"@color/color_333333"
android:background=
"@color/white"
android:textSize=
"14sp"
android:gravity=
"center"
android:text=
"申请成为代理"
/>
android:textSize=
"14sp"
/>
<RelativeLayout
android:id=
"@+id/id_fragment_user_ad_layout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"20dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"10dp"
android:background=
"@color/white"
android:gravity=
"center"
android:visibility=
"gone"
/>
...
...
moduleZxAd/src/main/java/com/zx/ad/platform/csj/CSJAdManager.kt
View file @
358761de
...
...
@@ -7,6 +7,7 @@ import android.util.Log
import
android.view.View
import
android.widget.FrameLayout
import
com.bytedance.sdk.openadsdk.*
import
com.bytedance.sdk.openadsdk.TTAdDislike.DislikeInteractionCallback
import
com.zx.ad.callback.AdLoadCallBack
import
com.zx.ad.callback.InterertionAdListener
import
com.zx.ad.callback.RewardVideoAdListener
...
...
@@ -336,7 +337,7 @@ object CSJAdManager {
splashAd
=
null
rewardVideoAd
=
null
}
private
var
mTTAd
:
TTNativeExpressAd
?
=
null
fun
requestByteDailyActiveBigImgFeed
(
codeId
:
String
,
expressViewWidth
:
Float
,
...
...
@@ -357,6 +358,8 @@ object CSJAdManager {
mTTAdNative
?.
loadNativeExpressAd
(
adSlot
,
object
:
TTAdNative
.
NativeExpressAdListener
{
override
fun
onNativeExpressAdLoad
(
p0
:
MutableList
<
TTNativeExpressAd
>?)
{
if
(
p0
!=
null
&&
p0
.
size
>
0
)
{
mTTAd
=
p0
[
0
]
// bindDislike(mTTAd, false)
callBack
.
onNativeExpressAdLoad
(
p0
)
}
else
{
callBack
?.
onError
(
1000
,
"没有拉取到广告"
)
...
...
@@ -369,4 +372,6 @@ object CSJAdManager {
}
})
}
}
\ No newline at end of file
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