Commit ea18cb22 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 5db1a1dc
...@@ -187,7 +187,6 @@ dependencies { ...@@ -187,7 +187,6 @@ dependencies {
implementation(name: 'msa_mdid_1.0.13', ext: 'aar') implementation(name: 'msa_mdid_1.0.13', ext: 'aar')
// 穿山甲广告 // 穿山甲广告
implementation(name: 'open_ad_sdk', ext: 'aar') implementation(name: 'open_ad_sdk', ext: 'aar')
// implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
// 广点通广告 腾讯 // 广点通广告 腾讯
implementation(name: 'GDTSDK.unionNormal.4.232.1102', ext: 'aar') implementation(name: 'GDTSDK.unionNormal.4.232.1102', ext: 'aar')
// shareSdk // shareSdk
...@@ -227,7 +226,9 @@ dependencies { ...@@ -227,7 +226,9 @@ dependencies {
implementation 'androidx.annotation:annotation:1.0.0' implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.core:core:1.0.0' implementation 'androidx.core:core:1.0.0'
implementation 'androidx.fragment:fragment:1.0.0' implementation 'androidx.fragment:fragment:1.0.0'
// 变现猫
implementation(name: 'bxmsdk-release-3.0.0', ext: 'aar')
implementation 'com.android.support:support-v4:28.0.0'
......
...@@ -427,3 +427,24 @@ ...@@ -427,3 +427,24 @@
} }
# ======================= 掌阅书城 END ================ # ======================= 掌阅书城 END ================
# ===================== 变现猫 START ================
-keep class com.bytedance.sdk.openadsdk.** { *; }
-keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
-keep class com.ss.android.* {*;}
-keep class com.pgl.* {*;}
-keep class com.qq.e.** {
public protected *;
}
-keep class com.bxm.sdk.ad.**{ *;}
-keep class com.bianxianmao.sdk.**{*;}
-keep class android.support.v4.app.NotificationCompat**{
public *;
}
# ======================= 变现猫 END ================
\ No newline at end of file
...@@ -260,6 +260,17 @@ ...@@ -260,6 +260,17 @@
android:name="com.qq.e.ads.LandscapeADActivity" android:name="com.qq.e.ads.LandscapeADActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape" /> android:screenOrientation="landscape" />
<!-- 变现猫 -->
<!-- <provider-->
<!-- android:name="android.support.v4.content.FileProvider"-->
<!-- android:authorities="${applicationId}.fileprovider"-->
<!-- android:exported="false"-->
<!-- android:grantUriPermissions="true">-->
<!-- <meta-data-->
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
<!-- android:resource="@xml/new_app_file_paths" />-->
<!-- </provider>-->
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -18,6 +18,11 @@ object Constant { ...@@ -18,6 +18,11 @@ object Constant {
*/ */
const val TAG_NAME = "SUN" const val TAG_NAME = "SUN"
/**
* app名称
*/
const val MINTS_APP_NAME = "好赚钱"
/** /**
* 应用包名 * 应用包名
*/ */
......
package com.mints.goodmoney.manager
import android.app.Activity
import android.app.Application
import android.view.ViewGroup
import com.bianxianmao.sdk.BDAdvanceButtonAd
import com.bianxianmao.sdk.manager.BDAdvanceConfig
import com.bianxianmao.sdk.manager.BDManager
import com.mints.goodmoney.BuildConfig
import com.mints.goodmoney.common.Constant
/**
* 描述:变现猫
* 作者:孟崔广
*/
object BxmManager {
const val APP_ID = ""
const val BUTTON_AD_SPOT_ID = ""
var bdAdvanceButtonAd: BDAdvanceButtonAd? = null
/**
* 初始化
*/
fun initBxm(application: Application) {
BDAdvanceConfig.getInstance()
.setAppName(Constant.MINTS_APP_NAME)
.setDebug(BuildConfig.DEBUG)
.enableAudit(false)
BDManager.getStance()
.init(application, APP_ID)
}
/**
* 获取Button广告
*/
fun loadButtonAd(activity: Activity?, viewGroup: ViewGroup) {
if (activity == null) return
if (bdAdvanceButtonAd == null) {
bdAdvanceButtonAd = BDAdvanceButtonAd(activity, viewGroup, BUTTON_AD_SPOT_ID)
}
bdAdvanceButtonAd?.loadAd()
}
}
\ No newline at end of file
...@@ -6,6 +6,7 @@ import com.bytedance.sdk.openadsdk.TTAdConfig; ...@@ -6,6 +6,7 @@ import com.bytedance.sdk.openadsdk.TTAdConfig;
import com.bytedance.sdk.openadsdk.TTAdConstant; import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.bytedance.sdk.openadsdk.TTAdSdk; import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.mints.goodmoney.BuildConfig; import com.mints.goodmoney.BuildConfig;
import com.mints.goodmoney.common.Constant;
/** /**
* 穿山甲广告 * 穿山甲广告
...@@ -13,7 +14,7 @@ import com.mints.goodmoney.BuildConfig; ...@@ -13,7 +14,7 @@ import com.mints.goodmoney.BuildConfig;
public class TtCsjAdManager { public class TtCsjAdManager {
public static final String TT_AD_APPID = "5113521"; public static final String TT_AD_APPID = "5113521";
public static final String TT_AD_NAME = "好赚钱"; public static final String TT_AD_NAME = Constant.MINTS_APP_NAME;
/*激励视频*/ /*激励视频*/
public static final String TT_AD_VEDIO_MAIN_DEV = "945561938";// 开发使用 public static final String TT_AD_VEDIO_MAIN_DEV = "945561938";// 开发使用
......
...@@ -140,6 +140,12 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -140,6 +140,12 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
tab_tv_my.setSelected(false) tab_tv_my.setSelected(false)
} }
fun selectVedio(){
moneyFragment?.let {
(it as MoneyFragment).selectVedio()
}
}
/** /**
* 点击第二个tab * 点击第二个tab
*/ */
......
...@@ -32,7 +32,7 @@ class MoneyFragment : BaseFragment() { ...@@ -32,7 +32,7 @@ class MoneyFragment : BaseFragment() {
override fun setUserVisibleHint(isVisibleToUser: Boolean) { override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser) super.setUserVisibleHint(isVisibleToUser)
mainFragment?.userVisibleHint=isVisibleToUser mainFragment?.userVisibleHint = isVisibleToUser
} }
private fun initView() { private fun initView() {
...@@ -52,4 +52,8 @@ class MoneyFragment : BaseFragment() { ...@@ -52,4 +52,8 @@ class MoneyFragment : BaseFragment() {
vpFragmentMoney.setAdapter(adapter) vpFragmentMoney.setAdapter(adapter)
xtFragmentMoney.setupWithViewPager(vpFragmentMoney) xtFragmentMoney.setupWithViewPager(vpFragmentMoney)
} }
public fun selectVedio() {
vpFragmentMoney.currentItem = 0
}
} }
\ No newline at end of file
...@@ -431,6 +431,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -431,6 +431,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
MainMyAdapter.TASK_TYPE_HOME -> { MainMyAdapter.TASK_TYPE_HOME -> {
val activity: MainActivity? = activity as MainActivity? val activity: MainActivity? = activity as MainActivity?
activity?.clickTab1Layout() activity?.clickTab1Layout()
activity?.selectVedio()
} }
// 邀好友赚金币 // 邀好友赚金币
MainMyAdapter.TASK_TYPE_INVITE -> { MainMyAdapter.TASK_TYPE_INVITE -> {
......
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path name="tt_external_root" path="." />
<external-path name="tt_external_download" path="Download" />
<external-files-path name="tt_external_files_download" path="Download" />
<files-path name="tt_internal_file_download" path="Download" />
<cache-path name="tt_internal_cache_download" path="Download" />
<external-cache-path
name="gdt_sdk_download_path1"
path="com_qq_e_download" />
<cache-path
name="gdt_sdk_download_path2"
path="com_qq_e_download" />
</paths>
\ No newline at end of file
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