Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold_pro
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_highgold_pro
Commits
46d9c269
Commit
46d9c269
authored
Mar 09, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug修复
parent
368c543e
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
71 additions
and
55 deletions
+71
-55
.gitignore
app/.gitignore
+3
-1
local.properties
app/local.properties
+1
-1
BannerManager.kt
.../main/java/com/mints/goldspace/ad/banner/BannerManager.kt
+16
-5
CoralDownload.java
...n/java/com/mints/goldspace/ad/download/CoralDownload.java
+1
-2
KsPreLoadExpressManager.kt
...com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
+9
-4
KsManager.kt
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
+1
-1
TzManager.kt
app/src/main/java/com/mints/goldspace/manager/TzManager.kt
+0
-2
MainFragment.kt
...main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
+4
-4
MyFragment.kt
...c/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
+21
-6
PanFragment.kt
.../main/java/com/mints/goldspace/ui/fragment/PanFragment.kt
+1
-3
activity_aboutus.xml
app/src/main/res/layout/activity_aboutus.xml
+1
-1
activity_award.xml
app/src/main/res/layout/activity_award.xml
+3
-12
fragment_main_my.xml
app/src/main/res/layout/fragment_main_my.xml
+3
-2
fragment_main_pan.xml
app/src/main/res/layout/fragment_main_pan.xml
+5
-9
item_fragment_main_my_task.xml
app/src/main/res/layout/item_fragment_main_my_task.xml
+1
-1
local.properties
local.properties
+1
-1
No files found.
app/.gitignore
View file @
46d9c269
/build
mapping.txt
seeds.txt
unused.txt
\ No newline at end of file
unused.txt
local.properties
\ No newline at end of file
app/local.properties
View file @
46d9c269
...
...
@@ -5,4 +5,4 @@
# For customization when using a Version Control System, please read the
# header note.
#Mon Oct 14 10:16:31 CST 2019
sdk.dir
=
/Users/
mcg
/Library/Android/sdk
sdk.dir
=
/Users/
Hello
/Library/Android/sdk
app/src/main/java/com/mints/goldspace/ad/banner/BannerManager.kt
View file @
46d9c269
...
...
@@ -8,7 +8,6 @@ import com.bytedance.sdk.openadsdk.TTNativeExpressAd
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.manager.TtCsjAdManager
import
com.mints.goldspace.utils.LogUtil
import
com.mints.goldspace.utils.ToastUtil
/**
* banner管理
...
...
@@ -25,16 +24,28 @@ object BannerManager {
TtCsjAdManager
.
get
().
requestPermissionIfNecessary
(
MintsApplication
.
getContext
())
}
/**
* 获取view宽高
*/
private
fun
getViewWidth
():
Float
{
val
displayMetrics
=
MintsApplication
.
getContext
().
resources
.
displayMetrics
val
density
=
displayMetrics
.
density
// 屏幕宽度 - margin宽度
val
pxWidth
=
displayMetrics
.
widthPixels
-
(
20
*
density
+
0.5f
)
return
pxWidth
/
density
+
0.5f
}
/**
* 获取穿山甲banner
*/
fun
getTtBanner
(
codeId
:
String
,
frameLayout
:
FrameLayout
?)
{
var
expressViewAcceptedSizeWidth
=
380f
var
expressViewAcceptedSizeHeight
=
280f
var
expressViewAcceptedSizeWidth
=
getViewWidth
()
var
expressViewAcceptedSizeHeight
=
0f
when
(
codeId
)
{
TtCsjAdManager
.
TT_AD_BANNER_MY
->
{
expressViewAcceptedSizeWidth
=
380f
expressViewAcceptedSizeHeight
=
28
0f
expressViewAcceptedSizeWidth
=
getViewWidth
()
expressViewAcceptedSizeHeight
=
0f
}
}
...
...
app/src/main/java/com/mints/goldspace/ad/download/CoralDownload.java
View file @
46d9c269
...
...
@@ -2,7 +2,6 @@ package com.mints.goldspace.ad.download;
import
androidx.annotation.Nullable
;
import
com.mints.goldspace.BuildConfig
;
import
com.mints.goldspace.MintsApplication
;
import
com.mints.goldspace.common.Constant
;
import
com.mints.goldspace.manager.UserManager
;
...
...
@@ -117,7 +116,7 @@ public final class CoralDownload {
@Override
public
void
onAdFailed
(
ADError
adError
)
{
super
.
onAdFailed
(
adError
);
LogUtil
.
d
(
"onAdFailed
"
);
LogUtil
.
d
(
"onAdFailed
-> "
+
adError
.
description
);
if
(
mOnAdLoadListener
!=
null
)
{
mOnAdLoadListener
.
onLoadFail
();
}
...
...
app/src/main/java/com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
View file @
46d9c269
...
...
@@ -17,7 +17,6 @@ import com.mints.goldspace.manager.KsManager
import
com.mints.goldspace.utils.LogUtil
import
java.util.*
import
com.mints.goldspace.R
import
com.mints.library.utils.json.JsonUtil
/**
* 快手预加载信息流
...
...
@@ -90,6 +89,7 @@ object KsPreLoadExpressManager {
// 设置广告数据
bindCommonData
(
convertView
as
ViewGroup
,
videoViewHolder
,
ksNativeAd
)
ksNativeAd
.
setVideoPlayListener
(
object
:
VideoPlayListener
{
override
fun
onVideoPlayStart
()
{
}
...
...
@@ -98,14 +98,13 @@ object KsPreLoadExpressManager {
}
override
fun
onVideoPlayError
(
what
:
Int
,
extra
:
Int
)
{
LogUtil
.
d
(
what
)
}
})
// SDK默认渲染的视频view
val
videoPlayConfig
=
KsAdVideoPlayConfig
.
Builder
()
.
videoSoundEnable
(
true
)
// 有声播放
.
dataFlowAutoStart
(
tru
e
)
// 流量下自动播放
.
dataFlowAutoStart
(
fals
e
)
// 流量下自动播放
.
build
()
val
videoView
=
ksNativeAd
.
getVideoView
(
mContext
,
videoPlayConfig
)
if
(
videoView
!=
null
&&
videoView
.
parent
==
null
)
{
...
...
@@ -230,7 +229,13 @@ object KsPreLoadExpressManager {
Glide
.
with
(
MintsApplication
.
getContext
()).
load
(
ad
.
appIconUrl
).
into
(
adBaseViewHolder
.
mAppIcon
)
}
// app名称
adBaseViewHolder
.
mAppName
.
text
=
ad
.
appName
if
(!
TextUtils
.
isEmpty
(
ad
.
appName
))
{
adBaseViewHolder
.
mAppName
.
visibility
=
View
.
VISIBLE
adBaseViewHolder
.
mAppName
.
text
=
ad
.
appName
}
else
{
adBaseViewHolder
.
mAppName
.
visibility
=
View
.
GONE
}
// 广告描述
adBaseViewHolder
.
mAppDesc
.
text
=
ad
.
adDescription
// 广告转化文案
...
...
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
View file @
46d9c269
...
...
@@ -27,7 +27,7 @@ object KsManager {
.
appId
(
KS_APP_ID
)
// 测试aapId,请联系快⼿平台申请正式AppId,必填
.
appName
(
application
.
getString
(
R
.
string
.
app_name
))
// 测试appName,请填写您应⽤的名称,⾮必填
.
showNotification
(
true
)
// 是否展示下载通知栏
.
debug
(
tru
e
)
// 是否开启sdk 调试⽇志 可选
.
debug
(
fals
e
)
// 是否开启sdk 调试⽇志 可选
.
build
())
}
...
...
app/src/main/java/com/mints/goldspace/manager/TzManager.kt
View file @
46d9c269
...
...
@@ -25,8 +25,6 @@ object TzManager {
.
appSecret
(
APP_SECRET
)
.
appChannel
(
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
))
.
forTest
(
false
)
.
log
(
false
)
.
verbose
(
false
)
.
build
(),
object
:
IADEngineState
{
override
fun
onIdle
()
{}
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
View file @
46d9c269
...
...
@@ -171,7 +171,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 倒计时红包暂停
pauseDownloadTime
()
dest
or
yTimerRedbox
()
dest
ro
yTimerRedbox
()
littleVideoFragment
?.
onPause
()
if
(
isToCreateReward
)
{
...
...
@@ -655,14 +655,14 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
stopRedbox
()
dest
or
yTimerRedbox
()
dest
ro
yTimerRedbox
()
mRedBoxTimer
=
CountDownTimerSupport
(
time
*
1000
,
1000
)
rl_fragment_main_redbox
.
isClickable
=
false
mRedBoxTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
if
(
isAdded
&&
!
requireActivity
().
isFinishing
)
{
stopRedbox
()
//
stopRedbox()
tv_fragment_main_redbox
.
text
=
TimeRender
.
ms2MS
(
millisUntilFinished
.
toInt
())
}
}
...
...
@@ -683,7 +683,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
}
private
fun
dest
or
yTimerRedbox
()
{
private
fun
dest
ro
yTimerRedbox
()
{
mRedBoxTimer
?.
stop
()
mRedBoxTimer
=
null
}
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
View file @
46d9c269
...
...
@@ -12,6 +12,7 @@ import android.widget.AdapterView
import
android.widget.GridView
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.viewpager.widget.ViewPager
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.fly.scenemodule.SceneUtil
import
com.mints.goldspace.BuildConfig
...
...
@@ -262,11 +263,9 @@ class MyFragment : BaseFragment(),
piv_grid
.
setAnimationType
(
AnimationType
.
THIN_WORM
)
vp_grid
.
adapter
=
ViewPagerAdapter
(
pagerList
)
// vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
// override fun onPageScrollStateChanged(state: Int) {
// }
// override fun onPageScrollStateChanged(state: Int) {}
//
// override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
// }
// override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
//
// override fun onPageSelected(position: Int) {
// mCurrentIndex = position
...
...
@@ -865,8 +864,9 @@ class MyFragment : BaseFragment(),
// 热门活动
override
fun
onItemClick
(
parent
:
AdapterView
<
*
>,
view
:
View
,
position
:
Int
,
id
:
Long
)
{
if
(
hotList
!!
.
isNotEmpty
())
{
val
hotBean
:
BannerBean
.
ListBean
=
hotList
!!
[
position
]
if
(
hotList
.
isNotEmpty
())
{
val
hotBean
:
BannerBean
.
ListBean
=
hotList
[
position
+
(
mCurrentIndex
*
HOT_PAGE_SIZE
)]
if
(!
TextUtils
.
isEmpty
(
hotBean
.
toUrl
))
{
// 自有界面
...
...
@@ -1134,6 +1134,21 @@ class MyFragment : BaseFragment(),
item_title_friends
.
setOnClickListener
(
this
)
ll_my_login
.
setOnClickListener
(
this
)
item_customer_service
.
setOnClickListener
(
this
)
vp_grid
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{
}
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
}
override
fun
onPageSelected
(
position
:
Int
)
{
mCurrentIndex
=
position
piv_grid
.
selection
=
position
}
})
}
/**
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/PanFragment.kt
View file @
46d9c269
...
...
@@ -159,9 +159,7 @@ class PanFragment : BaseFragment(), PanView {
}
4
->
{
val
activity
:
MainActivity
?
=
activity
as
MainActivity
?
activity
?.
let
{
it
.
turnDayTask
()
}
activity
?.
turnDayTask
()
}
}
...
...
app/src/main/res/layout/activity_aboutus.xml
View file @
46d9c269
...
...
@@ -38,7 +38,7 @@
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"
match_par
ent"
>
android:layout_height=
"
wrap_cont
ent"
>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/activity_award.xml
View file @
46d9c269
...
...
@@ -170,21 +170,12 @@
</FrameLayout>
<FrameLayout
android:id=
"@+id/flAwardAd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"25dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"25dp"
android:background=
"@drawable/shape_bg_write"
>
<FrameLayout
android:id=
"@+id/flAwardAd"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/color_0000"
>
</FrameLayout>
</FrameLayout>
android:background=
"@drawable/shape_bg_award"
android:gravity=
"center"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_main_my.xml
View file @
46d9c269
...
...
@@ -45,8 +45,9 @@
android:id=
"@+id/fl_my_banner"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingStart=
"5dp"
android:paddingEnd=
"5dp"
android:layout_marginStart=
"12dp"
android:layout_marginEnd=
"12dp"
android:background=
"@drawable/shape_bg_award"
android:visibility=
"gone"
/>
<include
layout=
"@layout/item_divider_gray"
/>
...
...
app/src/main/res/layout/fragment_main_pan.xml
View file @
46d9c269
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<com.github.lzyzsd.jsbridge.BridgeWebView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/blTurntableWebview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.github.lzyzsd.jsbridge.BridgeWebView
android:id=
"@+id/blTurntableWebview"
android:layout_width=
"match_parent"
android:background=
"@color/black"
android:layout_height=
"match_parent"
/>
</FrameLayout>
android:layout_height=
"match_parent"
android:background=
"@color/black"
android:layerType=
"software"
/>
app/src/main/res/layout/item_fragment_main_my_task.xml
View file @
46d9c269
...
...
@@ -39,7 +39,7 @@
android:layout_width=
"260dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:textColor=
"@color/color_
ccc
"
android:textColor=
"@color/color_
AAA
"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/item_task_title"
/>
...
...
local.properties
View file @
46d9c269
...
...
@@ -5,4 +5,4 @@
# For customization when using a Version Control System, please read the
# header note.
#Mon Mar 08 19:40:55 CST 2021
sdk.dir
=
/Users/
mcg
/Library/Android/sdk
sdk.dir
=
/Users/
Hello
/Library/Android/sdk
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