Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
19ee3f02
Commit
19ee3f02
authored
Sep 27, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加滚动动画
parent
e13ce447
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
166 additions
and
15 deletions
+166
-15
build.gradle
video/app/build.gradle
+3
-2
InMoneyVideo.java
...main/java/com/duben/dayplaylet/ad/video/InMoneyVideo.java
+3
-0
InMoneyVideoNoPre.java
...java/com/duben/dayplaylet/ad/video/InMoneyVideoNoPre.java
+3
-0
TrackManager.java
.../main/java/com/duben/dayplaylet/manager/TrackManager.java
+6
-0
TrackPresenter.java
...a/com/duben/dayplaylet/mvp/presenters/TrackPresenter.java
+77
-0
MainFragment.kt
...ain/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
+1
-0
DrawAlipayDialog.kt
.../java/com/duben/dayplaylet/ui/widgets/DrawAlipayDialog.kt
+14
-7
WithDrawSucDialog.kt
...java/com/duben/dayplaylet/ui/widgets/WithDrawSucDialog.kt
+15
-2
ConsumerToastUtil.kt
...main/java/com/duben/dayplaylet/utils/ConsumerToastUtil.kt
+25
-1
dialog_draw_alipay.xml
video/app/src/main/res/layout/dialog_draw_alipay.xml
+2
-2
dialog_withdraw_suc.xml
video/app/src/main/res/layout/dialog_withdraw_suc.xml
+1
-1
toast_tip_layout.xml
video/app/src/main/res/layout/toast_tip_layout.xml
+16
-0
bg_tip_ad.png
video/app/src/main/res/mipmap-xhdpi/bg_tip_ad.png
+0
-0
No files found.
video/app/build.gradle
View file @
19ee3f02
...
...
@@ -12,8 +12,8 @@ android {
applicationId
"com.duben.dayplaylet"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
versionName
"1.0.
0
"
versionCode
2
versionName
"1.0.
1
"
flavorDimensions
"default"
// dex突破65535的限制
...
...
@@ -226,6 +226,7 @@ dependencies {
implementation
'com.airbnb.android:lottie:3.4.0'
// 跑马灯
implementation
'com.sunfusheng:MarqueeView:1.4.1'
implementation
"com.github.YvesCheung.RollingText:RollingText:1.3.0"
// 工具类
// BASE64Decoder接入
// 兼容奔溃问题-Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
...
...
video/app/src/main/java/com/duben/dayplaylet/ad/video/InMoneyVideo.java
View file @
19ee3f02
...
...
@@ -15,6 +15,7 @@ import com.duben.dayplaylet.ad.AdStatusListener;
import
com.duben.dayplaylet.common.AppConfig
;
import
com.duben.dayplaylet.common.Constant
;
import
com.duben.dayplaylet.manager.TrackManager
;
import
com.duben.dayplaylet.utils.ConsumerToastUtil
;
import
com.duben.dayplaylet.utils.LogUtil
;
import
com.duben.dayplaylet.utils.TimeRender
;
...
...
@@ -201,6 +202,8 @@ public class InMoneyVideo {
LogUtil
.
d
(
TAG
,
"gromore预加载 激励视频广告->onAdShow 触发预加载下次广告"
);
AdManager
.
Companion
.
getInstance
().
preLoadAd
(
weakActivity
.
get
(),
true
);
}
ConsumerToastUtil
.
showAdTip
(
weakActivity
.
get
());
}
@Override
...
...
video/app/src/main/java/com/duben/dayplaylet/ad/video/InMoneyVideoNoPre.java
View file @
19ee3f02
...
...
@@ -15,6 +15,7 @@ import com.duben.dayplaylet.ad.AdStatusListener;
import
com.duben.dayplaylet.common.AppConfig
;
import
com.duben.dayplaylet.common.Constant
;
import
com.duben.dayplaylet.manager.TrackManager
;
import
com.duben.dayplaylet.utils.ConsumerToastUtil
;
import
com.duben.dayplaylet.utils.LogUtil
;
import
java.lang.ref.WeakReference
;
...
...
@@ -141,6 +142,8 @@ public class InMoneyVideoNoPre {
LogUtil
.
d
(
TAG
,
"gromore实时加载 激励视频广告->onAdShow 触发预加载下次广告"
);
AdManager
.
Companion
.
getInstance
().
preLoadAd
(
weakActivity
.
get
(),
true
);
}
ConsumerToastUtil
.
showAdTip
(
weakActivity
.
get
());
}
@Override
...
...
video/app/src/main/java/com/duben/dayplaylet/manager/TrackManager.java
View file @
19ee3f02
...
...
@@ -56,6 +56,12 @@ public class TrackManager {
}
}
public
void
mainRiskinfo
()
{
if
(
trackPresenter
!=
null
)
{
trackPresenter
.
mainRiskinfo
(
4
);
}
}
public
void
commitVedio
(
VedioBean
data
)
{
if
(
trackPresenter
!=
null
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
...
...
video/app/src/main/java/com/duben/dayplaylet/mvp/presenters/TrackPresenter.java
View file @
19ee3f02
...
...
@@ -446,4 +446,81 @@ public class TrackPresenter extends BaseTrackPresenter {
}
});
}
public
void
mainRiskinfo
(
int
eventid
)
{
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
String
macAddress
=
deviceInfo
.
getMacAddress
();
if
(!
TextUtils
.
isEmpty
(
macAddress
))
{
String
mac
=
macAddress
.
replace
(
":"
,
""
);
vo
.
put
(
"mac"
,
mac
);
vo
.
put
(
"mac1"
,
macAddress
);
}
vo
.
put
(
"androidid"
,
deviceInfo
.
getAndroidId
(
null
));
vo
.
put
(
"imei"
,
deviceInfo
.
getIMEI
());
vo
.
put
(
"os"
,
deviceInfo
.
isHarmonyOS
()
?
"android-HarmonyOS"
:
"android"
);
vo
.
put
(
"model"
,
deviceInfo
.
getNewModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
().
getDeviceUuid
());
vo
.
put
(
"shumeiId"
,
ShumeiManager
.
getInstance
().
getShumeiDeviceId
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
vo
.
put
(
"eventid"
,
eventid
);
vo
.
put
(
"ischarge"
,
deviceInfo
.
isCharging
());
vo
.
put
(
"isusbdebug"
,
deviceInfo
.
getGetUsbStatus
());
vo
.
put
(
"iswifi"
,
deviceInfo
.
getGetWifiConnected
());
vo
.
put
(
"isroot"
,
deviceInfo
.
isRoot
());
vo
.
put
(
"isvpn"
,
deviceInfo
.
isVPN
());
vo
.
put
(
"memory"
,
deviceInfo
.
getTotalMemory
()
+
"+"
+
deviceInfo
.
getTotalStorage
());
vo
.
put
(
"operator"
,
deviceInfo
.
getOperator
());
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
vo
.
put
(
"isSimulator"
,
SimulatorManager
.
INSTANCE
.
isEmulator
());
vo
.
put
(
"isAccessibility"
,
AccessibilityUtils
.
isAccessibilityEnabled
());
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
riskinfo2
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
RiskBean
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
RiskBean
>
baseResponse
)
{
try
{
if
(
baseResponse
.
getStatus
()
==
200
)
{
// 命中风控
if
(
baseResponse
.
getData
().
isRiskUser
())
{
TrackManager
.
getInstance
().
riskCmtInfo
();
Activity
forwardActivity
=
ForegroundOrBackground
.
getTopActivity
();
if
(
forwardActivity
!=
null
)
{
if
(!
TextUtils
.
isEmpty
(
baseResponse
.
getData
().
getMsg
()))
{
// 后台返回msg跳转界面提示
if
(!
forwardActivity
.
isFinishing
())
{
// 测试环境 不弹出
if
(!
BuildConfig
.
DEBUG
)
{
new
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(()
->
{
Intent
intent
=
new
Intent
(
forwardActivity
,
HintActivity
.
class
);
intent
.
putExtra
(
HintActivity
.
HINT_TEXT
,
baseResponse
.
getData
().
getMsg
());
intent
.
putExtra
(
HintActivity
.
HINT_PAGETYPE
,
baseResponse
.
getData
().
getJump
());
intent
.
putExtra
(
HintActivity
.
HINT_FLAG
,
baseResponse
.
getData
().
isRiskUserCrash
());
forwardActivity
.
startActivity
(
intent
);
},
200
);
}
}
}
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
});
}
}
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
View file @
19ee3f02
...
...
@@ -366,6 +366,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if
(!
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
homePresenter
.
getHomeV1Types
()
TrackManager
.
getInstance
().
mainRiskinfo
()
}
}
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/widgets/DrawAlipayDialog.kt
View file @
19ee3f02
...
...
@@ -2,18 +2,16 @@ package com.duben.dayplaylet.ui.widgets
import
android.app.Dialog
import
android.content.Context
import
android.os.Handler
import
android.view.Gravity
import
android.view.KeyEvent
import
android.view.WindowManager
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.dayplaylet.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.dayplaylet.utils.BubbleUtils
import
com.duben.dayplaylet.utils.SpanUtils
import
com.yy.mobile.rollingtextview.CharOrder
import
com.yy.mobile.rollingtextview.strategy.Direction
import
com.yy.mobile.rollingtextview.strategy.Strategy.CarryBitAnimation
import
kotlinx.android.synthetic.main.dialog_draw_alipay.*
import
kotlinx.android.synthetic.main.dialog_sign_draw.*
class
DrawAlipayDialog
(
private
val
context
:
Context
,
val
cash
:
Double
)
:
Dialog
(
...
...
@@ -43,7 +41,16 @@ class DrawAlipayDialog(private val context: Context, val cash: Double) :
if
(
cashStr
.
length
>=
4
)
{
tv_draw_cash1
.
text
=
cashStr
.
subSequence
(
0
,
1
)
tv_draw_cash2
.
text
=
cashStr
.
subSequence
(
2
,
3
)
tv_draw_cash3
.
text
=
cashStr
.
subSequence
(
3
,
4
)
tv_draw_cash3
.
animationDuration
=
2000L
tv_draw_cash3
.
addCharOrder
(
CharOrder
.
Number
)
tv_draw_cash3
.
charStrategy
=
CarryBitAnimation
(
Direction
.
SCROLL_DOWN
)
tv_draw_cash3
.
setText
(
"0"
)
val
tempNumStr
=
cashStr
.
subSequence
(
3
,
4
).
toString
()
val
tempNumInt
=
tempNumStr
.
toInt
()
if
(
tempNumInt
>
0
)
{
tv_draw_cash3
.
setText
(
tempNumStr
)
}
}
tv_draw_text
.
text
=
"剩余${AppConfig.signCash1}元已存入签到余额"
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/widgets/WithDrawSucDialog.kt
View file @
19ee3f02
...
...
@@ -13,6 +13,11 @@ import com.duben.dayplaylet.R
import
com.duben.dayplaylet.ad.express.ExpressAdCallback
import
com.duben.dayplaylet.ad.express.MyExpressManager
import
com.duben.dayplaylet.utils.UIUtils
import
com.yy.mobile.rollingtextview.CharOrder
import
com.yy.mobile.rollingtextview.RollingTextView
import
com.yy.mobile.rollingtextview.strategy.Direction
import
com.yy.mobile.rollingtextview.strategy.Strategy
import
kotlinx.android.synthetic.main.dialog_draw_alipay.*
/**
* 同城红包弹框
...
...
@@ -30,7 +35,7 @@ class WithDrawSucDialog(
private
val
btn
:
Button
private
val
tvCash1
:
TextView
private
val
tvCash2
:
TextView
private
val
tvCash3
:
TextView
private
val
tvCash3
:
Rolling
TextView
private
val
flAd
:
FrameLayout
init
{
...
...
@@ -61,7 +66,15 @@ class WithDrawSucDialog(
if
(
cashStr
.
length
>=
4
)
{
tvCash1
.
text
=
cashStr
.
subSequence
(
0
,
1
)
tvCash2
.
text
=
cashStr
.
subSequence
(
2
,
3
)
tvCash3
.
text
=
cashStr
.
subSequence
(
3
,
4
)
tvCash3
.
animationDuration
=
2000L
tvCash3
.
addCharOrder
(
CharOrder
.
Number
)
tvCash3
.
charStrategy
=
Strategy
.
CarryBitAnimation
(
Direction
.
SCROLL_DOWN
)
tvCash3
.
setText
(
"0"
)
val
tempNumStr
=
cashStr
.
subSequence
(
3
,
4
).
toString
()
val
tempNumInt
=
tempNumStr
.
toInt
()
if
(
tempNumInt
>
0
)
{
tvCash3
.
setText
(
tempNumStr
)
}
}
ibClose
.
setOnClickListener
(
listener
)
...
...
video/app/src/main/java/com/duben/dayplaylet/utils/ConsumerToastUtil.kt
View file @
19ee3f02
...
...
@@ -25,7 +25,8 @@ object ConsumerToastUtil {
try
{
val
toastview
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
toast_text_layout
,
null
)
val
ll_toast_redpkg
=
toastview
.
findViewById
<
View
>(
R
.
id
.
ll_toast_redpkg
)
as
LinearLayout
val
ll_toast_yuanbao
=
toastview
.
findViewById
<
View
>(
R
.
id
.
ll_toast_yuanbao
)
as
LinearLayout
val
ll_toast_yuanbao
=
toastview
.
findViewById
<
View
>(
R
.
id
.
ll_toast_yuanbao
)
as
LinearLayout
val
redPkg
=
toastview
.
findViewById
<
View
>(
R
.
id
.
tv_toast_redpkg
)
as
TextView
val
yuanbao
=
toastview
.
findViewById
<
View
>(
R
.
id
.
tv_toast_yuanbao
)
as
TextView
...
...
@@ -53,4 +54,27 @@ object ConsumerToastUtil {
}
}
@SuppressLint
(
"MissingInflatedId"
)
@JvmStatic
fun
showAdTip
(
context
:
Context
?)
{
// if (context == null) return
//
// try {
// val toastview = LayoutInflater.from(context).inflate(R.layout.toast_tip_layout, null)
//// val yuanbao = toastview.findViewById<View>(R.id.tv_toast_yuanbao) as TextView
//
// val toast = Toast(context)
// toast.setGravity(Gravity.BOTTOM, BubbleUtils.dp2px(200), BubbleUtils.dp2px(50))
// toast.duration = Toast.LENGTH_LONG
// toast.view = toastview
// toast.show()
//
// Handler().postDelayed(Runnable { toast.cancel() }, 100000)
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
}
\ No newline at end of file
video/app/src/main/res/layout/dialog_draw_alipay.xml
View file @
19ee3f02
...
...
@@ -69,7 +69,7 @@
android:textSize=
"40sp"
android:textStyle=
"bold"
></TextView>
<TextView
<
com.yy.mobile.rollingtextview.Rolling
TextView
android:id=
"@+id/tv_draw_cash3"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -85,7 +85,7 @@
android:text=
"0"
android:textColor=
"@color/white"
android:textSize=
"40sp"
android:textStyle=
"bold"
></TextView>
android:textStyle=
"bold"
></
com.yy.mobile.rollingtextview.Rolling
TextView>
</LinearLayout>
<TextView
...
...
video/app/src/main/res/layout/dialog_withdraw_suc.xml
View file @
19ee3f02
...
...
@@ -76,7 +76,7 @@
android:textSize=
"36dp"
android:textStyle=
"bold"
/>
<TextView
<
com.yy.mobile.rollingtextview.Rolling
TextView
android:id=
"@+id/tv_cash_3"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
...
...
video/app/src/main/res/layout/toast_tip_layout.xml
0 → 100644
View file @
19ee3f02
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/full_transparent"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/bg_tip_ad"
/>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/mipmap-xhdpi/bg_tip_ad.png
0 → 100755
View file @
19ee3f02
5.25 KB
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