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
8f12c68e
Commit
8f12c68e
authored
Apr 16, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新小满科技
parent
171b3485
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
60 deletions
+36
-60
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+3
-1
XmManager.kt
...pp/src/main/java/com/mints/goodmoney/manager/XmManager.kt
+5
-2
XiaomanActivity.kt
.../java/com/mints/goodmoney/ui/activitys/XiaomanActivity.kt
+11
-7
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+2
-1
activity_layout_xiaoman.xml
...Money/app/src/main/res/layout/activity_layout_xiaoman.xml
+15
-22
activity_layout_xiaoman2.xml
...oney/app/src/main/res/layout/activity_layout_xiaoman2.xml
+0
-27
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
8f12c68e
...
...
@@ -5,6 +5,7 @@ import com.mints.goodmoney.manager.UserManager
object
Constant
{
/**
* 首次弹出权限声明
*/
...
...
@@ -89,6 +90,7 @@ object Constant {
const
val
MAIN_CUR_COIN
=
"main_cur_coin"
//当前金币展示
const
val
MAIN_EXTRA_ID
=
"main_extra_id"
//额外ID
const
val
MAIN_CARRIER_TYPE
=
"main_carrier_type"
//载体
const
val
MAIN_CARRIER_TITLE
=
"main_carrier_title"
//载体
const
val
MAIN_AID
=
"main_aid"
// 体验安装过APP的aid
...
...
@@ -183,7 +185,7 @@ object Constant {
// 热门活动类型
//小满
const
val
HOT_ACTIVITY_SHEEP
=
"TO_XMKJ"
const
val
HOT_ACTIVITY_SHEEP
=
"TO_XMKJ"
const
val
HOT_ACTIVITY_WATER
=
"water"
const
val
HOT_ACTIVITY_WALK
=
"walk"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/XmManager.kt
View file @
8f12c68e
package
com.mints.goodmoney.manager
import
android.app.Application
import
android.text.TextUtils
import
android.util.Log
import
android.view.View
import
android.widget.ImageView
...
...
@@ -40,7 +41,7 @@ object XmManager {
}
fun
loadMater
(
placeid
:
String
)
{
if
(
placeMateId
.
equals
(
""
))
{
if
(
TextUtils
.
isEmpty
(
placeMateId
))
{
val
tm
:
MaterialTm
by
lazy
{
MaterialTm
()
}
tm
!!
.
loadMaterialData
(
UserManager
.
getInstance
().
userID
,
placeid
,
object
:
MaterialTm
.
Callback
{
//对应PlaceID会有对应的素材
...
...
@@ -57,6 +58,8 @@ object XmManager {
})
}
else
{
AdSdk
.
exposure
(
UserManager
.
getInstance
().
userID
,
placeid
,
placeMateId
,
materialId
);
LogUtil
.
d
(
"******exposure*********${UserManager.getInstance().userID}******$placeMateId********$materialId****************$placeid**"
)
}
}
...
...
@@ -67,7 +70,7 @@ object XmManager {
*/
fun
exprotClick
(
placeid
:
String
)
{
AdSdk
.
click
(
UserManager
.
getInstance
().
userID
,
placeid
,
materialId
,
materialId
);
Log
.
d
(
"loadMater"
,
"******exprotClick*******${UserManager.getInstance().userID}*******$placeMateId********$materialId******$placeid"
)
Log
Util
.
d
(
"******exprotClick*******${UserManager.getInstance().userID}*******$placeMateId********$materialId******$placeid"
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/XiaomanActivity.kt
View file @
8f12c68e
...
...
@@ -31,17 +31,17 @@ import com.qq.e.ads.nativ.express2.NativeExpressADData2
import
com.qq.e.ads.rewardvideo.RewardVideoAD
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
import
com.qq.e.comm.util.AdError
import
kotlinx.android.synthetic.main.activity_layout_xiaoman2.*
import
kotlinx.android.synthetic.main.activity_layout_xiaoman.*
import
kotlinx.android.synthetic.main.header_layout.*
class
XiaomanActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
carrierType
=
""
//传入载体
private
var
carrierType_title
=
""
//传入载体
private
var
isPlaySuccess
=
false
private
var
rewardVideoAD
:
RewardVideoAD
?
=
null
private
var
unifiedBannerView
:
UnifiedBannerView
?
=
null
private
val
TAG
=
"XiaomanActivity
2
"
private
val
TAG
=
"XiaomanActivity"
private
val
campaignFragment
:
CampaignFragment
?
=
null
private
var
mttRewardVideoAd
:
TTRewardVideoAd
?
=
null
...
...
@@ -54,16 +54,20 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
override
fun
getContentViewLayoutID
():
Int
{
return
R
.
layout
.
activity_layout_xiaoman
2
return
R
.
layout
.
activity_layout_xiaoman
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
carrierType
=
it
.
getString
(
Constant
.
MAIN_CARRIER_TYPE
,
""
)
carrierType_title
=
it
.
getString
(
Constant
.
MAIN_CARRIER_TITLE
,
""
)
}
}
override
fun
initViewsAndEvents
()
{
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
tv_title
.
text
=
carrierType_title
initListener
()
/**
* CampaignFragment.newInstance("这里为userId")
...
...
@@ -128,7 +132,7 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
}
private
fun
initListener
()
{
iv
XiaomanBack
.
setOnClickListener
(
this
)
iv
_left_icon
.
setOnClickListener
(
this
)
}
/**
...
...
@@ -541,7 +545,7 @@ class XiaomanActivity : BaseActivity(), View.OnClickListener {
override
fun
onClick
(
v
:
View
)
{
when
(
v
.
id
)
{
R
.
id
.
iv
XiaomanBack
->
{
R
.
id
.
iv
_left_icon
->
{
finish
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
8f12c68e
...
...
@@ -245,7 +245,7 @@ class MyFragment : BaseFragment(),
// 生成热门活动数据
private
fun
generateGridData
(
data
:
List
<
BannerBean
.
ListBean
>)
{
val
inflater
=
LayoutInflater
.
from
(
mContext
)
for
(
i
in
0
until
data
.
size
)
{
for
(
i
in
0
..
data
.
size
-
1
)
{
if
(
data
.
get
(
i
).
toUrl
.
equals
(
Constant
.
HOT_ACTIVITY_SHEEP
))
{
XmManager
.
loadMater
(
data
.
get
(
i
).
xmPlaceId
)
break
...
...
@@ -949,6 +949,7 @@ class MyFragment : BaseFragment(),
Constant
.
HOT_ACTIVITY_SHEEP
->
{
XmManager
.
exprotClick
(
hotBean
.
xmPlaceId
)
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TITLE
,
hotBean
.
title
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
hotBean
.
xmPlaceId
)
readyGo
(
XiaomanActivity
::
class
.
java
,
bundle
)
}
...
...
GoodMoney/app/src/main/res/layout/activity_layout_xiaoman.xml
View file @
8f12c68e
...
...
@@ -2,31 +2,24 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"vertical"
android:paddingStart=
"10dp"
android:paddingEnd=
"0dp"
>
android:background=
"@color/white"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/btn_full2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:onClick=
"openPage"
android:text=
"打开活动"
/>
<Button
android:id=
"@+id/btn_full"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:onClick=
"loadMater"
android:text=
"加载素材"
/>
<include
android:id=
"@+id/layoutWrapper"
layout=
"@layout/header_layout"
/>
<FrameLayout
android:id=
"@+id/frame_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<ImageView
android:id=
"@+id/imageView"
tools:srcCompat=
"@tools:sample/avatars"
<FrameLayout
android:id=
"@+id/bannerContainer"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"exprotClick"
/>
android:layout_centerInParent=
"true"
></FrameLayout>
</LinearLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/layout/activity_layout_xiaoman2.xml
deleted
100644 → 0
View file @
171b3485
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<FrameLayout
android:id=
"@+id/frame_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"-10dp"
></FrameLayout>
<ImageView
android:id=
"@+id/ivXiaomanBack"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:padding=
"15dp"
android:src=
"@drawable/yl_mp_ic_back_left"
/>
<FrameLayout
android:id=
"@+id/bannerContainer"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
></FrameLayout>
</RelativeLayout>
\ 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