Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
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_flowbox
Commits
eb94b1c5
Commit
eb94b1c5
authored
Jul 14, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时弹出页面逻辑优化
parent
ad36435f
Changes
42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
353 additions
and
1343 deletions
+353
-1343
build.gradle
app/build.gradle
+0
-1
TingPhoneOpenSDK_7.5.11.jar
app/libs/TingPhoneOpenSDK_7.5.11.jar
+0
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+11
-12
MintsApplication.java
app/src/main/java/com/mints/flowbox/MintsApplication.java
+6
-4
FullGroManager.java
...c/main/java/com/mints/flowbox/ad/full/FullGroManager.java
+27
-1
InterstitialGroManager.java
...com/mints/flowbox/ad/inscreen/InterstitialGroManager.java
+26
-0
WifiAdManager.kt
app/src/main/java/com/mints/flowbox/ad/wifi/WifiAdManager.kt
+45
-16
AlarmManager.java
...c/main/java/com/mints/flowbox/keepalive/AlarmManager.java
+0
-10
XmManager.kt
app/src/main/java/com/mints/flowbox/manager/ad/XmManager.kt
+0
-39
WifiDataManager.kt
...in/java/com/mints/flowbox/manager/wifi/WifiDataManager.kt
+18
-15
TrackPresenter.java
...java/com/mints/flowbox/mvp/presenters/TrackPresenter.java
+1
-1
Increasespeed2Activity.kt
.../com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
+5
-5
IncreasespeedActivity.kt
...a/com/mints/flowbox/ui/activitys/IncreasespeedActivity.kt
+9
-9
MainActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
+3
-6
SpeedFastActivity.kt
.../java/com/mints/flowbox/ui/activitys/SpeedFastActivity.kt
+4
-8
XmlyAwardActivity.kt
.../java/com/mints/flowbox/ui/activitys/XmlyAwardActivity.kt
+0
-99
XmlyPlayActivity.kt
...n/java/com/mints/flowbox/ui/activitys/XmlyPlayActivity.kt
+0
-494
AnimActivity.kt
.../com/mints/flowbox/ui/activitys/keepalive/AnimActivity.kt
+43
-0
ApkActivity.kt
...a/com/mints/flowbox/ui/activitys/keepalive/ApkActivity.kt
+0
-1
TimingActivity.kt
...om/mints/flowbox/ui/activitys/keepalive/TimingActivity.kt
+8
-3
TransparentActivity.kt
...nts/flowbox/ui/activitys/keepalive/TransparentActivity.kt
+65
-0
XmlyPageAdapter.kt
...main/java/com/mints/flowbox/ui/adapter/XmlyPageAdapter.kt
+0
-58
XmlyPlayAdapter.kt
...main/java/com/mints/flowbox/ui/adapter/XmlyPlayAdapter.kt
+0
-65
MoneyFragment.kt
.../main/java/com/mints/flowbox/ui/fragment/MoneyFragment.kt
+26
-27
XmlyFragment.kt
...c/main/java/com/mints/flowbox/ui/fragment/XmlyFragment.kt
+0
-85
XmlyPageFragment.kt
...in/java/com/mints/flowbox/ui/fragment/XmlyPageFragment.kt
+0
-136
SystemUtils.kt
app/src/main/java/com/mints/flowbox/utils/SystemUtils.kt
+2
-2
ToolUtil.java
app/src/main/java/com/mints/flowbox/utils/ToolUtil.java
+3
-3
libxmediaplayer_x.so
app/src/main/jniLibs/arm64-v8a/libxmediaplayer_x.so
+0
-0
libxmediaplayerv8.so
app/src/main/jniLibs/arm64-v8a/libxmediaplayerv8.so
+0
-0
libxmediaplayer.so
app/src/main/jniLibs/armeabi-v7a/libxmediaplayer.so
+0
-0
libxmediaplayerv7.so
app/src/main/jniLibs/armeabi-v7a/libxmediaplayerv7.so
+0
-0
libxmediaplayer.so
app/src/main/jniLibs/armeabi/libxmediaplayer.so
+0
-0
libxmediaplayerv7.so
app/src/main/jniLibs/armeabi/libxmediaplayerv7.so
+0
-0
activity_anim.xml
app/src/main/res/layout/activity_anim.xml
+13
-0
activity_award_xmly.xml
app/src/main/res/layout/activity_award_xmly.xml
+0
-41
activity_increasespeed2.xml
app/src/main/res/layout/activity_increasespeed2.xml
+12
-2
activity_trans.xml
app/src/main/res/layout/activity_trans.xml
+5
-0
activity_xmly_play.xml
app/src/main/res/layout/activity_xmly_play.xml
+0
-137
fragment_main_xmly.xml
app/src/main/res/layout/fragment_main_xmly.xml
+0
-29
fragment_main_xmly_page.xml
app/src/main/res/layout/fragment_main_xmly_page.xml
+0
-34
themes.xml
app/src/main/res/values/themes.xml
+21
-0
No files found.
app/build.gradle
View file @
eb94b1c5
...
...
@@ -267,7 +267,6 @@ dependencies {
// 枫岚
implementation
(
name:
'mh-adsdk'
,
ext:
'aar'
)
implementation
(
name:
'mh-adsdk-ext'
,
ext:
'aar'
)
// 喜马拉雅 jar自动引入
// 微转阅读(接入h5方式)
//天卓SDK的珊瑚2.0组件
implementation
(
name:
'adapt-1.3.3'
,
ext:
'aar'
)
...
...
app/libs/TingPhoneOpenSDK_7.5.11.jar
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/AndroidManifest.xml
View file @
eb94b1c5
...
...
@@ -142,8 +142,6 @@
android:name=
".ui.activitys.FeedbackActivity"
android:windowSoftInputMode=
"stateVisible"
/>
<activity
android:name=
".ui.activitys.WrapperActivity"
/>
<activity
android:name=
".ui.activitys.XmlyAwardActivity"
/>
<activity
android:name=
".ui.activitys.XmlyPlayActivity"
/>
<activity
android:name=
".ui.activitys.TaskCpdActivity"
/>
<activity
android:name=
".ui.activitys.SpeedFastActivity"
/>
<activity
android:name=
".ui.activitys.SpeedTestActivity"
/>
...
...
@@ -188,6 +186,7 @@
android:finishOnTaskLaunch=
"false"
android:launchMode=
"singleInstance"
android:theme=
"@style/CustomerTransparentTheme"
/>
<activity
android:name=
".ui.activitys.keepalive.TimingActivity"
android:excludeFromRecents=
"true"
...
...
@@ -196,6 +195,15 @@
android:launchMode=
"singleInstance"
android:theme=
"@style/CustomerTransparentTheme"
/>
<activity
android:name=
".ui.activitys.keepalive.TransparentActivity"
android:theme=
"@style/CustomerTransparentTheme"
/>
<activity
android:name=
".ui.activitys.keepalive.AnimActivity"
android:theme=
"@style/CustomerTransparentTheme"
/>
<service
android:name=
".service.UpdateService"
android:exported=
"true"
/>
...
...
@@ -203,10 +211,7 @@
android:name=
".InitAppService"
android:enabled=
"true"
android:exported=
"false"
/>
<!-- 喜马拉雅播放器 -->
<service
android:name=
"com.ximalaya.ting.android.opensdk.player.service.XmPlayerService"
android:exported=
"true"
android:process=
":player"
/>
<!-- 监听apk安装 -->
<!-- 监听apk安装 -->
<service
android:name=
".service.AppInstallService"
android:enabled=
"true"
...
...
@@ -318,12 +323,6 @@
<!-- 常驻通知栏service -->
<service
android:name=
".keepalive.NotificationService"
/>
<!-- 喜马拉雅播放器 -->
<service
android:name=
"com.ximalaya.ting.android.opensdk.player.service.XmPlayerService"
android:exported=
"true"
android:process=
":player"
/>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/mints/flowbox/MintsApplication.java
View file @
eb94b1c5
...
...
@@ -25,6 +25,7 @@ import com.mints.flowbox.keepalive.NotificationUtil;
import
com.mints.flowbox.keepalive.PackageWatch
;
import
com.mints.flowbox.keepalive.ServiceUtil
;
import
com.mints.flowbox.keepalive.ScreenWatch
;
import
com.mints.flowbox.keepalive.HomeKeyWatch
;
import
com.mints.flowbox.keepalive.WifiStateWatch
;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
import
com.mints.flowbox.manager.MiitHelper
;
...
...
@@ -38,6 +39,7 @@ import com.mints.flowbox.ui.activitys.keepalive.ApkActivity;
import
com.mints.flowbox.ui.activitys.keepalive.BoostActivity
;
import
com.mints.flowbox.ui.activitys.keepalive.ScreenActivity
;
import
com.mints.flowbox.ui.activitys.keepalive.TimingActivity
;
import
com.mints.flowbox.ui.activitys.keepalive.TransparentActivity
;
import
com.mints.flowbox.utils.ForegroundOrBackground
;
import
com.mints.flowbox.utils.keepalive.IntentUtils
;
import
com.mints.flowbox.utils.SystemUtils
;
...
...
@@ -195,9 +197,6 @@ public class MintsApplication extends BaseApp {
// Toast.makeText(this, "测试:主进程重启成功", Toast.LENGTH_LONG).show();
// }
// 获取应用外开关
TrackManager
.
getInstance
().
getOuterAdConfig
();
WifiStateWatch
.
getInstance
(
this
).
begin
(
new
WifiStateWatch
.
WifiStateListener
()
{
@Override
public
void
onWifiOpen
()
{
...
...
@@ -281,8 +280,11 @@ public class MintsApplication extends BaseApp {
// if (ForegroundOrBackground.isForeground2()) {
// return;
// }
// Intent intent = new Intent(MintsApplication.getContext(), TransparentActivity.class);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
// IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
//// if (WifiDataManager.INSTANCE.getApplistKey()) {
// showBoost();
//
//
showBoost();
//// }
//
// }
...
...
app/src/main/java/com/mints/flowbox/ad/full/FullGroManager.java
View file @
eb94b1c5
...
...
@@ -15,7 +15,6 @@ import com.bytedance.msdk.api.fullVideo.TTFullVideoAdListener;
import
com.bytedance.msdk.api.fullVideo.TTFullVideoAdLoadCallback
;
import
com.mints.flowbox.BuildConfig
;
import
com.mints.flowbox.ad.wifi.WifiAdStatusListener
;
import
com.mints.flowbox.common.AppConfig
;
import
com.mints.flowbox.common.Constant
;
import
com.mints.flowbox.manager.CsjGroMoreManager
;
import
com.mints.flowbox.manager.TrackManager
;
...
...
@@ -119,11 +118,17 @@ public class FullGroManager {
LogUtil
.
d
(
TAG
,
"code="
+
adError
.
message
);
isLoadSuccess
=
false
;
if
(
wifiAdStatusListener
!=
null
)
{
wifiAdStatusListener
.
adFail
();
}
}
@Override
public
void
onFullVideoAdLoad
()
{
isLoadSuccess
=
true
;
if
(
wifiAdStatusListener
!=
null
)
{
wifiAdStatusListener
.
adSuccess
();
}
}
@Override
...
...
@@ -207,6 +212,27 @@ public class FullGroManager {
}
}
public
void
showFullAd
(
Activity
_activity
)
{
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"showFullAd isLoadSuccess="
+
isLoadSuccess
+
" isReady="
+
mTTFullVideoAd
.
isReady
());
}
if
(
isLoadSuccess
&&
mTTFullVideoAd
!=
null
&&
mTTFullVideoAd
.
isReady
()
&&
activity
!=
null
)
{
//设置监听器
mTTFullVideoAd
.
showFullAd
(
_activity
,
mTTFullVideoAdListener
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mTTFullVideoAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mTTFullVideoAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mTTFullVideoAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE4
);
vo
.
put
(
"adid"
,
fullId
);
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
else
{
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess
=
false
;
}
}
/**
* 激励视频交互回调
*/
...
...
app/src/main/java/com/mints/flowbox/ad/inscreen/InterstitialGroManager.java
View file @
eb94b1c5
...
...
@@ -138,6 +138,32 @@ public class InterstitialGroManager {
}
}
public
void
showInteractionAd
(
Activity
_activity
)
{
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
TAG
,
"showInteractionAd isLoadSuccess="
+
isLoadSuccess
+
" isReady="
+
mInterstitialAd
.
isReady
());
}
if
(
isLoadSuccess
&&
mInterstitialAd
!=
null
&&
mInterstitialAd
.
isReady
()
&&
activity
!=
null
)
{
//设置监听器
mInterstitialAd
.
setTTAdInterstitialListener
(
interstitialListener
);
mInterstitialAd
.
showAd
(
_activity
);
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
mInterstitialAd
.
getAdNetworkRitId
());
vo
.
put
(
"ecpm"
,
mInterstitialAd
.
getPreEcpm
());
vo
.
put
(
"adSource"
,
mInterstitialAd
.
getAdNetworkPlatformId
());
vo
.
put
(
"adType"
,
Constant
.
GRO_MORE_ADTYPE3
);
if
(
isMain
)
{
vo
.
put
(
"adid"
,
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID
());
}
else
{
vo
.
put
(
"adid"
,
CsjGroMoreManager
.
INSTANCE
.
getAPP_IN_MAIN_AD_UNIT_INTERSTITIAL_ID
());
}
TrackManager
.
getInstance
().
cmtGroMoreInfo
(
vo
);
}
else
{
// 当加载到广告后 ,长时间未展示失效时 改变状态
isLoadSuccess
=
false
;
}
}
TTInterstitialAdListener
interstitialListener
=
new
TTInterstitialAdListener
()
{
/**
...
...
app/src/main/java/com/mints/flowbox/ad/wifi/WifiAdManager.kt
View file @
eb94b1c5
...
...
@@ -2,16 +2,19 @@ package com.mints.flowbox.ad.wifi
import
android.app.Activity
import
com.mints.flowbox.ad.full.FullGroManager
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.mvp.model.WeightBean
/**
* wifi广告管理
*
* 广告形式-Gromore的插屏、全屏
*/
class
WifiAdManager
{
class
WifiAdManager
private
constructor
()
{
companion
object
{
val
instance
:
WifiAdManager
by
lazy
(
mode
=
LazyThreadSafetyMode
.
SYNCHRONIZED
)
{
WifiAdManager
()
}
}
private
var
wifiAdStatusListener
:
WifiAdStatusListener
?
=
null
...
...
@@ -22,7 +25,7 @@ class WifiAdManager {
private
var
fullGroManager
:
FullGroManager
?
=
null
// 当前广告类型
private
var
currentAdType
=
""
//
private var currentAdType = ""
/**
* 预加载广告,必须传入activity
...
...
@@ -39,13 +42,13 @@ class WifiAdManager {
// }
// }
preLoadFullGroMore
(
activity
,
true
)
preLoadFullGroMore
(
activity
,
true
)
}
/**
* 定义广告类型规则
*/
private
fun
getCurrentAdType
():
String
{
//
private fun getCurrentAdType(): String {
// var tempAdType = ""
// val randomInt = Random().nextInt(10)
// if (randomInt % 2 == 0) {
...
...
@@ -53,31 +56,32 @@ class WifiAdManager {
// } else {
// tempAdType = Constant.GROMORE_FULL_AD
// }
//
// return tempAdType
return
Constant
.
GROMORE_FULL_AD
}
//
return Constant.GROMORE_FULL_AD
//
}
/**
* 插屏
*/
private
fun
preLoadInterstitialGroMore
(
activity
:
Activity
)
{
//
private fun preLoadInterstitialGroMore(activity: Activity) {
// if (interstitialGroManager != null) {
// interstitialGroManager?.onDestroy()
// }
// interstitialGroManager = InterstitialGroManager()
// interstitialGroManager?.loadInsertScreenAd(activity, false)
}
//
}
/**
* 全屏
*/
private
fun
preLoadFullGroMore
(
activity
:
Activity
,
isMain
:
Boolean
)
{
private
fun
preLoadFullGroMore
(
activity
:
Activity
,
isMain
:
Boolean
)
{
if
(
fullGroManager
!=
null
)
{
fullGroManager
?.
onDestroy
()
}
fullGroManager
=
FullGroManager
()
fullGroManager
?.
loadFullAd
(
activity
,
isMain
)
fullGroManager
?.
setWifiAdStatusListener
(
wifiAdStatusListener
)
fullGroManager
?.
loadFullAd
(
activity
,
isMain
)
}
/**
...
...
@@ -102,11 +106,36 @@ class WifiAdManager {
//// interstitialGroManager?.showInteractionAd()
//// }
// Constant.GROMORE_FULL_AD -> {
//
fullGroManager?.showFullAd()
fullGroManager
?.
showFullAd
()
// }
// }
}
fullGroManager
?.
showFullAd
()
/**
* 展示广告
*/
fun
showInterstitial
(
_activity
:
Activity
)
{
// when (currentAdType) {
// Constant.GROMORE_INSERTSCREEN_AD -> {
// interstitialGroManager?.setWifiAdStatusListener(object : WifiAdStatusListener {
// override fun adSuccess() {
//
// }
//
// override fun adFail() {
//
// }
//
// override fun adClose() {
// wifiAdStatusListener?.adClose()
// }
// })
// interstitialGroManager?.showInteractionAd(_activity)
// }
// Constant.GROMORE_FULL_AD -> {
fullGroManager
?.
showFullAd
(
_activity
)
// }
// }
}
fun
onDestroy
()
{
...
...
app/src/main/java/com/mints/flowbox/keepalive/AlarmManager.java
View file @
eb94b1c5
...
...
@@ -101,15 +101,6 @@ public class AlarmManager implements WeakHandler.IHandler {
}
this
.
resetUserActionTime
();
// // 预加载信息流
// ExpressManager.INSTANCE.loadAppOutExpress();
// //用户关闭界面后10分钟调用
// Intent intent = new Intent(MintsApplication.getContext(), BoostActivity.class);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
// Bundle bundle = new Bundle();
// bundle.putBoolean(BoostActivity.IS_FROM_ALARM, true);
// intent.putExtras(bundle);
// IntentUtils.startActivity(ForegroundOrBackground.getMain_activity(), intent);
}
}
...
...
@@ -131,7 +122,6 @@ public class AlarmManager implements WeakHandler.IHandler {
}
else
if
(
curTime
%
USER_ACTIVE_MINTER
==
0
)
{
//每10分钟调用 用户激活接口
TrackManager
.
getInstance
().
setMinsActive
();
TrackManager
.
getInstance
().
getOuterAdConfig
();
}
}
...
...
app/src/main/java/com/mints/flowbox/manager/ad/XmManager.kt
deleted
100644 → 0
View file @
ad36435f
package
com.mints.flowbox.manager.ad
import
android.app.Application
import
com.mints.flowbox.BuildConfig
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.common.Constant
import
com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk
import
com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
import
com.ximalaya.ting.android.opensdk.datatrasfer.DeviceInfoProviderDefault
import
com.ximalaya.ting.android.opensdk.player.service.XmPlayerConfig
import
com.ximalaya.ting.android.opensdk.util.BaseUtil
object
XmManager
{
private
const
val
APP_SECRET
=
"6635e8b3c018eb16bc63106af1527e72"
private
const
val
APP_KEY
=
"e40494e12af04ed1b7742658affe6a31"
/**
* 初始化喜马拉雅
*/
fun
init
(
application
:
Application
)
{
XmPlayerConfig
.
getInstance
(
application
)
.
setDefualtNotificationNickNameAndInfo
(
Constant
.
MINTS_APP_NAME
,
Constant
.
MINTS_APP_NAME
)
if
(
BaseUtil
.
isMainProcess
(
application
))
{
ConstantsOpenSdk
.
isDebug
=
BuildConfig
.
DEBUG
val
ximalaya
=
CommonRequest
.
getInstanse
()
ximalaya
.
setAppkey
(
APP_KEY
)
ximalaya
.
setPackid
(
Constant
.
MINTS_PKG_NAME
)
ximalaya
.
init
(
application
,
APP_SECRET
,
object
:
DeviceInfoProviderDefault
(
application
)
{
override
fun
oaid
():
String
{
return
MintsApplication
.
OAID
}
})
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/manager/wifi/WifiDataManager.kt
View file @
eb94b1c5
package
com.mints.flowbox.manager.wifi
import
android.text.format.DateUtils
import
com.hjq.toast.ToastUtils
import
com.mints.flowbox.keepalive.AlarmManager
import
com.mints.flowbox.manager.AppPreferencesManager
import
com.mints.flowbox.mvp.model.OutAppConfig
import
com.mints.flowbox.utils.LogUtil
import
com.mints.flowbox.utils.ToastUtil
/**
* wifi本地数据管理
...
...
@@ -111,7 +114,7 @@ object WifiDataManager {
*/
fun
getWifiOn
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
WIFI_ON_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
WIFI_ON_OPEN
)
return
false
val
wifiOn
=
sp
.
getInt
(
WIFI_ON
,
0
)
if
(
wifiOn
<
WIFI_ON_TIMES
)
{
...
...
@@ -127,7 +130,7 @@ object WifiDataManager {
*/
fun
getWifiOff
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
WIFI_OFF_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
WIFI_OFF_OPEN
)
return
false
val
wifiOff
=
sp
.
getInt
(
WIFI_OFF
,
0
)
if
(
wifiOff
<
WIFI_OFF_TIMES
)
{
...
...
@@ -143,7 +146,7 @@ object WifiDataManager {
*/
fun
getBatteryOn
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
BATTERY_ON_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
BATTERY_ON_OPEN
)
return
false
val
batteryOn
=
sp
.
getInt
(
BATTERY_ON
,
0
)
if
(
batteryOn
<
BATTERY_ON_TIMES
)
{
...
...
@@ -159,7 +162,7 @@ object WifiDataManager {
*/
fun
getBatteryOff
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
BATTERY_OFF_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
BATTERY_OFF_OPEN
)
return
false
val
batteryOff
=
sp
.
getInt
(
BATTERY_OFF
,
0
)
if
(
batteryOff
<
BATTERY_OFF_TIMES
)
{
...
...
@@ -175,7 +178,7 @@ object WifiDataManager {
*/
fun
getLockOn
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
LOCK_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
LOCK_OPEN
)
return
false
val
lockOn
=
sp
.
getInt
(
LOCK_ON
,
0
)
if
(
lockOn
<
LOCK_TIMES
)
{
...
...
@@ -190,7 +193,7 @@ object WifiDataManager {
*/
fun
getTelephoneOff
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
PHONE_OFF_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
PHONE_OFF_OPEN
)
return
false
val
telephoneOff
=
sp
.
getInt
(
TELEPHONE_OFF
,
0
)
if
(
telephoneOff
<
PHONE_OFF_TIMES
)
{
...
...
@@ -205,7 +208,7 @@ object WifiDataManager {
*/
fun
getInstallApk
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
INSTALL_APK_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
INSTALL_APK_OPEN
)
return
false
val
install
=
sp
.
getInt
(
INSTALL_APK
,
0
)
if
(
install
<
INSTALL_APK_TIMES
)
{
...
...
@@ -216,11 +219,11 @@ object WifiDataManager {
}
/**
* 是否
挂断电话
* 是否
卸载APP
*/
fun
getUnInstallApk
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
UNINSTALL_APK_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
UNINSTALL_APK_OPEN
)
return
false
val
uninstall
=
sp
.
getInt
(
UNINSTALL_APK
,
0
)
if
(
uninstall
<
UNINSTALL_APK_TIMES
)
{
...
...
@@ -231,11 +234,11 @@ object WifiDataManager {
}
/**
* 是否
挂断电话
* 是否
更新APP
*/
fun
getUpdateApk
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
UPDATE_APK_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
UPDATE_APK_OPEN
)
return
false
val
update
=
sp
.
getInt
(
UPDATE_APK
,
0
)
if
(
update
<
UPDATE_APK_TIMES
)
{
...
...
@@ -246,11 +249,11 @@ object WifiDataManager {
}
/**
*
是否挂断电话
*
定时
*/
fun
getTiming
():
Boolean
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
TIMING_OPEN
)
return
false
if
(!
APP_OUT_MAIN_SWITCH
or
!
TIMING_OPEN
)
return
false
val
timing
=
sp
.
getInt
(
TIMING
,
0
)
if
(
timing
<
TIMING_TIMES
)
{
...
...
@@ -262,7 +265,7 @@ object WifiDataManager {
fun
getTimingInterval
():
Int
{
// 总开关关闭 return
if
(!
APP_OUT_MAIN_SWITCH
||
!
TIMING_OPEN
)
return
0
if
(!
APP_OUT_MAIN_SWITCH
or
!
TIMING_OPEN
)
return
0
return
TIMING_INTERVAL
}
...
...
@@ -344,7 +347,7 @@ object WifiDataManager {
/**
* 重置次数
*/
p
rivate
fun
resetData
(
data
:
OutAppConfig
)
{
p
ublic
fun
resetData
(
data
:
OutAppConfig
)
{
if
(!
data
.
isOpen
)
{
APP_OUT_MAIN_SWITCH
=
false
return
...
...
app/src/main/java/com/mints/flowbox/mvp/presenters/TrackPresenter.java
View file @
eb94b1c5
...
...
@@ -543,7 +543,7 @@ public class TrackPresenter extends BaseTrackPresenter {
try
{
if
(
baseResponse
.
getStatus
()
==
200
)
{
OutAppConfig
data
=
baseResponse
.
getData
();
WifiDataManager
.
INSTANCE
.
resetData
(
data
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/Increasespeed2Activity.kt
View file @
eb94b1c5
...
...
@@ -77,9 +77,8 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_increasespeed2
override
fun
initViewsAndEvents
()
{
mWifiAdManager
=
WifiAdManager
()
mWifiAdManager
?.
loadWifiAd
(
this
)
mWifiAdManager
?.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
WifiAdManager
.
instance
.
loadWifiAd
(
this
)
WifiAdManager
.
instance
.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
}
...
...
@@ -124,6 +123,8 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
container
.
visibility
=
View
.
VISIBLE
if
(
mIncreaseType
==
INCREASE2_SAFE_CHECK
)
{
ivGif2
.
visibility
=
View
.
VISIBLE
tvInfo2
.
visibility
=
View
.
VISIBLE
tvInfo2
.
text
=
"当前网络环境良好"
GlideUtils
.
loadImageViewGif
(
mContext
,
R
.
drawable
.
safe_check_result
,
...
...
@@ -210,8 +211,7 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
mTimer
?.
cancel
()
mTimer
=
null
mWifiAdManager
?.
onDestroy
()
mWifiAdManager
=
null
WifiAdManager
.
instance
.
onDestroy
()
fl_ad
?.
removeAllViews
()
super
.
onDestroy
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/IncreasespeedActivity.kt
View file @
eb94b1c5
...
...
@@ -51,8 +51,6 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
const
val
STEP_Interval
=
300L
}
private
var
mWifiAdManager
:
WifiAdManager
?
=
null
private
var
mIncreaseType
=
INCREASE_BOOST
private
var
mSpeed
=
"10Mbps"
...
...
@@ -81,9 +79,8 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_increasespeed
override
fun
initViewsAndEvents
()
{
mWifiAdManager
=
WifiAdManager
()
mWifiAdManager
?.
loadWifiAd
(
this
)
mWifiAdManager
?.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
WifiAdManager
.
instance
.
loadWifiAd
(
this
)
WifiAdManager
.
instance
.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
}
...
...
@@ -107,11 +104,15 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
mTimerMax
=
14
startTimer
()
}
else
{
// AppConfig.isCanClean = true
// AppConfig.isCanBoost = true
// AppConfig.isCanSaveBattery = true
initView
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
// 动画结束后 展示插屏广告
mWifiAdManager
?
.
showInterstitial
()
WifiAdManager
.
instance
.
showInterstitial
()
showFirstGive
()
},
3000
)
}
...
...
@@ -196,7 +197,7 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
}
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
// 动画结束后 展示插屏广告
mWifiAdManager
?
.
showInterstitial
()
WifiAdManager
.
instance
.
showInterstitial
()
showFirstGive
()
},
3000
)
container
.
visibility
=
View
.
VISIBLE
...
...
@@ -297,8 +298,7 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
mTimer
?.
cancel
()
mTimer
=
null
mWifiAdManager
?.
onDestroy
()
mWifiAdManager
=
null
WifiAdManager
.
instance
.
onDestroy
()
fl_ad
?.
removeAllViews
()
super
.
onDestroy
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
View file @
eb94b1c5
...
...
@@ -28,9 +28,7 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.fragment.*
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.PowerDialog
import
com.mints.flowbox.utils.LogUtil
import
com.mints.flowbox.utils.WifiUtils
import
com.mints.flowbox.utils.keepalive.ScreenLockerUtils
import
com.mints.library.utils.GlideUtils
import
kotlinx.android.synthetic.main.activity_main.*
...
...
@@ -63,10 +61,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
mainPresenter
.
attachView
(
this
)
LogUtil
.
d
(
"是否有系统锁屏 -> "
+
ScreenLockerUtils
.
hasSystemLockScreen
(
this
))
LogUtil
.
d
(
"是否是OV -> "
+
ScreenLockerUtils
.
isOV
())
LogUtil
.
d
(
"canShowScreenLocker -> "
+
ScreenLockerUtils
.
canShowScreenLocker
(
this
))
if
(
threeFragment
==
null
)
{
threeFragment
=
WifiFragment
()
}
...
...
@@ -95,6 +89,9 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
mainPresenter
.
getNetWorkIp
()
}
// 获取应用外开关
TrackManager
.
getInstance
().
getOuterAdConfig
()
showPowerDialog
()
baseApplication
.
initMiitHelper
()
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/SpeedFastActivity.kt
View file @
eb94b1c5
...
...
@@ -29,8 +29,6 @@ class SpeedFastActivity : BaseActivity(), View.OnClickListener {
private
var
mTimer
:
Timer
?
=
null
private
var
mStep
=
0
private
var
mWifiAdManager
:
WifiAdManager
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_speed_fast
override
fun
isApplyKitKatTranslucency
()
=
false
...
...
@@ -38,9 +36,8 @@ class SpeedFastActivity : BaseActivity(), View.OnClickListener {
override
fun
initViewsAndEvents
()
{
initView
()
mWifiAdManager
=
WifiAdManager
()
mWifiAdManager
?.
loadWifiAd
(
this
)
mWifiAdManager
?.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
WifiAdManager
.
instance
.
loadWifiAd
(
this
)
WifiAdManager
.
instance
.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
}
...
...
@@ -84,7 +81,7 @@ class SpeedFastActivity : BaseActivity(), View.OnClickListener {
tv_progress
.
visibility
=
View
.
INVISIBLE
// 动画结束后 展示插屏广告
mWifiAdManager
?
.
showInterstitial
()
WifiAdManager
.
instance
.
showInterstitial
()
if
(
iv_gif
.
drawable
is
GifDrawable
)
{
val
drawable
=
iv_gif
.
drawable
as
GifDrawable
...
...
@@ -159,8 +156,7 @@ class SpeedFastActivity : BaseActivity(), View.OnClickListener {
}
override
fun
onDestroy
()
{
mWifiAdManager
?.
onDestroy
()
mWifiAdManager
=
null
WifiAdManager
.
instance
.
onDestroy
()
fl_ad
?.
removeAllViews
()
// 预加载信息流
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/XmlyAwardActivity.kt
deleted
100644 → 0
View file @
ad36435f
package
com.mints.flowbox.ui.activitys
import
android.view.KeyEvent
import
android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.flowbox.ui.widgets.countdowntimer.OnCountDownTimerListener
import
kotlinx.android.synthetic.main.activity_award_xmly.*
/**
* 描述:奖励界面
* 作者:孟崔广
*/
class
XmlyAwardActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
mTimer
:
CountDownTimerSupport
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award_xmly
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
true
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
SCALE
override
fun
initViewsAndEvents
()
{
ivAwardBack
.
setOnClickListener
(
this
)
initExpress
()
startTime
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
AppConfig
.
xmlyAdFlag
=
false
mTimer
?.
stop
()
mTimer
=
null
try
{
TTPreLoadExpressXmlyManager
.
getInstance
().
loadTtFrameLayout
()
}
catch
(
e
:
java
.
lang
.
Exception
)
{
e
.
printStackTrace
()
}
TTPreLoadExpressXmlyManager
.
getInstance
().
onDestroy
()
flAwardXmlyAd
?.
removeAllViews
()
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
true
}
else
super
.
onKeyDown
(
keyCode
,
event
)
}
override
fun
onClick
(
v
:
View
)
{
when
(
v
.
id
)
{
R
.
id
.
ivAwardBack
->
{
finish
()
}
}
}
/**
* 弹窗倒计时
*/
private
fun
startTime
()
{
mTimer
=
CountDownTimerSupport
(
3000L
,
1000L
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
if
(!
this
@XmlyAwardActivity
.
isFinishing
)
{
tvAwardBack
?.
setText
(
"${millisUntilFinished / 1000}"
)
}
}
override
fun
onFinish
()
{
if
(!
this
@XmlyAwardActivity
.
isFinishing
)
{
ivAwardBack
?.
setVisibility
(
View
.
VISIBLE
)
tvAwardBack
?.
setVisibility
(
View
.
GONE
)
}
}
})
mTimer
?.
start
()
}
private
fun
initExpress
()
{
try
{
if
(
flAwardXmlyAd
!=
null
)
{
flAwardXmlyAd
.
removeAllViews
()
flAwardXmlyAd
.
addView
(
TTPreLoadExpressXmlyManager
.
getInstance
().
ttFrameLayout
)
}
}
catch
(
e
:
Exception
)
{
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/XmlyPlayActivity.kt
deleted
100644 → 0
View file @
ad36435f
This diff is collapsed.
Click to expand it.
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/AnimActivity.kt
0 → 100644
View file @
eb94b1c5
package
com.mints.flowbox.ui.activitys.keepalive
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.wifi.WifiAdManager
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
kotlinx.android.synthetic.main.activity_anim.*
/**
*
* 描述:应用外加速
*/
class
AnimActivity
:
BaseActivity
()
{
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_anim
override
fun
initViewsAndEvents
()
{
ccav_speed
.
startAnimation
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
(
{
ccav_speed
.
stopAnimation
()
ccav_speed
.
visibility
=
View
.
GONE
WifiAdManager
.
instance
.
showInterstitial
(
this
)
},
2000
)
}
override
fun
onDestroy
()
{
WifiAdManager
.
instance
.
onDestroy
()
super
.
onDestroy
()
}
override
fun
isApplyKitKatTranslucency
()
=
true
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/ApkActivity.kt
View file @
eb94b1c5
...
...
@@ -19,7 +19,6 @@ import kotlinx.android.synthetic.main.activity_apk.*
import
kotlinx.android.synthetic.main.activity_apk.btnClean
import
kotlinx.android.synthetic.main.activity_apk.fl_ad
import
kotlinx.android.synthetic.main.activity_apk.tvInfo
import
kotlinx.android.synthetic.main.activity_boost.iv_close
import
kotlin.random.Random
/**
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TimingActivity.kt
View file @
eb94b1c5
...
...
@@ -108,29 +108,34 @@ class TimingActivity : BaseActivity() {
when
(
mType
)
{
TIMING_TYPE_BOOST
->
{
// 加速
ExpressManager
.
loadExpress
(
false
)
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_BOOST
)
}
TIMING_TYPE_CLEAN
->
{
// 清理
ExpressManager
.
loadExpress
(
false
)
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_CLEAN
)
}
TIMING_TYPE_SAVE_ELE
->
{
// 省电
ExpressManager
.
loadExpress
(
false
)
bundle
.
putString
(
IncreasespeedActivity
.
INCREASE_TYPE
,
IncreasespeedActivity
.
INCREASE_SAVE_ELECTRICITY
)
}
TIMING_TYPE_WIFI_BOOST
->
{
// 信号增强
readyGo
(
SpeedFastActivity
::
class
.
java
)
ExpressManager
.
loadExpress
(
false
)
readyGoThenKill
(
SpeedFastActivity
::
class
.
java
)
return
@setOnClickListener
}
TIMING_TYPE_SPEED_TEST
->
{
// 省电
readyGo
(
SpeedTestActivity
::
class
.
java
)
TIMING_TYPE_SPEED_TEST
->
{
// 网络测速
ExpressManager
.
loadExpress
(
false
)
readyGoThenKill
(
SpeedTestActivity
::
class
.
java
)
return
@setOnClickListener
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TransparentActivity.kt
0 → 100644
View file @
eb94b1c5
package
com.mints.flowbox.ui.activitys.keepalive
import
android.content.Intent
import
com.mints.flowbox.MintsApplication
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.wifi.WifiAdManager
import
com.mints.flowbox.ad.wifi.WifiAdStatusListener
import
com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.utils.LogUtil
/**
*
* 描述:透明activity,用于加载广告
*/
class
TransparentActivity
:
BaseActivity
()
{
// override fun onCreate(savedInstanceState: Bundle?) {
// val window = window
// window.setGravity(Gravity.START or Gravity.TOP)
// val params = window.attributes
// params.x = 0
// params.y = 0
// params.height = 1
// params.width = 1
// window.attributes = params
//
// super.onCreate(savedInstanceState)
// }
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_trans
override
fun
initViewsAndEvents
()
{
loadAd
()
}
override
fun
isApplyKitKatTranslucency
()
=
true
/**
* 加载广告
*/
private
fun
loadAd
()
{
LogUtil
.
d
(
"TransparentActivity -> loadAd"
)
WifiAdManager
.
instance
.
setWifiAdStatusListener
(
object
:
WifiAdStatusListener
{
override
fun
adSuccess
()
{
val
intent
=
Intent
(
MintsApplication
.
getContext
(),
AnimActivity
::
class
.
java
)
startActivity
(
intent
)
finish
()
overridePendingTransition
(
0
,
0
)
}
override
fun
adFail
()
{
WifiAdManager
.
instance
.
onDestroy
()
finish
()
overridePendingTransition
(
0
,
0
)
}
override
fun
adClose
()
{
}
})
WifiAdManager
.
instance
.
loadWifiAd
(
this
)
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/adapter/XmlyPageAdapter.kt
deleted
100644 → 0
View file @
ad36435f
package
com.mints.flowbox.ui.adapter
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
com.mints.flowbox.R
import
com.mints.flowbox.utils.ToolUtil
import
com.mints.library.utils.GlideUtils
import
com.ximalaya.ting.android.opensdk.model.album.Album
class
XmlyPageAdapter
(
val
xmlyPageList
:
MutableList
<
Album
>)
:
RecyclerView
.
Adapter
<
XmlyPageAdapter
.
ViewHolder
>()
{
lateinit
var
context
:
Context
lateinit
var
mOnItemClickListener
:
OnItemClickListener
inner
class
ViewHolder
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
{
val
ivXmlyPage
:
ImageView
=
view
.
findViewById
(
R
.
id
.
ivXmlyPage
)
val
tvXmlyPageContent
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvXmlyPageContent
)
val
tvXmlyPagecount
:
TextView
=
view
.
findViewById
(
R
.
id
.
tvXmlyPagecount
)
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
context
=
parent
.
context
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_rv_xmly_page
,
parent
,
false
)
val
viewHolder
=
ViewHolder
(
view
)
return
viewHolder
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
album
=
xmlyPageList
[
position
]
holder
.
tvXmlyPageContent
.
text
=
album
.
recommendReason
holder
.
tvXmlyPagecount
.
text
=
ToolUtil
.
formatNum
(
album
.
playCount
.
toString
(),
false
)
GlideUtils
.
loadImageView
(
holder
.
itemView
.
context
,
album
.
coverUrlLarge
,
holder
.
ivXmlyPage
)
holder
.
itemView
.
setOnClickListener
{
if
(
::
mOnItemClickListener
.
isInitialized
)
{
mOnItemClickListener
.
onItemClick
(
position
)
}
}
}
override
fun
getItemCount
()
=
xmlyPageList
.
size
interface
OnItemClickListener
{
fun
onItemClick
(
position
:
Int
)
}
fun
setOnItemClickListener
(
listener
:
OnItemClickListener
)
{
mOnItemClickListener
=
listener
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/adapter/XmlyPlayAdapter.kt
deleted
100644 → 0
View file @
ad36435f
package
com.mints.flowbox.ui.adapter
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
com.mints.flowbox.R
import
com.mints.flowbox.utils.ToolUtil
import
com.ximalaya.ting.android.opensdk.model.track.Track
class
XmlyPlayAdapter
(
val
xmlyPageList
:
MutableList
<
Track
>,
val
xmlyUnlockList
:
List
<
String
>)
:
RecyclerView
.
Adapter
<
XmlyPlayAdapter
.
ViewHolder
>()
{
lateinit
var
context
:
Context
lateinit
var
mOnItemClickListener
:
OnItemClickListener
inner
class
ViewHolder
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
{
val
tvIndex
:
TextView
=
view
.
findViewById
(
R
.
id
.
tv_index
)
val
tvTitle
:
TextView
=
view
.
findViewById
(
R
.
id
.
tv_title
)
val
tvCount
:
TextView
=
view
.
findViewById
(
R
.
id
.
tv_count
)
val
ivIsLock
:
ImageView
=
view
.
findViewById
(
R
.
id
.
iv_islock
)
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
ViewHolder
{
context
=
parent
.
context
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_rv_xmly_play
,
parent
,
false
)
return
ViewHolder
(
view
)
}
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
track
=
xmlyPageList
[
position
]
holder
.
tvIndex
.
text
=
(
position
+
1
).
toString
()
holder
.
tvTitle
.
text
=
track
.
trackTitle
holder
.
tvCount
.
text
=
ToolUtil
.
formatNum
(
track
.
playCount
.
toString
(),
false
)
holder
.
ivIsLock
.
setImageResource
(
R
.
mipmap
.
icon_lock
)
for
(
s
in
xmlyUnlockList
)
{
if
(
position
>=
s
.
toInt
()
-
1
)
{
if
(
s
.
toInt
()
-
1
==
position
)
{
holder
.
ivIsLock
.
setImageResource
(
R
.
mipmap
.
icon_unlock
)
}
}
}
holder
.
itemView
.
setOnClickListener
{
if
(
::
mOnItemClickListener
.
isInitialized
)
{
mOnItemClickListener
.
onItemClick
(
position
)
}
}
}
override
fun
getItemCount
()
=
xmlyPageList
.
size
interface
OnItemClickListener
{
fun
onItemClick
(
position
:
Int
)
}
fun
setOnItemClickListener
(
listener
:
OnItemClickListener
)
{
mOnItemClickListener
=
listener
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/fragment/MoneyFragment.kt
View file @
eb94b1c5
...
...
@@ -11,7 +11,6 @@ import com.mints.flowbox.common.AppConfig
import
com.mints.flowbox.common.Constant
import
com.mints.flowbox.manager.UserManager
import
com.mints.flowbox.manager.YlVideoManager
import
com.mints.flowbox.manager.ad.XmManager
import
com.mints.flowbox.ui.activitys.MainActivity
import
com.mints.flowbox.ui.fragment.base.BaseFragment
import
kotlinx.android.synthetic.main.fragment_main_money.*
...
...
@@ -134,13 +133,13 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
addOrShowFragment
(
childFragmentManager
,
videoFragment
!!
,
FRAGMENT_TAG_VIDEO
)
}
fun
selectXmly
()
{
xtFragmentMoney
.
getTabAt
(
1
)
?.
select
()
if
(
xmlyGameFragment
==
null
)
{
xmlyGameFragment
=
XmlyFragment
()
}
addOrShowFragment
(
childFragmentManager
,
xmlyGameFragment
!!
,
FRAGMENT_TAG_XMLY
)
}
//
fun selectXmly() {
//
xtFragmentMoney.getTabAt(1)?.select()
//
if (xmlyGameFragment == null) {
//
xmlyGameFragment = XmlyFragment()
//
}
//
addOrShowFragment(childFragmentManager, xmlyGameFragment!!, FRAGMENT_TAG_XMLY)
//
}
override
fun
onTabReselected
(
tab
:
XTabLayout
.
Tab
)
{}
...
...
@@ -148,25 +147,25 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override
fun
onTabSelected
(
tab
:
XTabLayout
.
Tab
)
{
when
(
tab
.
position
)
{
0
->
{
if
(
AppConfig
.
showAdFlag
)
{
if
(
videoFragment
==
null
)
{
videoFragment
=
VideoFragment
()
}
addOrShowFragment
(
childFragmentManager
,
videoFragment
!!
,
FRAGMENT_TAG_VIDEO
)
}
else
{
if
(
xmlyGameFragment
==
null
)
{
xmlyGameFragment
=
XmlyFragment
()
}
addOrShowFragment
(
childFragmentManager
,
xmlyGameFragment
!!
,
FRAGMENT_TAG_XMLY
)
}
}
1
->
{
if
(
xmlyGameFragment
==
null
)
{
xmlyGameFragment
=
XmlyFragment
()
}
addOrShowFragment
(
childFragmentManager
,
xmlyGameFragment
!!
,
FRAGMENT_TAG_XMLY
)
}
//
0 -> {
//
if (AppConfig.showAdFlag) {
//
if (videoFragment == null) {
//
videoFragment = VideoFragment()
//
}
//
addOrShowFragment(childFragmentManager, videoFragment!!, FRAGMENT_TAG_VIDEO)
//
} else {
//
if (xmlyGameFragment == null) {
//
xmlyGameFragment = XmlyFragment()
//
}
//
addOrShowFragment(childFragmentManager, xmlyGameFragment!!, FRAGMENT_TAG_XMLY)
//
}
//
}
//
1 -> {
//
if (xmlyGameFragment == null) {
//
xmlyGameFragment = XmlyFragment()
//
}
//
addOrShowFragment(childFragmentManager, xmlyGameFragment!!, FRAGMENT_TAG_XMLY)
//
}
}
curPosition
=
tab
.
position
}
...
...
app/src/main/java/com/mints/flowbox/ui/fragment/XmlyFragment.kt
deleted
100644 → 0
View file @
ad36435f
package
com.mints.flowbox.ui.fragment
import
android.view.View
import
androidx.fragment.app.Fragment
import
androidx.viewpager.widget.ViewPager
import
com.mints.flowbox.R
import
com.mints.flowbox.ui.adapter.MessageFragAdapter
import
com.mints.flowbox.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.flowbox.utils.LogUtil
import
com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
import
com.ximalaya.ting.android.opensdk.datatrasfer.IDataCallBack
import
com.ximalaya.ting.android.opensdk.model.category.CategoryList
import
kotlinx.android.synthetic.main.fragment_main_xmly.*
import
java.util.*
import
kotlin.collections.ArrayList
import
kotlin.concurrent.schedule
/**
* 描述:喜马拉雅
* 作者:孟崔广
*/
class
XmlyFragment
:
LazyLoadBaseFragment
()
{
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_xmly
override
fun
initViewsAndEvents
()
{
}
override
fun
onFragmentFirstVisible
()
{
super
.
onFragmentFirstVisible
()
loadData
()
}
private
fun
loadData
()
{
showLoading
(
"加载中..."
)
// 获取分类数据
val
vo
=
hashMapOf
<
String
,
String
>()
CommonRequest
.
getCategories
(
vo
,
object
:
IDataCallBack
<
CategoryList
>
{
override
fun
onSuccess
(
p0
:
CategoryList
?)
{
initViewAndData
(
p0
)
}
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
LogUtil
.
e
(
p1
)
hideLoading
()
}
})
}
private
fun
initViewAndData
(
categoryList
:
CategoryList
?)
{
// hideLoading()
categoryList
?.
let
{
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
var
tempPageSize
=
18
if
(
it
.
categories
.
size
<
18
)
{
tempPageSize
=
it
.
categories
.
size
}
for
(
i
in
0
until
tempPageSize
)
{
tabs
.
add
(
it
.
categories
[
i
].
categoryName
)
fragments
.
add
(
XmlyPageFragment
(
it
.
categories
[
i
].
id
))
}
Timer
().
schedule
(
1000
)
{
activity
?.
runOnUiThread
{
hideLoading
()
xtFragmentXmly
.
visibility
=
View
.
VISIBLE
}
}
xtFragmentXmly
.
overScrollMode
=
ViewPager
.
OVER_SCROLL_NEVER
vpFragmentXmly
.
offscreenPageLimit
=
tabs
.
size
+
3
val
adapter
=
MessageFragAdapter
(
childFragmentManager
,
fragments
,
tabs
)
vpFragmentXmly
.
adapter
=
adapter
xtFragmentXmly
.
setxTabDisplayNum
(
tabs
.
size
)
xtFragmentXmly
.
setupWithViewPager
(
vpFragmentXmly
)
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/ui/fragment/XmlyPageFragment.kt
deleted
100644 → 0
View file @
ad36435f
package
com.mints.flowbox.ui.fragment
import
android.os.Bundle
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.flowbox.R
import
com.mints.flowbox.ui.activitys.XmlyPlayActivity
import
com.mints.flowbox.ui.adapter.XmlyPageAdapter
import
com.mints.flowbox.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.flowbox.utils.LogUtil
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.ximalaya.ting.android.opensdk.constants.DTransferConstants
import
com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
import
com.ximalaya.ting.android.opensdk.datatrasfer.IDataCallBack
import
com.ximalaya.ting.android.opensdk.model.album.Album
import
com.ximalaya.ting.android.opensdk.model.album.AlbumList
import
kotlinx.android.synthetic.main.fragment_main_xmly_page.*
/**
* 描述:喜马拉雅封面
* 作者:孟崔广
*/
class
XmlyPageFragment
(
private
val
categoryId
:
Long
)
:
LazyLoadBaseFragment
(),
XmlyPageAdapter
.
OnItemClickListener
,
OnRefreshListener
,
OnLoadMoreListener
{
private
lateinit
var
xmlyPageAdapter
:
XmlyPageAdapter
private
var
xmlyData
:
MutableList
<
Album
>
=
mutableListOf
()
// 分页
private
var
xmlyPage
=
1
private
val
PAGE_SIZE
=
10
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_xmly_page
override
fun
initViewsAndEvents
()
{}
private
fun
loadData
()
{
val
vo
=
hashMapOf
<
String
,
String
>()
// 专辑id
vo
[
DTransferConstants
.
CATEGORY_ID
]
=
categoryId
.
toString
()
// 1-最火 2-最新 3-最多播放
vo
[
DTransferConstants
.
CALC_DIMENSION
]
=
"1"
vo
[
DTransferConstants
.
PAGE
]
=
xmlyPage
.
toString
()
vo
[
DTransferConstants
.
PAGE_SIZE
]
=
PAGE_SIZE
.
toString
()
CommonRequest
.
getAlbumList
(
vo
,
object
:
IDataCallBack
<
AlbumList
>
{
override
fun
onSuccess
(
p0
:
AlbumList
?)
{
if
(
p0
!=
null
&&
p0
.
albums
!=
null
&&
p0
.
albums
.
size
!=
0
)
{
activity
?.
runOnUiThread
{
getDataSuc
(
p0
.
albums
)
}
}
else
{
getDataFail
()
}
}
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
LogUtil
.
e
(
p1
)
getDataFail
()
}
})
}
override
fun
onFragmentFirstVisible
()
{
super
.
onFragmentFirstVisible
()
initRvView
()
loadData
()
initListener
()
}
override
fun
onItemClick
(
position
:
Int
)
{
val
bundle
=
Bundle
()
bundle
.
putLong
(
XmlyPlayActivity
.
ALBUM_ID
,
xmlyData
[
position
].
id
)
bundle
.
putLong
(
XmlyPlayActivity
.
CATEGORY_ID
,
categoryId
)
readyGo
(
XmlyPlayActivity
::
class
.
java
,
bundle
)
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
xmlyPage
=
1
xmlyData
.
clear
()
srl_xmly
.
resetNoMoreData
()
loadData
()
}
override
fun
onLoadMore
(
refreshLayout
:
RefreshLayout
)
{
xmlyPage
=
++
xmlyPage
loadData
()
}
private
fun
initRvView
()
{
val
gridLayoutManager
=
GridLayoutManager
(
context
,
2
)
xmlyPageVip
.
layoutManager
=
gridLayoutManager
xmlyPageAdapter
=
XmlyPageAdapter
(
xmlyData
)
xmlyPageVip
.
adapter
=
xmlyPageAdapter
xmlyPageAdapter
.
setOnItemClickListener
(
this
)
}
private
fun
initListener
()
{
srl_xmly
.
setOnRefreshListener
(
this
)
srl_xmly
.
setOnLoadMoreListener
(
this
)
}
/**
* 获取数据失败
*/
private
fun
getDataFail
()
{
srl_xmly
.
finishRefresh
(
false
)
srl_xmly
.
finishLoadMore
(
false
)
xmlyPage
=
if
(
xmlyPage
==
1
)
1
else
xmlyPage
-
1
}
/**
* 获取数据成功
*/
private
fun
getDataSuc
(
list
:
List
<
Album
>)
{
if
(
::
xmlyPageAdapter
.
isInitialized
)
{
xmlyData
.
addAll
(
list
)
if
(
xmlyPage
==
1
)
{
srl_xmly
.
finishRefresh
(
true
)
xmlyPageAdapter
.
notifyDataSetChanged
()
}
else
{
if
(
list
.
size
<
PAGE_SIZE
)
{
srl_xmly
.
finishLoadMoreWithNoMoreData
()
}
else
{
srl_xmly
.
finishLoadMore
()
}
xmlyPageAdapter
.
notifyItemChanged
(
list
.
size
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/flowbox/utils/SystemUtils.kt
View file @
eb94b1c5
...
...
@@ -94,11 +94,11 @@ object SystemUtils {
/** KB 计量单位 */
br
.
close
()
LogUtil
.
d
(
subMemoryLine
)
//
LogUtil.d(subMemoryLine)
val
totalMemorySize
=
subMemoryLine
.
replace
(
"\\D+"
.
toRegex
(),
""
).
toLong
()
*
1024
LogUtil
.
d
(
subMemoryLine
.
replace
(
"\\D+"
.
toRegex
(),
""
).
toLong
())
//
LogUtil.d(subMemoryLine.replace("\\D+".toRegex(), "").toLong())
val
availableSize
:
Long
=
getAvailMemory
(
context
)
return
(((
totalMemorySize
-
availableSize
)
/
totalMemorySize
.
toFloat
())
*
100
).
toInt
()
...
...
app/src/main/java/com/mints/flowbox/utils/ToolUtil.java
View file @
eb94b1c5
...
...
@@ -15,7 +15,7 @@ package com.mints.flowbox.utils;
import
android.content.Context
;
import
android.text.TextUtils
;
import
com.
ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk
;
import
com.
mints.flowbox.BuildConfig
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
...
...
@@ -119,7 +119,7 @@ public class ToolUtil {
public
static
int
isInTime
(
String
time
)
throws
IllegalArgumentException
{
if
(
TextUtils
.
isEmpty
(
time
)
||
!
time
.
contains
(
"-"
)
||
!
time
.
contains
(
":"
))
{
if
(
ConstantsOpenSdk
.
isDebug
)
{
if
(
BuildConfig
.
DEBUG
)
{
throw
new
IllegalArgumentException
(
"Illegal Argument arg:"
+
time
);
}
else
{
return
-
2
;
...
...
@@ -161,7 +161,7 @@ public class ToolUtil {
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
if
(
ConstantsOpenSdk
.
isDebug
)
{
if
(
BuildConfig
.
DEBUG
)
{
throw
new
IllegalArgumentException
(
"Illegal Argument arg:"
+
time
);
}
else
{
...
...
app/src/main/jniLibs/arm64-v8a/libxmediaplayer_x.so
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/jniLibs/arm64-v8a/libxmediaplayerv8.so
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/jniLibs/armeabi-v7a/libxmediaplayer.so
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/jniLibs/armeabi-v7a/libxmediaplayerv7.so
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/jniLibs/armeabi/libxmediaplayer.so
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/jniLibs/armeabi/libxmediaplayerv7.so
deleted
100644 → 0
View file @
ad36435f
File deleted
app/src/main/res/layout/activity_anim.xml
0 → 100644
View file @
eb94b1c5
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/transparent"
>
<com.mints.flowbox.ui.widgets.CircleCleanAnimationView
android:id=
"@+id/ccav_speed"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/activity_award_xmly.xml
deleted
100644 → 0
View file @
ad36435f
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:background=
"@color/black"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:layout_marginRight=
"10dp"
>
<TextView
android:id=
"@+id/tvAwardBack"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_alignParentRight=
"true"
android:background=
"@drawable/shape_back"
android:gravity=
"center"
android:text=
"3"
android:textColor=
"#9F9F9F"
android:textSize=
"16sp"
/>
<ImageView
android:id=
"@+id/ivAwardBack"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_alignParentRight=
"true"
android:src=
"@mipmap/ic_drink_cancel"
android:visibility=
"gone"
/>
</RelativeLayout>
<FrameLayout
android:id=
"@+id/flAwardXmlyAd"
android:layout_width=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_height=
"wrap_content"
>
</FrameLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_increasespeed2.xml
View file @
eb94b1c5
...
...
@@ -79,9 +79,19 @@
<ImageView
android:id=
"@+id/ivGif2"
android:layout_width=
"1
0
0dp"
android:layout_width=
"1
2
0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
/>
android:layout_gravity=
"center_horizontal"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tvInfo2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:textColor=
"@color/white"
android:textSize=
"16sp"
android:visibility=
"gone"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recycleView"
...
...
app/src/main/res/layout/activity_trans.xml
0 → 100644
View file @
eb94b1c5
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"1px"
android:layout_height=
"1px"
android:background=
"@color/transparent"
/>
\ No newline at end of file
app/src/main/res/layout/activity_xmly_play.xml
deleted
100644 → 0
View file @
ad36435f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<include
layout=
"@layout/header_layout"
/>
<RelativeLayout
android:id=
"@+id/control_bar"
android:layout_width=
"match_parent"
android:layout_height=
"116dp"
android:gravity=
"center"
android:padding=
"10dp"
android:visibility=
"invisible"
>
<ImageView
android:id=
"@+id/sound_cover"
android:layout_width=
"110dp"
android:layout_height=
"110dp"
android:layout_alignParentStart=
"true"
android:scaleType=
"fitCenter"
android:src=
"@drawable/ic_launcher_main"
/>
<TextView
android:id=
"@+id/message"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:layout_marginBottom=
"6dp"
android:layout_toEndOf=
"@id/sound_cover"
android:maxLines=
"1"
android:text=
" - "
android:textColor=
"@color/color_333"
/>
<TextView
android:id=
"@+id/time"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/message"
android:layout_marginStart=
"10dp"
android:layout_marginBottom=
"6dp"
android:layout_toEndOf=
"@id/sound_cover"
android:maxLines=
"1"
android:text=
"[ - / - ]"
android:textColor=
"@color/color_333"
/>
<SeekBar
android:id=
"@+id/seek_bar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/time"
android:layout_alignParentEnd=
"true"
android:layout_toEndOf=
"@+id/sound_cover"
android:maxHeight=
"10dp"
android:minHeight=
"10dp"
android:paddingStart=
"6dp"
android:paddingEnd=
"6dp"
android:progressDrawable=
"@drawable/seekbar_progress_color"
android:saveEnabled=
"false"
android:splitTrack=
"false"
android:thumb=
"@mipmap/icon_seekbar_block"
android:thumbOffset=
"0dp"
/>
<ProgressBar
android:id=
"@+id/buffering_progress"
style=
"?android:attr/progressBarStyleSmall"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:visibility=
"gone"
/>
<ImageButton
android:id=
"@+id/pre_sound"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignStart=
"@+id/seek_bar"
android:layout_alignParentBottom=
"true"
android:background=
"@color/transparent"
android:paddingStart=
"6dp"
android:paddingEnd=
"6dp"
android:scaleType=
"fitCenter"
android:src=
"@mipmap/pre_icon_transparent_normal"
/>
<ImageButton
android:id=
"@+id/play_or_pause"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignTop=
"@+id/pre_sound"
android:layout_toRightOf=
"@+id/pre_sound"
android:background=
"@color/transparent"
android:paddingStart=
"6dp"
android:paddingEnd=
"6dp"
android:scaleType=
"fitCenter"
android:src=
"@mipmap/widget_play_normal"
/>
<ImageButton
android:id=
"@+id/next_sound"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignTop=
"@+id/pre_sound"
android:layout_toEndOf=
"@+id/play_or_pause"
android:background=
"@color/transparent"
android:paddingStart=
"6dp"
android:paddingEnd=
"6dp"
android:scaleType=
"fitCenter"
android:src=
"@mipmap/next_icon_transparent_normal"
/>
</RelativeLayout>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/srl_xmly"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:srlAccentColor=
"@color/gray"
app:srlPrimaryColor=
"@color/color_50E8E8E8"
>
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/xmlyPageVip"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@null"
android:overScrollMode=
"never"
/>
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
app/src/main/res/layout/fragment_main_xmly.xml
deleted
100644 → 0
View file @
ad36435f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<com.androidkun.xtablayout.XTabLayout
android:id=
"@+id/xtFragmentXmly"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"invisible"
app:xTabIndicatorColor=
"@color/color_main"
app:xTabIndicatorHeight=
"4dp"
app:xTabIndicatorRoundX=
"30dp"
app:xTabIndicatorRoundY=
"30dp"
app:xTabIndicatorWidth=
"20dp"
app:xTabMode=
"scrollable"
app:xTabSelectedTextColor=
"@color/color_main"
app:xTabSelectedTextSize=
"18sp"
app:xTabTextColor=
"#000"
app:xTabTextSize=
"14sp"
/>
<com.mints.flowbox.ui.widgets.MyViewPager
android:id=
"@+id/vpFragmentXmly"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
app/src/main/res/layout/fragment_main_xmly_page.xml
deleted
100755 → 0
View file @
ad36435f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_50E8E8E8"
android:orientation=
"vertical"
>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/srl_xmly"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:srlAccentColor=
"@color/gray"
app:srlPrimaryColor=
"@color/color_50E8E8E8"
>
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/xmlyPageVip"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"6dp"
android:layout_marginBottom=
"6dp"
android:background=
"@null"
android:overScrollMode=
"never"
/>
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
app/src/main/res/values/themes.xml
View file @
eb94b1c5
...
...
@@ -16,6 +16,27 @@
<item
name=
"android:windowBackground"
>
@color/transparent
</item>
</style>
<style
name=
"OnePxActivityStyle"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<!-- 窗体背景颜色为透明 -->
<item
name=
"android:windowBackground"
>
@android:color/transparent
</item>
<!-- 窗体没有边框 -->
<item
name=
"android:windowFrame"
>
@null
</item>
<!-- 窗体不包含标题栏 -->
<item
name=
"android:windowNoTitle"
>
true
</item>
<!-- 窗体悬浮 -->
<item
name=
"android:windowIsFloating"
>
true
</item>
<!-- 自定义TitleBar时去掉多余的阴影-->
<item
name=
"android:windowContentOverlay"
>
@null
</item>
<!-- 不允许窗体背景变暗-->
<item
name=
"android:backgroundDimEnabled"
>
false
</item>
<!-- 窗体切换无动画-->
<item
name=
"android:windowAnimationStyle"
>
@null
</item>
<!-- 禁用窗口的预览动画-->
<item
name=
"android:windowDisablePreview"
>
true
</item>
<item
name=
"android:windowNoDisplay"
>
false
</item>
<item
name=
"android:windowIsTranslucent"
>
true
</item>
</style>
<style
name=
"AppTheme.Base"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
...
...
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