Commit 99b7a69c authored by mengcuiguang's avatar mengcuiguang

优化蘑菇星球

parent 4d71e0ed
...@@ -94,7 +94,6 @@ class RTAVideoAdManager private constructor(activity: Activity) : BaseVideoAd() ...@@ -94,7 +94,6 @@ class RTAVideoAdManager private constructor(activity: Activity) : BaseVideoAd()
TrackManager.getInstance().reportClickAdEvent() TrackManager.getInstance().reportClickAdEvent()
} }
LogUtil.d(TAG, "onADClick")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_RTA, Constant.EVENT_TYPE_TWO, "", "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_RTA, Constant.EVENT_TYPE_TWO, "", "")
if (isClickScreen) { if (isClickScreen) {
// 防止重复 // 防止重复
......
...@@ -7,6 +7,7 @@ import android.content.Intent; ...@@ -7,6 +7,7 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.text.TextUtils; import android.text.TextUtils;
import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.ad.video.base.VideoAdStatusListener; import com.mints.goodmoney.ad.video.base.VideoAdStatusListener;
import com.mints.goodmoney.common.AppConfig; import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
...@@ -16,6 +17,7 @@ import com.mints.goodmoney.mvp.model.WeightBean; ...@@ -16,6 +17,7 @@ import com.mints.goodmoney.mvp.model.WeightBean;
import com.mints.goodmoney.service.AppInstallService; import com.mints.goodmoney.service.AppInstallService;
import com.mints.goodmoney.utils.AppUtil; import com.mints.goodmoney.utils.AppUtil;
import com.mints.goodmoney.utils.LogUtil; import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.utils.ToastUtil;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -204,7 +206,7 @@ public class VideoAdingManager { ...@@ -204,7 +206,7 @@ public class VideoAdingManager {
/** /**
* 根据广告优先级获取下一个 * 根据广告优先级获取下一个
* 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->枫岚(兜底) * 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->RTA->枫岚(兜底)
*/ */
private String getNextAdType() { private String getNextAdType() {
String nextAdType; String nextAdType;
...@@ -218,8 +220,6 @@ public class VideoAdingManager { ...@@ -218,8 +220,6 @@ public class VideoAdingManager {
nextAdType = Constant.KS_VEDIO_AD; nextAdType = Constant.KS_VEDIO_AD;
} else if (AppConfig.shVideoAdCount > 0) { } else if (AppConfig.shVideoAdCount > 0) {
nextAdType = Constant.SH_VEDIO_AD; nextAdType = Constant.SH_VEDIO_AD;
} else if (AppConfig.rtaVideoAdCount > 0) {
nextAdType = Constant.RTA_VEDIO_AD;
} else { } else {
nextAdType = Constant.FL_VEDIO_AD; nextAdType = Constant.FL_VEDIO_AD;
} }
......
...@@ -18,6 +18,9 @@ object MokuManager { ...@@ -18,6 +18,9 @@ object MokuManager {
private const val APP_SECRET = "421ec06a6f1dbd75010f6f9e4d821cfe03e3a7a3" private const val APP_SECRET = "421ec06a6f1dbd75010f6f9e4d821cfe03e3a7a3"
/**
* 若gotoMoku前 校验了权限方法,可不用init
*/
fun init(activity: Activity) { fun init(activity: Activity) {
try { try {
//初始化sdk //初始化sdk
......
...@@ -273,12 +273,8 @@ public class VersionUpdatePresenter { ...@@ -273,12 +273,8 @@ public class VersionUpdatePresenter {
mUpdateService.setUpdateNotification(new UpdateService.UpdateNotification() { mUpdateService.setUpdateNotification(new UpdateService.UpdateNotification() {
@Override @Override
public void updateProgress(int progress) { public void updateProgress(int progress) {
if (pbDuUpdating != null) { if (pbDuUpdating != null) {
pbDuUpdating.setProgress(progress); pbDuUpdating.setProgress(progress);
if (btnDuUpdate != null && progress == 100) {
btnDuUpdate.setEnabled(true);
}
} }
} }
......
...@@ -59,6 +59,7 @@ public class UpdateService extends Service { ...@@ -59,6 +59,7 @@ public class UpdateService extends Service {
if (updateFile != null) { if (updateFile != null) {
createNotification();// 首次创建 createNotification();// 首次创建
createThread();// 线程下载 createThread();// 线程下载
} }
} else { } else {
stopService(); stopService();
...@@ -172,7 +173,7 @@ public class UpdateService extends Service { ...@@ -172,7 +173,7 @@ public class UpdateService extends Service {
contentView.setTextViewText(R.id.notificationPercent, contentView.setTextViewText(R.id.notificationPercent,
msg.arg1 + "%"); msg.arg1 + "%");
contentView.setProgressBar(R.id.notificationProgress, 100, contentView.setProgressBar(R.id.notificationProgress, 50,
msg.arg1, false); msg.arg1, false);
notificationManager.notify(notification_id, notification); notificationManager.notify(notification_id, notification);
...@@ -278,6 +279,10 @@ public class UpdateService extends Service { ...@@ -278,6 +279,10 @@ public class UpdateService extends Service {
message.what = DOWN_PROGRESS; message.what = DOWN_PROGRESS;
message.arg1 = updateCount; message.arg1 = updateCount;
handler.sendMessage(message); handler.sendMessage(message);
System.out.println("mcg __> downloadCount:"+downloadCount);
System.out.println("mcg __> updateCount:"+updateCount);
System.out.println("mcg __> down_step:"+(totalSize));
} }
} }
if (httpURLConnection != null) { if (httpURLConnection != null) {
......
...@@ -52,7 +52,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -52,7 +52,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication) ZhangyueManager.onCreateIreader(baseApplication)
MokuManager.init(this) // MokuManager.init(this)
showShortVedioLayout() showShortVedioLayout()
......
...@@ -48,6 +48,7 @@ import com.mints.library.net.netstatus.NetUtils ...@@ -48,6 +48,7 @@ import com.mints.library.net.netstatus.NetUtils
import com.mints.library.utils.CommonUtils import com.mints.library.utils.CommonUtils
import com.mints.library.utils.GlideUtils import com.mints.library.utils.GlideUtils
import com.mints.library.utils.nodoubleclick.AntiShake import com.mints.library.utils.nodoubleclick.AntiShake
import com.rd.animation.type.AnimationType
import com.scwang.smartrefresh.layout.api.RefreshLayout import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import com.tbruyelle.rxpermissions.RxPermissions import com.tbruyelle.rxpermissions.RxPermissions
...@@ -260,21 +261,22 @@ class MyFragment : BaseFragment(), ...@@ -260,21 +261,22 @@ class MyFragment : BaseFragment(),
mCurrentIndex = 0 mCurrentIndex = 0
piv_grid.count = pageCount piv_grid.count = pageCount
piv_grid.setAnimationType(AnimationType.THIN_WORM)
vp_grid.adapter = ViewPagerAdapter(pagerList) vp_grid.adapter = ViewPagerAdapter(pagerList)
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { // vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) { // override fun onPageScrollStateChanged(state: Int) {
} // }
//
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { // override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
} // }
//
override fun onPageSelected(position: Int) { // override fun onPageSelected(position: Int) {
mCurrentIndex = position // mCurrentIndex = position
//
piv_grid.selection = position // piv_grid.selection = position
} // }
//
}) // })
} }
override fun getSignInHomePageMsgSuc(signBean: SignCardBean?) { override fun getSignInHomePageMsgSuc(signBean: SignCardBean?) {
...@@ -1172,6 +1174,21 @@ class MyFragment : BaseFragment(), ...@@ -1172,6 +1174,21 @@ class MyFragment : BaseFragment(),
item_customer_service.setOnClickListener(this) item_customer_service.setOnClickListener(this)
// item_promotions_egv.onItemClickListener = this // item_promotions_egv.onItemClickListener = this
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
override fun onPageSelected(position: Int) {
mCurrentIndex = position
piv_grid.selection = position
}
})
} }
/** /**
...@@ -1435,7 +1452,8 @@ class MyFragment : BaseFragment(), ...@@ -1435,7 +1452,8 @@ class MyFragment : BaseFragment(),
private fun gotoMoku() { private fun gotoMoku() {
RxPermissions(requireActivity()) RxPermissions(requireActivity())
.request(Manifest.permission.READ_PHONE_STATE, .request(Manifest.permission.READ_PHONE_STATE,
Manifest.permission.READ_EXTERNAL_STORAGE) Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe { granted: Boolean -> .subscribe { granted: Boolean ->
if (granted) { if (granted) {
MokuManager.gotoMoku(requireContext()) MokuManager.gotoMoku(requireContext())
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:visibility="gone"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:visibility="gone"
app:piv_count="2" app:piv_count="2"
app:piv_selectedColor="@color/color_FF9837" app:piv_selectedColor="@color/color_FF9837"
app:piv_unselectedColor="@color/color_20000000" app:piv_unselectedColor="@color/color_20000000"
......
...@@ -20,5 +20,6 @@ ...@@ -20,5 +20,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@null" android:background="@null"
android:max="60"
android:indeterminateOnly="false" android:indeterminateOnly="false"
android:progressDrawable="@drawable/progress_bar_horizontal" /> android:progressDrawable="@drawable/progress_bar_horizontal" />
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