Commit 45d3998f authored by jyx's avatar jyx

更换引导页

parent dc2b8731
......@@ -224,6 +224,21 @@ dependencies {
// BASE64Decoder(已集成)
// 三方接入
// 一览视频
implementation("com.yilan.sdk:ui:3.3.3.6") {
exclude group: 'com.yilan.sdk', module: 'yb_extra'
exclude group: 'com.yilan.sdk', module: 'gdt'
exclude group: 'com.yilan.sdk', module: 'ks'
}
implementation('com.aliyun.ams:alicloud-android-httpdns:1.2.3@aar') {
transitive true
}
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8'
// leakcanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// 极光推送
......@@ -256,12 +271,12 @@ dependencies {
implementation(name: 'tzsdk_core-3.0.0-20200807131516-release', ext: 'aar')
implementation(name: 'tzsdk_reporter-3.0.0-20200807131516-release', ext: 'aar')
// 快手
implementation(name: 'kssdk-all--3.3.16-publishRelease-9ffe2b94e', ext: 'aar')
implementation(name: 'kssdk-ad-3.3.9', ext: 'aar')
// 穿山甲 GroMore
// mediation_ad_sdk
implementation(name: 'mediation_ad_sdk_2.7.1.2', ext: 'aar')
implementation(name: 'gdt_adapter_4.351.1221.1', ext: 'aar')
implementation(name: 'ks_adapter_3.3.9.0', ext: 'aar')
implementation(name: 'mediation_ad_sdk_2.8.0.2', ext: 'aar')
implementation(name: 'gdt_adapter_4.351.1221.3', ext: 'aar')
implementation(name: 'ks_adapter_3.3.9.2', ext: 'aar')
// 穿山甲广告 版本3.6.1.3
implementation(name: 'open_ad_sdk_3.6.1.3', ext: 'aar')
// 广点通广告 腾讯
......
......@@ -4,7 +4,6 @@
package="com.mints.flowbox">
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
......@@ -53,7 +52,7 @@
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher_main"
android:label="@string/app_name"
android:label="@string/appName"
android:largeHeap="true"
android:maxAspectRatio="3"
android:networkSecurityConfig="@xml/network_security_config"
......@@ -304,10 +303,6 @@
<!-- 常驻通知栏service -->
<service android:name="com.mints.flowbox.keepalive.NotificationService" />
<service
android:name=".clean.CleanerService"
android:exported="false" />
</application>
</manifest>
\ No newline at end of file
......@@ -18,12 +18,15 @@ import com.activityutil.ActivityManagerProxyImpl;
import com.ad.AdHelper;
import com.hjq.toast.ToastUtils;
import com.mints.flowbox.common.Constant;
import com.mints.flowbox.keepalive.BatteryWatch;
import com.mints.flowbox.keepalive.DemoEventLogger;
import com.mints.flowbox.keepalive.NotificationService;
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.manager.CsjGroMoreManager;
import com.mints.flowbox.manager.YlVideoManager;
import com.mints.flowbox.manager.ad.KsManager;
import com.mints.flowbox.manager.ad.MhManager;
import com.mints.flowbox.manager.MiitHelper;
......@@ -108,6 +111,8 @@ public class MintsApplication extends BaseApp {
if (isMainProcess || (processName != null && processName.endsWith(":channel"))) {
if (BuildConfig.DEBUG) Log.w(TAG, "init: umeng init");
System.out.println("mints ------------> umengConfig <------------");
// UmengHelper.init(this, channel);
}
......@@ -176,12 +181,53 @@ public class MintsApplication extends BaseApp {
Toast.makeText(this, "测试:主进程重启成功", Toast.LENGTH_LONG).show();
}
new ScreenWatch(MintsApplication.this)
.begin(() -> {
Intent intent = new Intent(MintsApplication.getContext(), ScreenActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MintsApplication.this.startActivity(intent);
});
// 监听锁屏状态
ScreenWatch.getInstance(this).begin(() -> {
Intent intent = new Intent(MintsApplication.getContext(), ScreenActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MintsApplication.this.startActivity(intent);
ToastUtils.show("--> 唤醒屏幕 <--");
});
// 监听充电状态
BatteryWatch.getInstance(this).begin(new BatteryWatch.BatteryStateListener() {
@Override
public void onCharging() {
Intent intent = new Intent(MintsApplication.getContext(), ScreenActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MintsApplication.this.startActivity(intent);
ToastUtils.show("--> 正在充电 <--");
}
@Override
public void onUnCharging() {
Intent intent = new Intent(MintsApplication.getContext(), ScreenActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MintsApplication.this.startActivity(intent);
ToastUtils.show("--> 停止充电 <--");
}
});
PackageWatch.getInstance(this).begin(new PackageWatch.InstallStateListener() {
@Override
public void onAdded() {
ToastUtils.show("--> APK安装 <--");
}
@Override
public void onReplaced() {
ToastUtils.show("--> APK卸载 <--");
}
@Override
public void onRemoved() {
ToastUtils.show("--> APK移除 <--");
}
});
}
// 保活: 保活最后一步
......@@ -226,7 +272,8 @@ public class MintsApplication extends BaseApp {
* 三方配置
*/
private void thirdConfig() {
Log.d(TAG, "thirdConfig");
System.out.println("mints ------------> thirdConfig <------------");
// 初始化toast
initToast();
......@@ -261,6 +308,9 @@ public class MintsApplication extends BaseApp {
// 喜马拉雅
XmManager.INSTANCE.init(this);
// 一览视频
YlVideoManager.INSTANCE.init(this);
// 自定义logger
bindLogger();
......
......@@ -14,7 +14,6 @@ import com.bytedance.msdk.api.*
import com.bytedance.msdk.api.nativeAd.*
import com.mints.flowbox.MintsApplication
import com.mints.flowbox.R
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.CsjGroMoreManager
import com.mints.flowbox.manager.TrackManager
......@@ -68,7 +67,8 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
private fun loadAd() {
mTTAdNative = TTUnifiedNativeAd(MintsApplication.getContext(), CsjGroMoreManager.AD_UNIT_EXPRESS_ID)
mTTAdNative =
TTUnifiedNativeAd(MintsApplication.getContext(), CsjGroMoreManager.AD_UNIT_EXPRESS_ID)
//视频声音控制设置
var videoOption: TTVideoOption = VideoOptionUtil.getTTVideoOption()
......@@ -82,14 +82,16 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
//针对Admob Native的特殊配置项
val admobNativeAdOptions = AdmobNativeAdOptions()
admobNativeAdOptions.setAdChoicesPlacement(AdmobNativeAdOptions.ADCHOICES_TOP_RIGHT) //设置广告小标默认情况下,广告选择叠加层会显示在右上角。
.setRequestMultipleImages(true).isReturnUrlsForImageAssets = true //设置为true,SDK会仅提供Uri字段的值,允许自行决定是否下载实际图片,同时不会提供Drawable字段的值
.setRequestMultipleImages(true).isReturnUrlsForImageAssets =
true //设置为true,SDK会仅提供Uri字段的值,允许自行决定是否下载实际图片,同时不会提供Drawable字段的值
// 针对Gdt Native自渲染广告,可以自定义gdt logo的布局参数。该参数可选,非必须。
val gdtNativeAdLogUtiloParams = FrameLayout.LayoutParams(
BubbleUtils.dp2px(40),
BubbleUtils.dp2px(14),
Gravity.END or Gravity.TOP) // 例如,放在右上角
BubbleUtils.dp2px(40),
BubbleUtils.dp2px(14),
Gravity.END or Gravity.TOP
) // 例如,放在右上角
/**
* 创建feed广告请求类型参数AdSlot,具体参数含义参考文档
......@@ -104,13 +106,13 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
* 2:如果是信息流模板广告,宽度设置为希望的宽度,高度设置为0(0为高度选择自适应参数)
*/
val adSlot = AdSlot.Builder()
.setTTVideoOption(videoOption) //视频声音相关的配置
.setAdmobNativeAdOptions(admobNativeAdOptions)
.setAdStyleType(mAdStyle) //必传,表示请求的模板广告还是原生广告,AdSlot.TYPE_EXPRESS_AD:模板广告 ; AdSlot.TYPE_NATIVE_AD:原生广告
.setImageAdSize(340, 0) // 必选参数 单位dp ,详情见上面备注解释
.setAdCount(1) //请求广告数量为1到3条
.setGdtNativeAdLogoParams(gdtNativeAdLogUtiloParams) // 设置gdt logo布局参数。
.build()
.setTTVideoOption(videoOption) //视频声音相关的配置
.setAdmobNativeAdOptions(admobNativeAdOptions)
.setAdStyleType(mAdStyle) //必传,表示请求的模板广告还是原生广告,AdSlot.TYPE_EXPRESS_AD:模板广告 ; AdSlot.TYPE_NATIVE_AD:原生广告
.setImageAdSize(340, 0) // 必选参数 单位dp ,详情见上面备注解释
.setAdCount(1) //请求广告数量为1到3条
.setGdtNativeAdLogoParams(gdtNativeAdLogUtiloParams) // 设置gdt logo布局参数。
.build()
//请求广告,调用feed广告异步请求接口,加载到广告后,拿到广告素材自定义渲染
/**
......@@ -130,7 +132,10 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
for (ttNativeAd in ads) {
LogUtil.e(TAG, " ")
LogUtil.e(TAG, "adNetworkPlatformId: " + ttNativeAd.adNetworkPlatformId + " adNetworkRitId:" + ttNativeAd.adNetworkRitId + " preEcpm: " + ttNativeAd.preEcpm)
LogUtil.e(
TAG,
"adNetworkPlatformId: " + ttNativeAd.adNetworkPlatformId + " adNetworkRitId:" + ttNativeAd.adNetworkRitId + " preEcpm: " + ttNativeAd.preEcpm
)
}
if (ads.size > 0) {
......@@ -202,10 +207,12 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
//渲染模板广告
private fun getExpressAdView(ad: TTNativeAd): View? {
val adViewHolder: ExpressAdViewHolder
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_native_express, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_native_express, null, false)
try {
adViewHolder = ExpressAdViewHolder()
adViewHolder.mAdContainerView = convertView.findViewById(R.id.iv_listitem_express) as FrameLayout
adViewHolder.mAdContainerView =
convertView.findViewById(R.id.iv_listitem_express) as FrameLayout
convertView.tag = adViewHolder
//判断是否存在dislike按钮
......@@ -241,9 +248,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
LogUtil.d(TAG, "onRenderFail code=$code,msg=$msg")
}
// ** 注意点 ** 不要在广告加载成功回调里进行广告view展示,要在onRenderSucces进行广告view展示,否则会导致广告无法展示。
// 另外,不要直接使用参数view,而是通过ad.getExpressView()来获取广告view。
override fun onRenderSuccess(view: View, width: Float, height: Float) {
override fun onRenderSuccess(width: Float, height: Float) {
LogUtil.d(TAG, "onRenderSuccess")
//回调渲染成功后将模板布局添加的父View中
if (adViewHolder.mAdContainerView != null) {
......@@ -267,6 +272,8 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
}
}
})
......@@ -304,30 +311,36 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
* @return
*/
private fun getVerticalAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_vertical_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_vertical_pic, null, false)
val adViewHolder = VerticalAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource = convertView.findViewById(R.id.tv_listitem_ad_source) as TextView
adViewHolder.mDescription = convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mDescription =
convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mVerticalImage = convertView.findViewById(R.id.iv_listitem_image)
adViewHolder.mIcon = convertView.findViewById<View>(R.id.iv_listitem_icon) as ImageView
adViewHolder.mDislike = convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton = convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mDislike =
convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton =
convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mLogo = convertView.findViewById(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
val viewBinder: TTViewBinder = TTViewBinder.Builder(R.layout.listitem_ad_vertical_pic)
.titleId(R.id.tv_listitem_ad_title)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.mainImageId(R.id.iv_listitem_image)
.iconImageId(R.id.iv_listitem_icon)
.callToActionId(R.id.btn_listitem_creative)
.sourceId(R.id.tv_listitem_ad_source)
.logoLayoutId(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
.build()
.titleId(R.id.tv_listitem_ad_title)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.mainImageId(R.id.iv_listitem_image)
.iconImageId(R.id.iv_listitem_icon)
.callToActionId(R.id.btn_listitem_creative)
.sourceId(R.id.tv_listitem_ad_source)
.logoLayoutId(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
.build()
adViewHolder.viewBinder = viewBinder
convertView.tag = adViewHolder
bindData(convertView, adViewHolder, ad, viewBinder)
if (ad.imageUrl != null) {
adViewHolder.mVerticalImage?.let { Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it) }
adViewHolder.mVerticalImage?.let {
Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it)
}
}
return convertView
}
......@@ -336,28 +349,36 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
private fun getVideoView(ad: TTNativeAd): View? {
val adViewHolder: VideoAdViewHolder
val viewBinder: TTViewBinder
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_large_video, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_large_video, null, false)
try {
adViewHolder = VideoAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mDescription = convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mSource = convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
adViewHolder.videoView = convertView.findViewById<View>(R.id.iv_listitem_video) as FrameLayout
adViewHolder.mTitle =
convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mDescription =
convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mSource =
convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
adViewHolder.videoView =
convertView.findViewById<View>(R.id.iv_listitem_video) as FrameLayout
adViewHolder.mIcon = convertView.findViewById<View>(R.id.iv_listitem_icon) as ImageView
adViewHolder.mDislike = convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton = convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mLogo = convertView.findViewById(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
adViewHolder.mDislike =
convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton =
convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mLogo =
convertView.findViewById(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
//TTViewBinder 是必须类,需要开发者在确定好View之后把Id设置给TTViewBinder类,并在注册事件时传递给SDK
viewBinder = TTViewBinder.Builder(R.layout.listitem_ad_large_video)
.titleId(R.id.tv_listitem_ad_title)
.sourceId(R.id.tv_listitem_ad_source)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.mediaViewIdId(R.id.iv_listitem_video)
.callToActionId(R.id.btn_listitem_creative)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议传入GroupView类型
.iconImageId(R.id.iv_listitem_icon)
.build()
.titleId(R.id.tv_listitem_ad_title)
.sourceId(R.id.tv_listitem_ad_source)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.mediaViewIdId(R.id.iv_listitem_video)
.callToActionId(R.id.btn_listitem_creative)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议传入GroupView类型
.iconImageId(R.id.iv_listitem_icon)
.build()
adViewHolder.viewBinder = viewBinder
convertView.tag = adViewHolder
......@@ -393,36 +414,46 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
private fun getLargeAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_large_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_large_pic, null, false)
val adViewHolder = LargeAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mDescription = convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mSource = convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
adViewHolder.mLargeImage = convertView.findViewById<View>(R.id.iv_listitem_image) as ImageView
adViewHolder.mTitle =
convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mDescription =
convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mSource =
convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
adViewHolder.mLargeImage =
convertView.findViewById<View>(R.id.iv_listitem_image) as ImageView
adViewHolder.mIcon = convertView.findViewById<View>(R.id.iv_listitem_icon) as ImageView
adViewHolder.mDislike = convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton = convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mDislike =
convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton =
convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mLogo = convertView.findViewById(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
val viewBinder: TTViewBinder = TTViewBinder.Builder(R.layout.listitem_ad_large_pic)
.titleId(R.id.tv_listitem_ad_title)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.sourceId(R.id.tv_listitem_ad_source)
.mainImageId(R.id.iv_listitem_image)
.callToActionId(R.id.btn_listitem_creative)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议传入GroupView类型
.iconImageId(R.id.iv_listitem_icon)
.build()
.titleId(R.id.tv_listitem_ad_title)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.sourceId(R.id.tv_listitem_ad_source)
.mainImageId(R.id.iv_listitem_image)
.callToActionId(R.id.btn_listitem_creative)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议传入GroupView类型
.iconImageId(R.id.iv_listitem_icon)
.build()
adViewHolder.viewBinder = viewBinder
convertView.tag = adViewHolder
bindData(convertView, adViewHolder, ad, viewBinder)
if (ad.imageUrl != null) {
adViewHolder.mLargeImage?.let { Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it) }
adViewHolder.mLargeImage?.let {
Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it)
}
}
return convertView
}
private fun getGroupAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_group_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_group_pic, null, false)
val adViewHolder = GroupAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource = convertView.findViewById(R.id.tv_listitem_ad_source) as TextView
......@@ -432,17 +463,18 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
adViewHolder.mGroupImage3 = convertView.findViewById(R.id.iv_listitem_image3) as ImageView
adViewHolder.mIcon = convertView.findViewById(R.id.iv_listitem_icon) as ImageView
adViewHolder.mDislike = convertView.findViewById(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton = convertView.findViewById(R.id.btn_listitem_creative) as Button
adViewHolder.mCreativeButton =
convertView.findViewById(R.id.btn_listitem_creative) as Button
adViewHolder.mLogo = convertView.findViewById(R.id.tt_ad_logo) //logoView 建议传入GroupView类型
val viewBinder: TTViewBinder = TTViewBinder.Builder(R.layout.listitem_ad_group_pic)
.titleId(R.id.tv_listitem_ad_title)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.sourceId(R.id.tv_listitem_ad_source)//传第一张即可
.mainImageId(R.id.iv_listitem_image1)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议传入GroupView类型
.callToActionId(R.id.btn_listitem_creative)
.iconImageId(R.id.iv_listitem_icon)
.build()
.titleId(R.id.tv_listitem_ad_title)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.sourceId(R.id.tv_listitem_ad_source)//传第一张即可
.mainImageId(R.id.iv_listitem_image1)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议传入GroupView类型
.callToActionId(R.id.btn_listitem_creative)
.iconImageId(R.id.iv_listitem_icon)
.build()
adViewHolder.viewBinder = viewBinder
convertView.tag = adViewHolder
bindData(convertView, adViewHolder, ad, viewBinder)
......@@ -451,48 +483,68 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
val image2 = ad.imageList[1]
val image3 = ad.imageList[2]
if (image1 != null) {
adViewHolder.mGroupImage1?.let { Glide.with(MintsApplication.getContext()).load(image1).into(it) }
adViewHolder.mGroupImage1?.let {
Glide.with(MintsApplication.getContext()).load(image1).into(it)
}
}
if (image2 != null) {
adViewHolder.mGroupImage2?.let { Glide.with(MintsApplication.getContext()).load(image2).into(it) }
adViewHolder.mGroupImage2?.let {
Glide.with(MintsApplication.getContext()).load(image2).into(it)
}
}
if (image3 != null) {
adViewHolder.mGroupImage3?.let { Glide.with(MintsApplication.getContext()).load(image3).into(it) }
adViewHolder.mGroupImage3?.let {
Glide.with(MintsApplication.getContext()).load(image3).into(it)
}
}
}
return convertView
}
private fun getSmallAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_small_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_small_pic, null, false)
val adViewHolder = SmallAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource = convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
adViewHolder.mDescription = convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mSmallImage = convertView.findViewById<View>(R.id.iv_listitem_image) as ImageView
adViewHolder.mTitle =
convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource =
convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
adViewHolder.mDescription =
convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
adViewHolder.mSmallImage =
convertView.findViewById<View>(R.id.iv_listitem_image) as ImageView
adViewHolder.mIcon = convertView.findViewById<View>(R.id.iv_listitem_icon) as ImageView
adViewHolder.mDislike = convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton = convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
adViewHolder.mDislike =
convertView.findViewById<View>(R.id.iv_listitem_dislike) as ImageView
adViewHolder.mCreativeButton =
convertView.findViewById<View>(R.id.btn_listitem_creative) as Button
val viewBinder: TTViewBinder = TTViewBinder.Builder(R.layout.listitem_ad_small_pic)
.titleId(R.id.tv_listitem_ad_title)
.sourceId(R.id.tv_listitem_ad_source)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.mainImageId(R.id.iv_listitem_image)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议为GroupView 类型
.callToActionId(R.id.btn_listitem_creative)
.iconImageId(R.id.iv_listitem_icon)
.build()
.titleId(R.id.tv_listitem_ad_title)
.sourceId(R.id.tv_listitem_ad_source)
.decriptionTextId(R.id.tv_listitem_ad_desc)
.mainImageId(R.id.iv_listitem_image)
.logoLayoutId(R.id.tt_ad_logo)//logoView 建议为GroupView 类型
.callToActionId(R.id.btn_listitem_creative)
.iconImageId(R.id.iv_listitem_icon)
.build()
adViewHolder.viewBinder = viewBinder
convertView.tag = adViewHolder
bindData(convertView, adViewHolder, ad, viewBinder)
if (ad.imageUrl != null) {
adViewHolder.mSmallImage?.let { Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it) }
adViewHolder.mSmallImage?.let {
Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it)
}
}
return convertView
}
private fun bindData(convertView: View, adViewHolder: AdViewHolder, ad: TTNativeAd, viewBinder: TTViewBinder) {
private fun bindData(
convertView: View,
adViewHolder: AdViewHolder,
ad: TTNativeAd,
viewBinder: TTViewBinder
) {
//设置dislike弹窗,如果有
// if (ad.hasDislike()) {
// val ttAdDislike = ad.getDislikeDialog( MintsApplication.getContext() as Activity?)
......@@ -552,13 +604,16 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
adViewHolder.mSource?.text = if (TextUtils.isEmpty(ad.source)) "广告来源" else ad.source
val icon = ad.iconUrl
if (icon != null) {
adViewHolder.mIcon?.let { Glide.with(MintsApplication.getContext()).load(icon).into(it) }
adViewHolder.mIcon?.let {
Glide.with(MintsApplication.getContext()).load(icon).into(it)
}
}
val adCreativeButton: Button? = adViewHolder.mCreativeButton
when (ad.interactionType) {
TTAdConstant.INTERACTION_TYPE_DOWNLOAD -> {
adCreativeButton?.visibility = View.VISIBLE
adCreativeButton?.text = if (TextUtils.isEmpty(ad.actionText)) "立即下载" else ad.actionText
adCreativeButton?.text =
if (TextUtils.isEmpty(ad.actionText)) "立即下载" else ad.actionText
}
TTAdConstant.INTERACTION_TYPE_DIAL -> {
adCreativeButton?.visibility = View.VISIBLE
......@@ -566,7 +621,8 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
TTAdConstant.INTERACTION_TYPE_LANDING_PAGE, TTAdConstant.INTERACTION_TYPE_BROWSER -> {
adCreativeButton?.visibility = View.VISIBLE
adCreativeButton?.text = if (TextUtils.isEmpty(ad.actionText)) "查看详情" else ad.actionText
adCreativeButton?.text =
if (TextUtils.isEmpty(ad.actionText)) "查看详情" else ad.actionText
}
else -> {
adCreativeButton?.visibility = View.GONE
......
......@@ -12,7 +12,6 @@ import com.bytedance.msdk.api.*
import com.bytedance.msdk.api.nativeAd.*
import com.mints.flowbox.MintsApplication
import com.mints.flowbox.R
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.CsjGroMoreManager
import com.mints.flowbox.manager.TrackManager
......@@ -152,7 +151,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
})
}
fun getADFrameLayout(): FrameLayout? {
fun getADFrameLayout(): FrameLayout {
return sAdFrameLayout
}
......@@ -205,7 +204,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
}
//渲染模板广告
private fun getExpressAdView(ad: TTNativeAd): View? {
private fun getExpressAdView(ad: TTNativeAd): View {
val adViewHolder: ExpressAdViewHolder
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_native_express, null, false)
......@@ -248,9 +247,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
LogUtil.d(TAG, "onRenderFail code=$code,msg=$msg")
}
// ** 注意点 ** 不要在广告加载成功回调里进行广告view展示,要在onRenderSucces进行广告view展示,否则会导致广告无法展示。
// 另外,不要直接使用参数view,而是通过ad.getExpressView()来获取广告view。
override fun onRenderSuccess(view: View, width: Float, height: Float) {
override fun onRenderSuccess(width: Float, height: Float) {
LogUtil.d(TAG, "onRenderSuccess")
//回调渲染成功后将模板布局添加的父View中
if (adViewHolder.mAdContainerView != null) {
......@@ -262,7 +259,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
sWidth = FrameLayout.LayoutParams.MATCH_PARENT
sHeight = FrameLayout.LayoutParams.WRAP_CONTENT
} else {
sWidth = UIUtils.getScreenWidth(MintsApplication.getContext()).toInt()
sWidth = UIUtils.getScreenWidth(MintsApplication.getContext())
sHeight = (sWidth * height / width).toInt()
}
if (video != null) {
......@@ -274,6 +271,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
}
}
}
})
......@@ -310,7 +308,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
* @param ad
* @return
*/
private fun getVerticalAdView(ad: TTNativeAd): View? {
private fun getVerticalAdView(ad: TTNativeAd): View {
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_vertical_pic, null, false)
val adViewHolder = VerticalAdViewHolder()
......@@ -413,7 +411,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
return convertView
}
private fun getLargeAdView(ad: TTNativeAd): View? {
private fun getLargeAdView(ad: TTNativeAd): View {
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_large_pic, null, false)
val adViewHolder = LargeAdViewHolder()
......@@ -451,7 +449,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
return convertView
}
private fun getGroupAdView(ad: TTNativeAd): View? {
private fun getGroupAdView(ad: TTNativeAd): View {
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_group_pic, null, false)
val adViewHolder = GroupAdViewHolder()
......@@ -501,7 +499,7 @@ class GroMoreExpressManager : TTSettingConfigCallback {
return convertView
}
private fun getSmallAdView(ad: TTNativeAd): View? {
private fun getSmallAdView(ad: TTNativeAd): View {
val convertView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.listitem_ad_small_pic, null, false)
val adViewHolder = SmallAdViewHolder()
......
......@@ -61,7 +61,7 @@ public class TaskAsyncTack extends AsyncTask<Void, Void, List<CacheListItem>> {
Thread.sleep(1000);
break;
case TASK_TYPE_UNUSEPKG:
FileScanManager.INSTANCE.getSuffixFiles(filePaths -> {
FileScanManager.INSTANCE.getSuffixFilesAsync(filePaths -> {
for (String filePath : filePaths) {
cacheListItems.add(AppUtil.INSTANCE.getApkInfo(MintsApplication.getContext(), filePath));
}
......
......@@ -336,7 +336,7 @@ class DeviceInfo private constructor() {
get() {
var appName = ""
try {
appName = mContext!!.resources.getString(R.string.app_name)
appName = mContext!!.resources.getString(R.string.appName)
} catch (e: Exception) {
e.printStackTrace()
}
......
package com.mints.flowbox.keepalive;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.BatteryManager;
import com.mints.flowbox.MintsApplication;
/**
* @author jyx
* @date 2021/6/18
* @des 电池监听
*/
public class BatteryWatch {
private static BatteryWatch instance;
public static BatteryWatch getInstance(Context context) {
if (instance == null) instance = new BatteryWatch(context);
return instance;
}
private final Context mContext;
private final BroadcastReceiver mReceiver;
private BatteryStateListener mStateListener;
private BatteryWatch(Context context) {
mContext = context;
mReceiver = new BatteryBroadcastReceiver();
}
/**
* 电池状态广播接收者
*/
private class BatteryBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
if (status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL) {
mStateListener.onCharging();
} else {
mStateListener.onUnCharging();
}
}
}
/**
* 开始监听电池状态
*/
public void begin(BatteryStateListener listener) {
mStateListener = listener;
registerListener();
}
/**
* 停止充电状态监听
*/
public void unregisterListener() {
mContext.unregisterReceiver(mReceiver);
}
/**
* 启动充电状态广播接收器
*/
private void registerListener() {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_POWER_CONNECTED);
filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
mContext.registerReceiver(mReceiver, filter);
}
public interface BatteryStateListener {// 返回给调用者屏幕状态信息
void onCharging();
void onUnCharging();
}
}
package com.mints.flowbox.keepalive;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
/**
* @author jyx
* @date 2021/6/18
* @des app 安装卸载重装
*/
public class PackageWatch {
private static PackageWatch instance;
public static PackageWatch getInstance(Context context) {
if (instance == null) instance = new PackageWatch(context);
return instance;
}
private final Context mContext;
private final BroadcastReceiver mReceiver;
private InstallStateListener mStateListener;
private PackageWatch(Context context) {
mContext = context;
mReceiver = new InstallBroadcastReceiver();
}
/**
* app安装卸载广播接收者
*/
private class InstallBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
PackageManager manager = context.getPackageManager();
if (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED)) {
String packageName = intent.getData().getSchemeSpecificPart();
mStateListener.onAdded();
}
if (intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED)) {
String packageName = intent.getData().getSchemeSpecificPart();
mStateListener.onRemoved();
}
if (intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED)) {
String packageName = intent.getData().getSchemeSpecificPart();
mStateListener.onReplaced();
}
}
}
/**
* 开始监听apk安装卸载重装相应状态
*/
public void begin(InstallStateListener listener) {
mStateListener = listener;
registerListener();
}
/**
* 停止apk安装卸载重装相应状态
*/
public void unregisterListener() {
mContext.unregisterReceiver(mReceiver);
}
/**
* 启动apk安装卸载重装广播接收器
*/
private void registerListener() {
IntentFilter filter = new IntentFilter();
filter.addAction("android.intent.action.PACKAGE_ADDED");
filter.addAction("android.intent.action.PACKAGE_REPLACED");
filter.addAction("android.intent.action.PACKAGE_REMOVED");
filter.addDataScheme("package");
mContext.registerReceiver(mReceiver, filter);
}
public interface InstallStateListener {
void onAdded();
void onReplaced();
void onRemoved();
}
}
......@@ -5,21 +5,31 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.mints.flowbox.MintsApplication;
/**
* @author jyx
* @date 2021/6/18
* @des 锁屏监听
*/
public class ScreenWatch {
private Context mContext;
private ScreenBroadcastReceiver mScreenReceiver;
private final Context mContext;
private final ScreenBroadcastReceiver mScreenReceiver;
private ScreenStateListener mScreenStateListener;
public ScreenWatch(Context context) {
private ScreenWatch(Context context) {
mContext = context;
mScreenReceiver = new ScreenBroadcastReceiver();
}
private static ScreenWatch instance;
public static ScreenWatch getInstance(Context context) {
if (instance == null) instance = new ScreenWatch(context);
return instance;
}
/**
* screen状态广播接收者
*/
......@@ -34,8 +44,6 @@ public class ScreenWatch {
/**
* 开始监听screen状态
*
* @param listener
*/
public void begin(ScreenStateListener listener) {
mScreenStateListener = listener;
......
package com.mints.flowbox.keepalive;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.BatteryManager;
/**
* @author jyx
* @date 2021/6/18
* @des 电池监听
*/
public class WifiStateWatch {
private static WifiStateWatch instance;
public static WifiStateWatch getInstance(Context context) {
if (instance == null) instance = new WifiStateWatch(context);
return instance;
}
private final Context mContext;
private final BroadcastReceiver mReceiver;
private WifiStateListener mStateListener;
private WifiStateWatch(Context context) {
mContext = context;
mReceiver = new WifiBroadcastReceiver();
}
/**
* 电池状态广播接收者
*/
private class WifiBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
if (status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL) {
mStateListener.onWifiOpen();
} else {
mStateListener.onWifiClose();
}
}
}
/**
* 开始监听电池状态
*/
public void begin(WifiStateListener listener) {
mStateListener = listener;
registerListener();
}
/**
* 停止充电状态监听
*/
public void unregisterListener() {
mContext.unregisterReceiver(mReceiver);
}
/**
* 启动充电状态广播接收器
*/
private void registerListener() {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_POWER_CONNECTED);
filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
mContext.registerReceiver(mReceiver, filter);
}
public interface WifiStateListener {// 返回给调用者屏幕状态信息
void onWifiOpen();
void onWifiClose();
}
}
......@@ -28,9 +28,13 @@ object FileScanManager {
mEligibleFiles.clear()
val sdDir = Environment.getExternalStorageDirectory()
val listFiles = sdDir.listFiles()
getSuffixFile(listFiles, *suffixs)
if (listFiles != null) {
getSuffixFile(listFiles, *suffixs)
callback.onSuccess(mEligibleFiles)
callback.onSuccess(mEligibleFiles)
} else {
callback.onSuccess(mEligibleFiles)
}
}
/**
......
......@@ -79,11 +79,7 @@ public class TtCsjAdManager {
private static TTAdConfig buildConfig(Context context) {
boolean logFlag;
if (BuildConfig.DEBUG) {
logFlag = true;
} else {
logFlag = false;
}
logFlag = BuildConfig.DEBUG;
return new TTAdConfig.Builder()
.appId(TT_AD_APPID)
......
package com.mints.flowbox.manager
import android.app.Application
import com.yilan.sdk.ui.YLUIInit
import com.yilan.sdk.ui.configs.CommentConfig
import com.yilan.sdk.ui.configs.FeedConfig
import com.yilan.sdk.ui.configs.YLUIConfig
/**
* 描述:一览视频(好兔)
* 作者:孟崔广
*/
object YlVideoManager {
private const val ACCESSKEY = "ylyv7qukd06q"
private const val ACCESSTOKEN = "nb055b7cu61wt0zt291cmafi6qwkrvsv"
fun init(application: Application) {
YLUIInit.getInstance()
.setCrashOpen(false)
.setApplication(application)
.setAccessKey(ACCESSKEY)
.setAccessToken(ACCESSTOKEN)
.build()
//页面个性化配置
YLUIConfig.getInstance() //抖音样式小视频配置
.littleLikeShow(true) //是否显示点赞
.littleShareShow(false) //是否显示分享
.littleShowGuide(true) //是否显示新手引导滑动浮层(第一次安装进入显示)
.littleComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
//feed流短视频样式配置
.videoComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
.videoLikeShow(false) //是否显示点赞
.videoShareShow(false) //是否显示分享
.followAvailable(false) //关注功能是否可用
.feedAvatarClickable(true) //头像是否支持点击跳转到作者页面
.feedPlayAuto(true) //feed自动播放
.feedSwipeRefreshEnable(true) //feed是否可以下拉刷新
FeedConfig.getInstance().playerStyle = FeedConfig.STYLE_FEED_PLAY //FeedConfig.STYLE_FEED_PLAY当前页面播放
}
}
\ No newline at end of file
......@@ -32,7 +32,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
override fun initViewsAndEvents() {
tvAboutasVersion.text =
getString(R.string.app_name) + " v" + ConstantUtil.getVersionName(context)
getString(R.string.appName) + " v" + ConstantUtil.getVersionName(context)
tv_title.text = "关于我们"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
......@@ -48,20 +48,6 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
true
}
var step = 0
val timer = Timer()
timer.schedule(object : TimerTask() {
override fun run() {
runOnUiThread {
step++
pb.setProgress(step)
}
}
}, 50, 50)
initListener()
}
......
......@@ -13,7 +13,6 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
import com.mints.flowbox.ui.adapter.clean.CleanExpandAdapter
import com.mints.flowbox.ui.adapter.clean.ExpandInfo
import com.mints.flowbox.ui.adapter.clean.ExpandInfo.ChildInfo
import com.mints.flowbox.utils.LogUtil
import kotlinx.android.synthetic.main.activity_clean.*
import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.view_title.*
......@@ -45,6 +44,8 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
private var isCleanCompleted = false
private var isItemCleanOk = true
private var mScanTimer: Timer? = null
private var mCleanTimer: Timer? = null
override fun getContentViewLayoutID() = R.layout.activity_clean
......@@ -60,15 +61,27 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
/** 开始扫描 */
private fun startScan() {
var taskType = 0
isScaning = true
val scanTimer = Timer()
scanTimer.schedule(object : TimerTask() {
// 拦截滑动事件
elv_clean.isIntercept(isScaning)
// 开始按钮动画
btnClean.startCycle()
mScanTimer = Timer()
mScanTimer?.schedule(object : TimerTask() {
override fun run() {
runOnUiThread {
if (!isItemCleanOk || taskType == 5) {
return@runOnUiThread
}
TaskAsyncTack(taskType, object : TaskAsyncTack.OnActionListener {
override fun onStart() {
isItemCleanOk = false
when (taskType) {
0 -> btnClean.text = "正在扫描 运行程序..."
1 -> btnClean.text = "正在扫描 系统缓存..."
......@@ -82,6 +95,8 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
override fun onCompleted(data: MutableList<CacheListItem>?) {
data?.let {
isItemCleanOk = true
for (cacheListItem in it) {
val childInfo = ChildInfo()
childInfo.name = cacheListItem.applicationName
......@@ -93,11 +108,19 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
}
mCleanExpandAdapter?.notifyDataSetChanged()
if (taskType == 4) {
// 放开滑动事件
elv_clean.isIntercept(false)
elv_clean.smoothScrollToPosition(elv_clean.count)
}
}
taskType++
if (taskType == 4) {
scanTimer.cancel()
if (taskType == 5) {
mScanTimer?.cancel()
btnClean.pauseCycle()
btnClean.text = "开始清理"
isScaning = false
}
......@@ -113,12 +136,14 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
private fun startClean() {
// 滚动到顶部
elv_clean.setSelectedGroup(0)
btnClean.startCycle()
var taskType = 0
isCleaning = true
isItemCleanOk = true
val cleanTimer = Timer()
cleanTimer.schedule(object : TimerTask() {
mCleanTimer = Timer()
mCleanTimer?.schedule(object : TimerTask() {
override fun run() {
runOnUiThread {
......@@ -154,11 +179,15 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
}
taskType++
if (taskType == 4) {
if (taskType == 5) {
// 防止下标越界
taskType--
btnClean.pauseCycle()
btnClean.text = "清理完成"
isCleaning = false
isCleanCompleted = true
cleanTimer.cancel()
mCleanTimer?.cancel()
}
}
}
......@@ -261,7 +290,6 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
private fun remove(groupPosition: Int, removeIndex: Int, removeChildInfo: ChildInfo?) {
if (removeIndex == -1 || removeChildInfo == null) return
LogUtil.d("CCC -> " + removeIndex)
var currentRemoveIndex = 0
// 删除索引 = 组索引 + 1 + 子项删除索引
for (i in 0..groupPosition) {
......@@ -329,6 +357,11 @@ class CleanActivity : BaseActivity(), View.OnClickListener {
}
override fun onDestroy() {
mScanTimer?.cancel()
mScanTimer = null
mCleanTimer?.cancel()
mCleanTimer = null
super.onDestroy()
}
}
......@@ -76,7 +76,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
//super.onSaveInstanceState(outState);
}
var oldTime: Long = 0
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
when (keyCode) {
KeyEvent.KEYCODE_VOLUME_UP -> {
......@@ -96,14 +95,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
return true
}
KeyEvent.KEYCODE_BACK -> {
// 设置为后台
val currentTime = System.currentTimeMillis()
if (currentTime - oldTime < 2 * 1000) {
baseApplication.exitApp()
} else {
showToast("再次点击退出" + getString(R.string.app_name))
oldTime = currentTime
}
// 移动至后台运行
moveTaskToBack(true)
}
}
return true
......
......@@ -84,7 +84,7 @@ class CoinRecordAdapter(context: Context, coinData: MutableList<GoldRecordBean.L
holder.tv_goldrecord_cash_type.text = "钻石"
}
holder.tv_goldrecord_cash.text = "-" + coinData.unitCoin
holder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(mContext, R.color.color_4BB93F))
holder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(mContext, R.color.color_00FA9A))
}
}
}
......
......@@ -14,7 +14,10 @@ import com.mints.flowbox.ui.adapter.listener.OnItemClickListener
import com.mints.flowbox.utils.TimeRender
import java.util.*
class DrawcashRecordAdapter(context: Context, invitedData: MutableList<DrawcashRecordBean.RecordsBean>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
class DrawcashRecordAdapter(
context: Context,
invitedData: MutableList<DrawcashRecordBean.RecordsBean>
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
const val HOLDER_TYPE_EMPTY = 0
......@@ -28,11 +31,13 @@ class DrawcashRecordAdapter(context: Context, invitedData: MutableList<DrawcashR
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (viewType == HOLDER_TYPE_EMPTY) {
val emptyView = LayoutInflater.from(parent.context).inflate(R.layout.item_empty, parent, false)
val emptyView =
LayoutInflater.from(parent.context).inflate(R.layout.item_empty, parent, false)
return EmptyHolder(emptyView)
}
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_list_drawcashrecord, parent, false)
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.item_list_drawcashrecord, parent, false)
return ViewHolder(view)
}
......@@ -46,15 +51,26 @@ class DrawcashRecordAdapter(context: Context, invitedData: MutableList<DrawcashR
val data: DrawcashRecordBean.RecordsBean = mDarwcashData[position]
holder.tv_drawcashrecord_applyno.text = "订单号:" + data.cashId
viewHolder.tv_drawcashrecord_date.text = TimeRender.formatDate(Date(data.createTime), TimeRender.DEFAULT_FORMAT_SHOW)
viewHolder.tv_drawcashrecord_date.text =
TimeRender.formatDate(Date(data.createTime), TimeRender.DEFAULT_FORMAT_SHOW)
viewHolder.tv_drawcashrecord_money.text = "¥" + String.format("%.2f", data.cash) + "元"
// viewHolder.tv_drawcashrecord_account.setText("支付宝账户:" + data.getAccount());
if (TextUtils.equals(data.payChannel, "ALIPAY")) {
viewHolder.tv_drawcashrecord_account.text = "提现账户:支付宝"
viewHolder.tv_drawcashrecord_account.setTextColor(ContextCompat.getColor(mContext, R.color.color_7EE2FF))
viewHolder.tv_drawcashrecord_account.setTextColor(
ContextCompat.getColor(
mContext,
R.color.color_7EE2FF
)
)
} else {
viewHolder.tv_drawcashrecord_account.text = "提现账户:微信"
viewHolder.tv_drawcashrecord_account.setTextColor(ContextCompat.getColor(mContext, R.color.color_4BB93F))
viewHolder.tv_drawcashrecord_account.setTextColor(
ContextCompat.getColor(
mContext,
R.color.color_00FA9A
)
)
}
val errormsg: String = data.errormsg
if (TextUtils.isEmpty(errormsg)) {
......@@ -66,19 +82,39 @@ class DrawcashRecordAdapter(context: Context, invitedData: MutableList<DrawcashR
when (data.status) {
0, 1 -> {
viewHolder.tv_drawcashrecord_status.text = "处理中"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.color_454A69))
viewHolder.tv_drawcashrecord_status.setTextColor(
ContextCompat.getColor(
mContext,
R.color.color_454A69
)
)
}
2 -> {
viewHolder.tv_drawcashrecord_status.text = "已提现"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.color_BEC2CC))
viewHolder.tv_drawcashrecord_status.setTextColor(
ContextCompat.getColor(
mContext,
R.color.color_BEC2CC
)
)
}
3, 4 -> {
viewHolder.tv_drawcashrecord_status.text = "提现失败"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.color_FF5E5E))
viewHolder.tv_drawcashrecord_status.setTextColor(
ContextCompat.getColor(
mContext,
R.color.color_FF5E5E
)
)
}
else -> {
viewHolder.tv_drawcashrecord_status.text = "未知"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.color_454A69))
viewHolder.tv_drawcashrecord_status.setTextColor(
ContextCompat.getColor(
mContext,
R.color.color_454A69
)
)
}
}
}
......
......@@ -8,19 +8,14 @@ import android.view.Gravity
import android.view.View
import android.widget.FrameLayout
import android.widget.LinearLayout
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.daimajia.androidanimations.library.YoYo.YoYoString
import com.kwad.sdk.api.KsAdSDK
import com.kwad.sdk.api.KsContentPage
import com.kwad.sdk.api.KsScene
import com.mints.flowbox.R
import com.mints.flowbox.ad.video.VideoAdingManager
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.ad.KsManager
import com.mints.flowbox.mvp.model.MainVideoMsgBean
import com.mints.flowbox.mvp.model.UserTaskMsgBean
import com.mints.flowbox.mvp.presenters.VideoPresenter
......@@ -30,8 +25,12 @@ import com.mints.flowbox.ui.fragment.base.BaseFragment
import com.mints.flowbox.ui.widgets.countdowntimer.CountDownTimerSupport
import com.mints.flowbox.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
import com.mints.flowbox.utils.LogUtil
import com.mints.flowbox.utils.TimeRender
import com.yilan.sdk.player.ylplayer.YLPlayerConfig
import com.yilan.sdk.player.ylplayer.callback.OnPlayerCallBack
import com.yilan.sdk.ui.configs.YLUIConfig
import com.yilan.sdk.ui.little.YLLittleVideoFragment
import com.yilan.sdk.ylad.YLAdListener
import kotlinx.android.synthetic.main.layout_red_bag.*
import kotlinx.android.synthetic.main.layout_red_box.*
import net.grandcentrix.tray.AppPreferences
......@@ -53,16 +52,13 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
private var rewardCoin = 0 // 小金币
private val videoMaxCount = 12 // 当前缓存视频id最大数
private val videoIdList by lazy { ArrayList<String>() }//记录播放的视频id
private var littleVideoFragment: YLLittleVideoFragment? = null
private var isToCreateReward = true // 是否还有剩余红包 服务器返回
private var isFirstLoadVideo = true // 首次加载视频初始化 本地判断
private var isAward = false // 是否可以领金币 本地判断
private var isFirstWatchVideo = true// 是否是第一次观看完视频
// 快手视频相关
private var ksFragment: Fragment? = null
private var mKsContentPage: KsContentPage? = null
// 广告权重相关
private var videoAdingManager: VideoAdingManager? = null
......@@ -86,7 +82,7 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
}
override fun onHiddenChanged(hidden: Boolean) {
ksFragment?.onHiddenChanged(hidden)
littleVideoFragment?.onHiddenChanged(hidden)
if (hidden) {
onPause()
......@@ -111,7 +107,7 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
}
}
ksFragment?.onResume()
littleVideoFragment?.onResume()
}
}
......@@ -125,7 +121,7 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
destroyTimerRedbox()
ksFragment?.onPause()
littleVideoFragment?.onPause()
if (isToCreateReward) {
// 防止界面切换 重置红包动画
......@@ -226,96 +222,70 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
* 一览视频初始化
*/
private fun showLittle() {
val adScene = KsScene.Builder(KsManager.KS_CONTENT).build()
mKsContentPage = KsAdSDK.getLoadManager().loadContentPage(adScene)
registerPlayerCallBack()
val transaction: FragmentTransaction = childFragmentManager.beginTransaction()
if (ksFragment == null) {
ksFragment = mKsContentPage?.fragment
transaction.add(R.id.yilan_fragment_frame_container, ksFragment!!, "ks_fragment")
val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
if (littleVideoFragment == null) {
littleVideoFragment = YLLittleVideoFragment.newInstance()
transaction.add(
R.id.yilan_fragment_frame_container,
littleVideoFragment!!,
YLLittleVideoFragment::class.java.simpleName
)
} else {
transaction.show(ksFragment!!)
transaction.show(littleVideoFragment!!)
}
transaction.commitAllowingStateLoss()
registerPlayerCallBack()
}
private fun registerPlayerCallBack() {
mKsContentPage?.let {
it.setPageListener(object : KsContentPage.PageListener {
override fun onPagePause(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPagePause")
}
override fun onPageResume(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPageResume")
}
override fun onPageEnter(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPageEnter")
}
override fun onPageLeave(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPageLeave")
}
})
// 视频播放回调
it.setVideoListener(object : KsContentPage.VideoListener {
override fun onVideoPlayCompleted(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayCompleted")
addVideoIdList(p0!!.id)
pauseDownloadTime()
YLPlayerConfig.config().registerPlayerCallBack(object : OnPlayerCallBack {
override fun onStart(pager: String, videoid: String, p2: String?) {
// 防止网络异常时, 第一次加载倒计时红包
if (isFirstLoadVideo) {
isFirstLoadVideo = false
initTimeview()
} else {
resumeDownloadTime(videoid)
}
}
override fun onVideoPlayPaused(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayPaused")
pauseDownloadTime()
}
override fun onPause(pager: String, p1: String?, p2: String?) {
pauseDownloadTime()
}
override fun onVideoPlayStart(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayStart")
override fun onResume(pager: String, videoid: String, p2: String?) {
resumeDownloadTime(videoid)
}
// 防止网络异常时, 第一次加载倒计时红包
if (isFirstLoadVideo) {
isFirstLoadVideo = false
initTimeview()
} else {
resumeDownloadTime(p0!!.id)
}
}
override fun onComplete(pager: String, videoid: String, p2: String?) {
override fun onVideoPlayError(p0: KsContentPage.ContentItem?, p1: Int, p2: Int) {
LogUtil.d("onVideoPlayError")
}
override fun onLoopComplete(
pager: String?,
videoID: String,
taskID: String?,
num: Int
) {
addVideoIdList(videoID)
pauseDownloadTime()
}
pauseDownloadTime()
}
override fun onStuckStart(pager: String, p1: String?, p2: String?) {
}
override fun onVideoPlayResume(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayResume")
override fun onStuckEnd(pager: String, p1: String?, p2: String?) {
}
// 防止网络异常时, 第一次加载倒计时红包
if (isFirstLoadVideo) {
isFirstLoadVideo = false
initTimeview()
} else {
resumeDownloadTime(p0!!.id)
}
}
override fun onError(pager: String, p1: String?, p2: String?) {
})
pauseDownloadTime()
}
}
override fun onStop(pager: String, p1: String?, p2: String?) {
}
})
}
private fun initListener() {
......@@ -336,6 +306,69 @@ class VideoFragment : BaseFragment(), VideoView, View.OnClickListener {
cdvvYilanTime.setOnClickListener(this)
rl_fragment_main_redbox.setOnClickListener(this)
rl_fragment_main_redbox.isClickable = false
YLUIConfig.getInstance().registerAdListener(object : YLAdListener() {
override fun onSuccess(p0: String?, p1: Int, p2: String?, p3: String?) {}
override fun onError(
p0: String?,
p1: Int,
p2: String?,
p3: Int,
p4: String?,
p5: String?
) {
}
override fun onRenderError(
p0: String?,
p1: Int,
p2: String?,
p3: Int,
p4: String?,
p5: String?
) {
}
override fun onShow(p0: String?, p1: Int, p2: String?, p3: String) {
resumeAdTime()
}
override fun onClick(p0: String?, p1: Int, p2: String?, p3: String?) {}
override fun onSkip(p0: String?, p1: Int, p2: String?, p3: String?) {}
override fun onTimeOver(p0: String?, p1: Int, p2: String?, p3: String?) {}
override fun onClose(p0: String?, p1: Int, p2: String?, p3: String?) {}
override fun onAdEmpty(p0: String?, p1: Int, p2: String?, p3: String?) {}
override fun onVideoStart(p0: String?, p1: Int, p2: String?, p3: String) {
}
override fun onVideoPause(p0: String?, p1: Int, p2: String?, p3: String?) {
pauseDownloadTime()
}
override fun onVideoResume(p0: String?, p1: Int, p2: String?, p3: String?) {
resumeAdTime()
}
override fun onVideoComplete(p0: String?, p1: Int, p2: String?, p3: String?) {
pauseDownloadTime()
}
override fun onVideoError(p0: String?, p1: Int, p2: String?, p3: String?) {}
})
}
private fun resumeAdTime() {
// 视频未转满 且 界面切换时可继续加进度
if (!isAward) {
cdvvYilanTime?.resume()
}
}
/**
......
package com.mints.flowbox.ui.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.ExpandableListView;
import android.widget.GridView;
public class MyExpandListView extends ExpandableListView {
boolean isIntercept = true;
public boolean isInterceptTouch() {
return isIntercept;
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return isIntercept;
}
public MyExpandListView(Context context) {
super(context);
}
public MyExpandListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyExpandListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void isIntercept(boolean isIntercept) {
this.isIntercept = isIntercept;
}
}
......@@ -7,12 +7,13 @@ import android.graphics.drawable.GradientDrawable;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatButton;
import androidx.core.content.ContextCompat;
import com.mints.flowbox.R;
public class ProgressButton extends AppCompatButton {
private float mCornerRadius = 0;
private float mCornerRadius = 15;
private float mProgressMargin = 0;
private boolean mFinish;
......@@ -21,6 +22,8 @@ public class ProgressButton extends AppCompatButton {
private int mMaxProgress = 100;
private int mMinProgress = 0;
private boolean isCycle = false;
private GradientDrawable mDrawableButton;
private GradientDrawable mDrawableProgressBackground;
private GradientDrawable mDrawableProgress;
......@@ -40,9 +43,9 @@ public class ProgressButton extends AppCompatButton {
mDrawableProgress = new GradientDrawable();
mDrawableButton = new GradientDrawable();
int defaultButtonColor = getResources().getColor(R.color.gray, null);
int defaultProgressColor = getResources().getColor(R.color.color_main, null);
int defaultBackColor = getResources().getColor(R.color.gray, null);
int defaultButtonColor = ContextCompat.getColor(context, R.color.color_00FA9A);
int defaultProgressColor = ContextCompat.getColor(context, R.color.color_10000000);
int defaultBackColor = ContextCompat.getColor(context, R.color.color_00FA9A);
TypedArray attr = context.obtainStyledAttributes(attrs, R.styleable.ProgressButton);
......@@ -84,7 +87,14 @@ public class ProgressButton extends AppCompatButton {
@Override
protected void onDraw(Canvas canvas) {
if (mProgress > mMinProgress && mProgress <= mMaxProgress && !mFinish) {
if (isCycle) {
if (mProgress >= 100) {
mProgress = 0;
}
mProgress++;
postInvalidateDelayed(10);
}
if (mProgress > mMinProgress && mProgress <= mMaxProgress) {
float progressWidth =
(float) getMeasuredWidth() * ((float) (mProgress - mMinProgress) / mMaxProgress - mMinProgress);
if (progressWidth < mCornerRadius * 2) {
......@@ -96,12 +106,24 @@ public class ProgressButton extends AppCompatButton {
if (mProgress == mMaxProgress) {
setBackgroundDrawable(mDrawableButton);
mFinish = true;
// mFinish = true;
}
}
super.onDraw(canvas);
}
public void startCycle() {
isCycle = true;
mProgress = 0;
invalidate();
}
public void pauseCycle() {
isCycle = false;
mProgress = 0;
invalidate();
}
/**
* Set current progress
*/
......
......@@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_4BB93F" />
<solid android:color="@color/color_00FA9A" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="30dip" />
......
......@@ -26,7 +26,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:layout_marginBottom="15dp"
android:text="@string/app_name"
android:text="@string/appName"
android:textColor="@color/color_454A69"
android:textSize="13sp" />
......@@ -37,13 +37,6 @@
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_launcher_main" />
<com.mints.flowbox.ui.widgets.ProgressButton
android:id="@+id/pb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:maxProgress="100"
app:minProgress="0" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
......
......@@ -27,7 +27,7 @@
android:layout_marginBottom="60dp"
android:src="@mipmap/ic_clean" />
<ExpandableListView
<com.mints.flowbox.ui.widgets.MyExpandListView
android:id="@+id/elv_clean"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -37,7 +37,7 @@
<!-- </androidx.core.widget.NestedScrollView>-->
<Button
<com.mints.flowbox.ui.widgets.ProgressButton
android:id="@+id/btnClean"
android:layout_width="match_parent"
android:layout_height="40dp"
......
......@@ -23,7 +23,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:padding="15dp"
android:src="@mipmap/ic_close" />
android:src="@mipmap/ic_arrow_back_white" />
<ImageView
android:layout_width="wrap_content"
......
......@@ -22,7 +22,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:padding="15dp"
android:src="@mipmap/ic_close" />
android:src="@mipmap/ic_arrow_back_white" />
<ImageView
android:layout_width="wrap_content"
......
......@@ -22,7 +22,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:padding="15dp"
android:src="@mipmap/ic_close" />
android:src="@mipmap/ic_arrow_back_white" />
<ImageView
android:layout_width="wrap_content"
......
......@@ -19,7 +19,7 @@
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/appCompatImageView"
android:text="@string/app_name"
android:text="@string/appName"
android:textColor="@color/color_main" />
<TextView
......@@ -30,7 +30,7 @@
android:layout_toStartOf="@id/tv_speed_test"
android:drawableTop="@mipmap/ic_rubbish"
android:drawablePadding="6dp"
android:text="内存清理"
android:text="垃圾清理"
android:textColor="@color/black" />
<TextView
......
......@@ -25,7 +25,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:text="@string/appName"
android:textColor="@color/black"
android:textSize="@dimen/font_size_14" />
......
app/src/main/res/mipmap-xhdpi/bg_guide2.png

16.6 KB | W: | H:

app/src/main/res/mipmap-xhdpi/bg_guide2.png

64.2 KB | W: | H:

app/src/main/res/mipmap-xhdpi/bg_guide2.png
app/src/main/res/mipmap-xhdpi/bg_guide2.png
app/src/main/res/mipmap-xhdpi/bg_guide2.png
app/src/main/res/mipmap-xhdpi/bg_guide2.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xhdpi/bg_guide3.png

20 KB | W: | H:

app/src/main/res/mipmap-xhdpi/bg_guide3.png

46.6 KB | W: | H:

app/src/main/res/mipmap-xhdpi/bg_guide3.png
app/src/main/res/mipmap-xhdpi/bg_guide3.png
app/src/main/res/mipmap-xhdpi/bg_guide3.png
app/src/main/res/mipmap-xhdpi/bg_guide3.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xhdpi/bg_guide4.png

31.4 KB | W: | H:

app/src/main/res/mipmap-xhdpi/bg_guide4.png

57.7 KB | W: | H:

app/src/main/res/mipmap-xhdpi/bg_guide4.png
app/src/main/res/mipmap-xhdpi/bg_guide4.png
app/src/main/res/mipmap-xhdpi/bg_guide4.png
app/src/main/res/mipmap-xhdpi/bg_guide4.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xhdpi/ic_rubbish.png

906 Bytes | W: | H:

app/src/main/res/mipmap-xhdpi/ic_rubbish.png

972 Bytes | W: | H:

app/src/main/res/mipmap-xhdpi/ic_rubbish.png
app/src/main/res/mipmap-xhdpi/ic_rubbish.png
app/src/main/res/mipmap-xhdpi/ic_rubbish.png
app/src/main/res/mipmap-xhdpi/ic_rubbish.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -13,6 +13,7 @@
<color name="color_ccc">#cccccc</color>
<color name="color_AAA">#AAAAAA</color>
<color name="color_0000">#00000000</color>
<color name="color_10000000">#10000000</color>
<color name="color_20000000">#20000000</color>
<color name="color_60000000">#60000000</color>
<color name="transparent">#00000000</color>
......@@ -26,7 +27,8 @@
<color name="color_666">#666666</color>
<color name="color_454A69">#454A69</color>
<color name="color_333">#333333</color>
<color name="color_4BB93F">#4BB93F</color>
<color name="color_00FA9A">#00FA9A</color>
<color name="color_7FFFAA">#7FFFAA</color>
<color name="color_FEB63D">#FEB63D</color>
<color name="color_FFF7CB">#FFF7CB</color>
<color name="color_FF5E5E">#FF5E5E</color>
......
<resources>
<string name="app_name">流量宝盒</string>
<string name="appName">流量宝盒</string>
<string name="dot">--</string>
......
......@@ -13,13 +13,14 @@ buildscript {
println("initApplicationScript() appConfig = $param")
def properties = rootProject.getProperties()
properties.forEach() {
key, value -> if (key.startsWith("GLOBAL") && value != null && value instanceof String) {
println("info: 生成BuildConfig::$key = [${rootProject.getProperty(key)}]")
param.buildConfigField("String", key, "\"${value}\"")
}
key, value ->
if (key.startsWith("GLOBAL") && value != null && value instanceof String) {
println("info: 生成BuildConfig::$key = [${rootProject.getProperty(key)}]")
param.buildConfigField("String", key, "\"${value}\"")
}
}
// param.resValue("string", "app_name", "${rootProject.APPLICATION_NAME}")
param.resValue("string", "app_name", "${rootProject.APPLICATION_NAME}")
param.resValue("string", "access_name", "★ ${rootProject.APPLICATION_NAME}")
println("info: build_target = $build_target")
......@@ -34,6 +35,15 @@ buildscript {
jcenter()
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url "https://jitpack.io" }
//添加一览视频 maven地址
maven {
url 'http://nexus.1lan.tv/repository/maven-releases/'
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
......@@ -47,6 +57,14 @@ allprojects {
jcenter()
maven { url 'https://dl.bintray.com/umsdk/release' }
maven { url "https://jitpack.io" }
//添加一览 maven地址
maven {
url 'http://nexus.1lan.tv/repository/maven-releases/'
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
}
}
......@@ -82,8 +100,6 @@ def initConfigurationWonderKingdom = { projectTarget, projectSource ->
} // end of function
if (!projectSource.hasProperty('BUILD_TARGET')) {
throw new InvalidParameterException("BUG! 检查 gradle.properties 文件,缺少 BUILD_TARGET 这个变量")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment