Commit 46d9c269 authored by jyx's avatar jyx

Bug修复

parent 368c543e
/build
mapping.txt
seeds.txt
unused.txt
\ No newline at end of file
unused.txt
local.properties
\ No newline at end of file
......@@ -5,4 +5,4 @@
# For customization when using a Version Control System, please read the
# header note.
#Mon Oct 14 10:16:31 CST 2019
sdk.dir=/Users/mcg/Library/Android/sdk
sdk.dir=/Users/Hello/Library/Android/sdk
......@@ -8,7 +8,6 @@ import com.bytedance.sdk.openadsdk.TTNativeExpressAd
import com.mints.goldspace.MintsApplication
import com.mints.goldspace.manager.TtCsjAdManager
import com.mints.goldspace.utils.LogUtil
import com.mints.goldspace.utils.ToastUtil
/**
* banner管理
......@@ -25,16 +24,28 @@ object BannerManager {
TtCsjAdManager.get().requestPermissionIfNecessary(MintsApplication.getContext())
}
/**
* 获取view宽高
*/
private fun getViewWidth(): Float {
val displayMetrics = MintsApplication.getContext().resources.displayMetrics
val density = displayMetrics.density
// 屏幕宽度 - margin宽度
val pxWidth = displayMetrics.widthPixels - (20 * density + 0.5f)
return pxWidth / density + 0.5f
}
/**
* 获取穿山甲banner
*/
fun getTtBanner(codeId: String, frameLayout: FrameLayout?) {
var expressViewAcceptedSizeWidth = 380f
var expressViewAcceptedSizeHeight = 280f
var expressViewAcceptedSizeWidth = getViewWidth()
var expressViewAcceptedSizeHeight = 0f
when (codeId) {
TtCsjAdManager.TT_AD_BANNER_MY -> {
expressViewAcceptedSizeWidth = 380f
expressViewAcceptedSizeHeight = 280f
expressViewAcceptedSizeWidth = getViewWidth()
expressViewAcceptedSizeHeight = 0f
}
}
......
......@@ -2,7 +2,6 @@ package com.mints.goldspace.ad.download;
import androidx.annotation.Nullable;
import com.mints.goldspace.BuildConfig;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.common.Constant;
import com.mints.goldspace.manager.UserManager;
......@@ -117,7 +116,7 @@ public final class CoralDownload {
@Override
public void onAdFailed(ADError adError) {
super.onAdFailed(adError);
LogUtil.d("onAdFailed");
LogUtil.d("onAdFailed -> " + adError.description);
if (mOnAdLoadListener != null) {
mOnAdLoadListener.onLoadFail();
}
......
......@@ -17,7 +17,6 @@ import com.mints.goldspace.manager.KsManager
import com.mints.goldspace.utils.LogUtil
import java.util.*
import com.mints.goldspace.R
import com.mints.library.utils.json.JsonUtil
/**
* 快手预加载信息流
......@@ -90,6 +89,7 @@ object KsPreLoadExpressManager {
// 设置广告数据
bindCommonData(convertView as ViewGroup, videoViewHolder, ksNativeAd)
ksNativeAd.setVideoPlayListener(object : VideoPlayListener {
override fun onVideoPlayStart() {
}
......@@ -98,14 +98,13 @@ object KsPreLoadExpressManager {
}
override fun onVideoPlayError(what: Int, extra: Int) {
LogUtil.d(what)
}
})
// SDK默认渲染的视频view
val videoPlayConfig = KsAdVideoPlayConfig.Builder()
.videoSoundEnable(true) // 有声播放
.dataFlowAutoStart(true) // 流量下自动播放
.dataFlowAutoStart(false) // 流量下自动播放
.build()
val videoView = ksNativeAd.getVideoView(mContext, videoPlayConfig)
if (videoView != null && videoView.parent == null) {
......@@ -230,7 +229,13 @@ object KsPreLoadExpressManager {
Glide.with(MintsApplication.getContext()).load(ad.appIconUrl).into(adBaseViewHolder.mAppIcon)
}
// app名称
adBaseViewHolder.mAppName.text = ad.appName
if (!TextUtils.isEmpty(ad.appName)) {
adBaseViewHolder.mAppName.visibility = View.VISIBLE
adBaseViewHolder.mAppName.text = ad.appName
} else {
adBaseViewHolder.mAppName.visibility = View.GONE
}
// 广告描述
adBaseViewHolder.mAppDesc.text = ad.adDescription
// 广告转化文案
......
......@@ -27,7 +27,7 @@ object KsManager {
.appId(KS_APP_ID) // 测试aapId,请联系快⼿平台申请正式AppId,必填
.appName(application.getString(R.string.app_name)) // 测试appName,请填写您应⽤的名称,⾮必填
.showNotification(true) // 是否展示下载通知栏
.debug(true) // 是否开启sdk 调试⽇志 可选
.debug(false) // 是否开启sdk 调试⽇志 可选
.build())
}
......
......@@ -25,8 +25,6 @@ object TzManager {
.appSecret(APP_SECRET)
.appChannel(CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME"))
.forTest(false)
.log(false)
.verbose(false)
.build(),
object : IADEngineState {
override fun onIdle() {}
......
......@@ -171,7 +171,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 倒计时红包暂停
pauseDownloadTime()
destoryTimerRedbox()
destroyTimerRedbox()
littleVideoFragment?.onPause()
if (isToCreateReward) {
......@@ -655,14 +655,14 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
stopRedbox()
destoryTimerRedbox()
destroyTimerRedbox()
mRedBoxTimer = CountDownTimerSupport(time * 1000, 1000)
rl_fragment_main_redbox.isClickable = false
mRedBoxTimer?.setOnCountDownTimerListener(object : OnCountDownTimerListener {
override fun onTick(millisUntilFinished: Long) {
if (isAdded && !requireActivity().isFinishing) {
stopRedbox()
// stopRedbox()
tv_fragment_main_redbox.text = TimeRender.ms2MS(millisUntilFinished.toInt())
}
}
......@@ -683,7 +683,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
}
private fun destoryTimerRedbox() {
private fun destroyTimerRedbox() {
mRedBoxTimer?.stop()
mRedBoxTimer = null
}
......
......@@ -12,6 +12,7 @@ import android.widget.AdapterView
import android.widget.GridView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.viewpager.widget.ViewPager
import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import com.fly.scenemodule.SceneUtil
import com.mints.goldspace.BuildConfig
......@@ -262,11 +263,9 @@ class MyFragment : BaseFragment(),
piv_grid.setAnimationType(AnimationType.THIN_WORM)
vp_grid.adapter = ViewPagerAdapter(pagerList)
// 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) {
// mCurrentIndex = position
......@@ -865,8 +864,9 @@ class MyFragment : BaseFragment(),
// 热门活动
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
if (hotList!!.isNotEmpty()) {
val hotBean: BannerBean.ListBean = hotList!![position]
if (hotList.isNotEmpty()) {
val hotBean: BannerBean.ListBean = hotList[position + (mCurrentIndex * HOT_PAGE_SIZE)]
if (!TextUtils.isEmpty(hotBean.toUrl)) {
// 自有界面
......@@ -1134,6 +1134,21 @@ class MyFragment : BaseFragment(),
item_title_friends.setOnClickListener(this)
ll_my_login.setOnClickListener(this)
item_customer_service.setOnClickListener(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
}
})
}
/**
......
......@@ -159,9 +159,7 @@ class PanFragment : BaseFragment(), PanView {
}
4 -> {
val activity: MainActivity? = activity as MainActivity?
activity?.let {
it.turnDayTask()
}
activity?.turnDayTask()
}
}
......
......@@ -38,7 +38,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
......
......@@ -170,21 +170,12 @@
</FrameLayout>
<FrameLayout
android:id="@+id/flAwardAd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="25dp"
android:layout_marginTop="10dp"
android:layout_marginRight="25dp"
android:background="@drawable/shape_bg_write">
<FrameLayout
android:id="@+id/flAwardAd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/color_0000">
</FrameLayout>
</FrameLayout>
android:background="@drawable/shape_bg_award"
android:gravity="center" />
</LinearLayout>
\ No newline at end of file
......@@ -45,8 +45,9 @@
android:id="@+id/fl_my_banner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:background="@drawable/shape_bg_award"
android:visibility="gone" />
<include layout="@layout/item_divider_gray" />
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.github.lzyzsd.jsbridge.BridgeWebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/blTurntableWebview"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.github.lzyzsd.jsbridge.BridgeWebView
android:id="@+id/blTurntableWebview"
android:layout_width="match_parent"
android:background="@color/black"
android:layout_height="match_parent" />
</FrameLayout>
android:layout_height="match_parent"
android:background="@color/black"
android:layerType="software" />
......@@ -39,7 +39,7 @@
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textColor="@color/color_ccc"
android:textColor="@color/color_AAA"
android:textSize="15sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/item_task_title" />
......
......@@ -5,4 +5,4 @@
# For customization when using a Version Control System, please read the
# header note.
#Mon Mar 08 19:40:55 CST 2021
sdk.dir=/Users/mcg/Library/Android/sdk
sdk.dir=/Users/Hello/Library/Android/sdk
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