Commit 75faabca authored by mengcuiguang's avatar mengcuiguang

首页开发

parent 41edb128
......@@ -13,4 +13,9 @@ public class AppConfig {
public static int awardRedpkg = 0;
public static int awardYuanbao = 0;
public static int csjAdRate = 100;
public static double signCash1 = 0.0;
public static double signCash2 = 0.0;
}
......@@ -5,7 +5,6 @@ object Constant {
const val PAGE_SIZE = 12
const val LOCAL_VEDIO = "LOCAL_VEDIO"
const val VEDIO_BEAN = "VEDIO_BEAN"
const val RECOMMEND_BEAN = "RECOMMEND_BEAN"
const val VEDIO_NEXT = "VEDIO_NEXT"
const val VEDIO_THIRD = "VEDIO_THIRD"
......@@ -15,25 +14,19 @@ object Constant {
const val LOAN_PERMISSION_FLAG = "loan_permission_flag"
const val FIRST_SPLASH = "first_splash"
const val IS_FIRST_AGREE_BTN = "is_first_agree_btn"
const val IS_FIRST_VIP_BTN = "is_first_agree_btn"
const val IS_FIRST_VEDIO = "is_first_vedio"
const val TAG_NAME = "SUN"
const val MINTS_APP_NAME = "每日小短剧"
const val MINTS_PKG_NAME = "com.duben.dayplaylet"
const val ACTION_EXIT_APP = "package.exit"
const val LUCKY_FLAG = "LUCKY_FLAG"
const val LUCKY_COMPLETE = "LUCKY_COMPLETE"
const val LUCKY_NEED = "LUCKY_NEED"
const val LUCKY_MY_FIRST = "LUCKY_MY_FIRST"
const val MAIN_FIRST_RECOMMEND = "MAIN_FIRST_RECOMMEND"
const val MAIN_TWO_RECOMMEND = "MAIN_TWO_RECOMMEND"
const val VEDIO_AD_COUNT = "VEDIO_AD_COUNT"
const val CARRIERTYPE_CSJ_VEDIO = "VEDIO_UNLOCK"
const val CARRIERTYPE_TX_VEDIO = "VEDIO_UNLOCK"
const val CARRIERTYPE_REWARD_FIRST = "REWARD_FIRST" //新人红包视频
const val CARRIERTYPE_SIGN = "REWARD_FIRST" //签到
const val CARRIERTYPE_SIGN = "FORCASH_SIGN" //签到
const val CARRIERTYPE_SIGN_DRAW = "FORCASH_SIGN_MORE" //签到第二次提现
const val CARRIERTYPE_SIGN_7 = "FORCASH_SIGN_AFTER7" //签到7天后的视频
const val FRAGMENT_CLICK_ONE = 0
......
package com.duben.dayplaylet.mvp.model;
import java.io.Serializable;
import java.util.LinkedList;
/**
* 描述:版本信息
* 作者:孟崔广
* 时间:2019/10/29 18:42
* 邮箱:mengcga@163.com
*/
public class CheckVersion implements Serializable {
private static final long serialVersionUID = -7241422035310338721L;
/**
* upgrades : [{"updateid":"583ab0df6b4744ae986afcff0d1e45a4","version":"1.0.1","updatemsg":"cj","script":null,"forceflag":1,"updatenum":1,"createtime":1483169915000,"updatetime":1483169918000}]
* forceUpgrade : true
*/
private boolean upgrade;
private LinkedList<UpgradesBean> upgradeMsg;
public boolean isForceUpgrade() {
return upgrade;
}
public void setForceUpgrade(boolean forceUpgrade) {
this.upgrade = forceUpgrade;
}
public LinkedList<UpgradesBean> getUpgrades() {
return upgradeMsg;
}
public void setUpgrades(LinkedList<UpgradesBean> upgrades) {
this.upgradeMsg = upgrades;
}
public class UpgradesBean implements Serializable {
/**
* updateid : 583ab0df6b4744ae986afcff0d1e45a4
* version : 1.0.1
* updatemsg : cj
* script : null
* forceflag : 1
* updatenum : 1
* createtime : 1483169915000
* updatetime : 1483169918000
*/
private String updateid;
private String version;
private String updatemsg;
private String url;
private int forceflag;
private int updatenum;
public String getUpdateid() {
return updateid;
}
public void setUpdateid(String updateid) {
this.updateid = updateid;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getUpdatemsg() {
return updatemsg;
}
public void setUpdatemsg(String updatemsg) {
this.updatemsg = updatemsg;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public int getForceflag() {
return forceflag;
}
public void setForceflag(int forceflag) {
this.forceflag = forceflag;
}
public int getUpdatenum() {
return updatenum;
}
public void setUpdatenum(int updatenum) {
this.updatenum = updatenum;
}
}
}
package com.duben.dayplaylet.mvp.model;
import java.io.Serializable;
import java.util.ArrayList;
public class SignInfoBean implements Serializable {
private SignMsgBean signMsg;
public SignMsgBean getSignMsg() {
return signMsg;
}
public void setSignMsg(SignMsgBean signMsg) {
this.signMsg = signMsg;
}
public class SignMsgBean implements Serializable {
private double surCash;//余额
private double cashCashFirst;//第一次奖励0.01元
private double cashCashSecond;//第二次奖励0.01元
private int sumCash;//标题余额
private int signDay;
private ArrayList<Integer> signWeekCashArr;//前7天展示
public double getSurCash() {
return surCash;
}
public void setSurCash(double surCash) {
this.surCash = surCash;
}
public double getCashCashFirst() {
return cashCashFirst;
}
public void setCashCashFirst(double cashCashFirst) {
this.cashCashFirst = cashCashFirst;
}
public double getCashCashSecond() {
return cashCashSecond;
}
public void setCashCashSecond(double cashCashSecond) {
this.cashCashSecond = cashCashSecond;
}
public int getSumCash() {
return sumCash;
}
public void setSumCash(int sumCash) {
this.sumCash = sumCash;
}
public int getSignDay() {
return signDay;
}
public void setSignDay(int signDay) {
this.signDay = signDay;
}
public ArrayList<Integer> getSignWeekCashArr() {
return signWeekCashArr;
}
public void setSignWeekCashArr(ArrayList<Integer> signWeekCashArr) {
this.signWeekCashArr = signWeekCashArr;
}
}
}
......@@ -5,10 +5,7 @@ import com.duben.dayplaylet.common.DeviceInfo
import com.duben.dayplaylet.manager.AppHttpManager
import com.duben.dayplaylet.manager.ShumeiManager
import com.duben.dayplaylet.manager.UserManager
import com.duben.dayplaylet.mvp.model.BannerList
import com.duben.dayplaylet.mvp.model.BaseResponse
import com.duben.dayplaylet.mvp.model.HotStyleTypesList
import com.duben.dayplaylet.mvp.model.UserBean
import com.duben.dayplaylet.mvp.model.*
import com.duben.dayplaylet.mvp.views.HomeView
import com.duben.dayplaylet.utils.DeviceUuidFactory
import com.duben.library.net.neterror.BaseSubscriber
......@@ -33,6 +30,22 @@ class HomePresenter : BasePresenter<HomeView>() {
})
}
fun getSignInfo() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.getSignInfo(),
object : BaseSubscriber<BaseResponse<SignInfoBean>>() {
override fun onCompleted() {}
override fun onError(e: Throwable) {}
override fun onNext(baseResponse: BaseResponse<SignInfoBean>) {
when (baseResponse.status) {
200 -> {
view.getSignInfoSuc(baseResponse.data)
}
}
}
})
}
fun getHomeV1Types() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.homeV1Types,
......
......@@ -9,4 +9,5 @@ interface HomeView : BaseView {
fun ordersSuc(data: BannerList?)
fun getUserSuc(data:UserBean)
fun getSignInfoSuc(data:SignInfoBean?)
}
......@@ -3,6 +3,7 @@ package com.duben.dayplaylet.net;
import android.content.Context;
import android.text.TextUtils;
import com.duben.dayplaylet.mvp.model.SignInfoBean;
import com.google.gson.JsonObject;
import com.duben.dayplaylet.BuildConfig;
import com.duben.dayplaylet.mvp.model.BannerList;
......@@ -225,6 +226,14 @@ public interface LoanService {
@POST("api/reportAddCoinMsg")
Observable<BaseResponse<JsonObject>> reportAddCoinMsg(@Body Map<String, Object> vo);
/**
* 签到信息
*
* @return
*/
@POST("api/reward/rdSignMsg")
Observable<BaseResponse<SignInfoBean>> getSignInfo();
/**
* 默认http工厂
*/
......
package com.duben.dayplaylet.ui.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.GridLayoutManager
import com.duben.dayplaylet.R
import com.duben.dayplaylet.manager.LocalVedioManager
import com.duben.dayplaylet.mvp.model.BannerList
import com.duben.dayplaylet.mvp.model.VedioBean
import com.duben.dayplaylet.mvp.presenters.FollowPresenter
import com.duben.dayplaylet.mvp.views.FollowView
import com.duben.dayplaylet.ui.activitys.MainActivity
import com.duben.dayplaylet.ui.adapter.FollowAdapter
import com.duben.dayplaylet.ui.fragment.base.BaseFragment
import kotlinx.android.synthetic.main.fragment_follow_video.*
/**
* @author Assen
* @date 2023/7/5
* @desc 主页 -> 推荐 —> 追剧
*/
class FollowVideoFragment : BaseFragment(), FollowView {
private val followPresenter by lazy { FollowPresenter() }
private val datas = arrayListOf<VedioBean>()
private var followAdapter: FollowAdapter? = null
companion object {
fun newInstance(): Fragment {
val args = Bundle()
val fragment = FollowVideoFragment()
fragment.arguments = args
return fragment
}
}
override fun onResume() {
super.onResume()
followPresenter.getCollectList()
}
override fun initViewsAndEvents() {
followPresenter.attachView(this)
initRecy()
}
override fun getContentViewLayoutID() = R.layout.fragment_follow_video
private fun initRecy() {
val emptyView =
LayoutInflater.from(requireContext()).inflate(R.layout.item_follow_empty, null)
emptyView.findViewById<View>(R.id.btn).setOnClickListener {
// 去剧场
// (requireActivity() as MainActivity).changeRecommendTab(1)
}
rv_follow.layoutManager = GridLayoutManager(requireContext(), 3)
followAdapter = FollowAdapter(requireActivity())
followAdapter?.setEmptyView(emptyView)
followAdapter?.setNewInstance(datas)
followAdapter?.setOnItemLongClickListener { adapter, view, position ->
datas[position].isChecked = true
followAdapter?.setEditStyle(true)
showEditView(false)
return@setOnItemLongClickListener false
}
followAdapter?.setOnItemClickListener { adapter, view, position ->
if (followAdapter?.getEditStyle() == true) return@setOnItemClickListener
LocalVedioManager.startVedioDetailActivityForType(
requireActivity(),
datas[position]
)
}
rv_follow.adapter = followAdapter
}
fun getAdapter(): FollowAdapter? {
return followAdapter
}
override fun onDetach() {
super.onDetach()
followPresenter.detachView()
}
private fun showEditView(show: Boolean) {
// (requireActivity() as MainActivity).showEditView(show)
}
private fun hideEditView(hide: Boolean) {
// (requireActivity() as MainActivity).hideEditView(hide)
}
override fun getCollectListSuc(bannerList: BannerList) {
datas.clear()
if (bannerList.list.isNotEmpty()) {
datas.addAll(bannerList.list)
followAdapter?.setNewInstance(datas)
showEditView(true)
} else {
hideEditView(true)
}
followAdapter?.setEditStyle(false)
}
override fun getCollectListFail() {
showEditView(false)
}
override fun cancelCollectSuc() {
followPresenter.getCollectList()
// (requireActivity() as MainActivity).showEditView(true)
}
override fun cancelCollectFail() {
}
fun delete() {
followAdapter?.let {
val strArr = arrayListOf<String>()
for (datum in it.data) {
if (datum.isChecked) {
strArr.add("" + datum.vedioId)
}
}
followPresenter.cancelCollect(strArr)
}
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ import com.duben.dayplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.duben.dayplaylet.ui.widgets.*
import com.duben.dayplaylet.utils.BubbleUtils
import com.duben.dayplaylet.utils.ConsumerToastUtil
import com.duben.dayplaylet.utils.StringUtil
import com.duben.dayplaylet.utils.FormatUtil
import com.duben.library.utils.nodoubleclick.AntiShake
import com.google.android.material.tabs.TabLayout
import com.google.android.material.tabs.TabLayoutMediator
......@@ -54,7 +54,7 @@ import kotlin.concurrent.schedule
/**
* 描述:首页
* 作者:孟崔广
* 时间:2023/6/29 11:30
* 时间:2023/8/29 11:30
*/
class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnRefreshListener {
......@@ -71,7 +71,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
private var vpAdapter: HomeVideoPageAdapter? = null
private var topAdapter: TopAdapter? = null
private var userInfo: UserBean? = null
private var isFirstGetUserInfo = true
private var signMsg: SignInfoBean.SignMsgBean? = null
private var isSignDrawFlag = false // 签到2次打款 用户主动取消流程结束
// 新人红包
var newcomerDialog: NewcomerDialog? = null
......@@ -131,99 +132,71 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
when (v?.id) {
R.id.tv_main_watchmore -> {
// showSignDrawDialog()
readyGo(WatchRecordActivity::class.java)
// readyGo(LoadingActivity::class.java)
}
R.id.iv_main_sign -> {
// showSignDialog(7)
showDrawAlipayDialog()
}
}
}
private fun loadData() {
Timer().schedule(200) {
requireActivity().runOnUiThread {
if (AntiShake.check(rv_main_list?.id)) return@runOnUiThread
if (!TextUtils.isEmpty(userManager?.userID)) {
homePresenter.getHomeV1Types()
if (signMsg!!.signDay <= 7) {
showSignDialog()
} else {
showSignDrawDialog(2)
}
}
}
}
private fun initVp() {
topAdapter = TopAdapter(topList)
val ma = LinearLayoutManager(requireContext())
ma.orientation = LinearLayoutManager.HORIZONTAL
rv_main_list.layoutManager = ma
rv_main_list.adapter = topAdapter
topAdapter?.setOnItemClickListener(object : TopAdapter.OnItemClickListener {
override fun onItemClick(position: Int) {
if (topList.size > 0) {
LocalVedioManager.startVedioDetailActivityForType(
requireActivity(),
topList[position]
)
}
}
})
vpAdapter = HomeVideoPageAdapter(tabsData, this)
vp2.adapter = vpAdapter
vp2.desensitization()
TabLayoutMediator(tablayout, vp2) { tab, position ->
// 初始化Tab
tab.id = position
if (tabsData.size > 0) {
tab.customView = getTabView(tabsData[position].type)
}
}.attach()
tablayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab?) {
updateTab(tab, true)
mSelectTabIndex = tab!!.id
}
override fun onTabUnselected(tab: TabLayout.Tab?) {
updateTab(tab, false)
}
/**
* 点击关闭广告
*/
private fun adCloseNext(carrierType: String) {
when (carrierType) {
Constant.CARRIERTYPE_REWARD_FIRST -> {
ConsumerToastUtil.showAwardText(requireContext(), userInfo?.rewardCoin ?: 0, 0)
override fun onTabReselected(tab: TabLayout.Tab?) {
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
}, 100)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
}, 200)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
}, 300)
}, 1400)
}
})
vp2.offscreenPageLimit = 100
}
private fun updateTab(tab: TabLayout.Tab?, isSelected: Boolean) {
tab?.customView?.let {
val text = it.findViewById<TextView>(R.id.item_tv)
if (isSelected) {
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.red))
} else {
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_8D8F90))
Constant.CARRIERTYPE_SIGN -> {
Handler(Looper.getMainLooper()).postDelayed({
// 1、第一次打款
showDrawAlipayDialog(signMsg?.cashCashFirst ?: 0.01)
Handler(Looper.getMainLooper()).postDelayed({
// 2、展示签到余额
drawAlipayDialog?.dismiss()
showSignDrawDialog(0)
Handler(Looper.getMainLooper()).postDelayed({
// 3、发放奖励弹窗
if (!isSignDrawFlag) {
signDrawDialog?.dismiss()
readyGo(LoadingActivity::class.java)
Handler(Looper.getMainLooper()).postDelayed({
showAd(Constant.CARRIERTYPE_SIGN_DRAW)
}, 2500)
}
isSignDrawFlag = false
}, 3500)
}, 1500)
}, 300)
}
}
}
private fun getTabView(text: String): View {
val view = LayoutInflater.from(requireContext()).inflate(R.layout.item_video_tab, null)
view.findViewById<TextView>(R.id.item_tv).text = text
return view
}
override fun onRefresh(refreshLayout: RefreshLayout) {
vpAdapter?.run {
if (getFragments().isNotEmpty()) {
val fragment = getFragments()[mSelectTabIndex]
if (fragment != null) {
(fragment as MovieFragment).onRefresh()
refreshLayout.finishRefresh()
}
Constant.CARRIERTYPE_SIGN_DRAW -> {
Handler(Looper.getMainLooper()).postDelayed({
// 1、第二次打款
showDrawAlipayDialog(signMsg?.cashCashSecond ?: 0.01)
Handler(Looper.getMainLooper()).postDelayed({
// 2、第二次展示签到余额
drawAlipayDialog?.dismiss()
showSignDrawDialog(1)
}, 1500)
}, 300)
}
}
}
......@@ -278,23 +251,35 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
this.userInfo = data
UserManager.getInstance().saveUserInfo(data)
tv_cash.text = "${StringUtil.getCashFormaet(data.rewardCoin)}元"
tv_cash.text = "${FormatUtil.getCashFormaet(data.rewardCoin)}元"
tv_gold.text = "${data.diamonds}个"
// 只执行一次
if (isFirstGetUserInfo) {
isFirstGetUserInfo = false
if (data.rewardFirst == 0) {
// 弹出新人红包
if (newcomerDialog != null && !newcomerDialog!!.isShowing) {
showNewcomerDialog(data.rewardCoin)
}
} else {
// 弹出签到
// 新人红包只执行一次
if (data.rewardFirst == 0) {
// 弹出新人红包
if (newcomerDialog != null && !newcomerDialog!!.isShowing) {
showNewcomerDialog(data.rewardCoin)
return
}
}
// 弹出签到
homePresenter.getSignInfo()
}
override fun getSignInfoSuc(data: SignInfoBean?) {
signMsg = data?.signMsg
if (signMsg == null) {
iv_main_sign.visibility = View.GONE
} else {
iv_main_sign.visibility = View.VISIBLE
tv_main_signcash.text = "${signMsg!!.sumCash}元"
AppConfig.signCash1 = FormatUtil.sub(signMsg!!.surCash, signMsg!!.cashCashFirst)
AppConfig.signCash2 = FormatUtil.sub(AppConfig.signCash1, signMsg!!.cashCashSecond)
if (signMsg!!.signDay <= 7) {
showSignDialog()
}
}
}
override fun onHiddenChanged(hidden: Boolean) {
......@@ -306,6 +291,18 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
private fun loadData() {
Timer().schedule(200) {
requireActivity().runOnUiThread {
if (AntiShake.check(rv_main_list?.id)) return@runOnUiThread
if (!TextUtils.isEmpty(userManager?.userID)) {
homePresenter.getHomeV1Types()
}
}
}
}
fun ViewPager2.desensitization() {
//动态设置ViewPager2 灵敏度
try {
......@@ -320,45 +317,69 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
/**
* 新人弹窗
*/
private fun showNewcomerDialog(rewardCoin: Int) {
newcomerDialog = NewcomerDialog(requireContext(), rewardCoin)
newcomerDialog?.setAdListener(object : NewcomerDialog.AdListener {
override fun showAd() {
newcomerDialog?.dismiss()
showAd(Constant.CARRIERTYPE_REWARD_FIRST)
}
})
newcomerDialog!!.show()
}
private fun showSignDrawDialog() {
signDrawDialog = SignDrawDialog(requireContext(), true)
/**
* 签到余额弹窗
*
* times 第几次进入
* 0-7天内 第一次进入,用定时器
*
* 1-7天内 第二次进入.不用定时
* 2-7天后 第一次进入.不用定时
*/
private fun showSignDrawDialog(times: Int) {
if (signMsg == null) return
signDrawDialog = SignDrawDialog(requireContext(), times, signMsg!!)
signDrawDialog?.setAdListener(object : SignDrawDialog.AdListener {
override fun showAd() {
showToast("123")
override fun click() {
signDrawDialog?.dismiss()
// showAd("")
if (times == 0) {
isSignDrawFlag = true
// 发放奖励弹窗
readyGo(LoadingActivity::class.java)
Handler(Looper.getMainLooper()).postDelayed({
showAd(Constant.CARRIERTYPE_SIGN_DRAW)
}, 2500)
} else if (times == 1) {
} else if (times == 2) {
isSignDrawFlag = true
// 发放奖励弹窗
readyGo(LoadingActivity::class.java)
Handler(Looper.getMainLooper()).postDelayed({
showAd(Constant.CARRIERTYPE_SIGN_7)
}, 2500)
}
}
override fun click() {
override fun close() {
signDrawDialog?.dismiss()
isSignDrawFlag = true
}
})
signDrawDialog!!.show()
}
private fun showDrawAlipayDialog() {
drawAlipayDialog = DrawAlipayDialog(requireContext(), 0.03)
/**
* 首次打款弹窗
*/
private fun showDrawAlipayDialog(cash: Double) {
drawAlipayDialog = DrawAlipayDialog(requireContext(), cash)
drawAlipayDialog!!.show()
Handler(Looper.getMainLooper()).postDelayed({
drawAlipayDialog?.dismiss()
showSignDrawDialog()
}, 1500)
}
private fun showAd(carrierType: String) {
......@@ -398,44 +419,50 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
})
}
private fun adCloseNext(carrierType: String) {
when (carrierType) {
Constant.CARRIERTYPE_REWARD_FIRST -> {
ConsumerToastUtil.showAwardText(requireContext(), userInfo?.rewardCoin ?: 0, 0)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
}, 100)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
}, 200)
Handler(Looper.getMainLooper()).postDelayed({
addAnimation(iv_main_tempanim, iv_cash, R.mipmap.ic_redpkg)
}, 300)
}, 1400)
}
Constant.CARRIERTYPE_SIGN -> {
}
}
}
/**
* 签到弹窗
*/
private fun showSignDialog() {
if (signMsg == null) return
private fun showSignDialog(signDay: Int) {
DialogUtils.showSignDialog(requireContext(), object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View) {
dialog?.dismiss()
when (v.id) {
R.id.tv_sign_withdraw -> {
readyGo(LoadingActivity::class.java)
// readyGo(LoadingActivity::class.java)
// Handler(Looper.getMainLooper()).postDelayed({
// showAd(Constant.CARRIERTYPE_SIGN)
// }, 2500)
// 测试逻辑
Handler(Looper.getMainLooper()).postDelayed({
showAd(Constant.CARRIERTYPE_SIGN)
}, 2500)
// 1、第一次打款
showDrawAlipayDialog(signMsg?.cashCashFirst ?: 0.01)
Handler(Looper.getMainLooper()).postDelayed({
// 2、展示签到余额
drawAlipayDialog?.dismiss()
showSignDrawDialog(0)
Handler(Looper.getMainLooper()).postDelayed({
if (!isSignDrawFlag) {
// 3、发放奖励弹窗
signDrawDialog?.dismiss()
readyGo(LoadingActivity::class.java)
Handler(Looper.getMainLooper()).postDelayed({
showAd(Constant.CARRIERTYPE_SIGN_DRAW)
}, 2500)
}
isSignDrawFlag = false
}, 3500)
}, 1500)
}, 300)
}
}
}
}, signDay)
}, signMsg!!)
}
......@@ -451,9 +478,6 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
* 动画
*/
private fun addAnimation(view: View, targetView: View, pic: Int) {
// 一、创造出执行动画的主题---imageview
//代码new一个imageview,图片资源是上面的imageview的图片
// (这个图片就是执行动画的图片,从开始位置出发,经过一个抛物线(贝塞尔曲线),移动到购物车里)
val goods = ImageView(requireContext())
goods.setImageDrawable(
resources.getDrawable(
......@@ -463,75 +487,41 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
)
val params = ConstraintLayout.LayoutParams(BubbleUtils.dp2px(30), BubbleUtils.dp2px(30))
rl.addView(goods, params)
// 二、计算动画开始/结束点的坐标的准备工作
//得到父布局的起始点坐标(用于辅助计算动画开始/结束时的点的坐标)
val parentLocation = IntArray(2)
rl.getLocationInWindow(parentLocation)
//得到商品图片的坐标(用于计算动画开始的坐标)
val startLoc = IntArray(2)
view.getLocationInWindow(startLoc)
//得到购物车图片的坐标(用于计算动画结束后的坐标)
val endLoc = IntArray(2)
targetView.getLocationInWindow(endLoc)
// 三、正式开始计算动画开始/结束的坐标
//开始掉落的商品的起始点:商品起始点-父布局起始点+该商品图片的一半
val startX =
startLoc[0] - parentLocation[0] + goods.width / 2.toFloat() + 20
val startY =
startLoc[1] - parentLocation[1] + goods.height / 2.toFloat() + 120
//商品掉落后的终点坐标:购物车起始点-父布局起始点+购物车图片的1/5
val toX =
endLoc[0] - parentLocation[0].toFloat()
// + targetView.width / 5.toFloat()
val toY = endLoc[1] - parentLocation[1].toFloat() + targetView.height / 5.toFloat()
//四、计算中间动画的插值坐标(贝塞尔曲线)(其实就是用贝塞尔曲线来完成起终点的过程)
//开始绘制贝塞尔曲线
val path = Path()
//移动到起始点(贝塞尔曲线的起点)
path.moveTo(startX, startY)
//使用二次萨贝尔曲线:注意第一个起始坐标越大,贝塞尔曲线的横向距离就会越大,一般按照下面的式子取即可
//想实现类似抛物线的形式,这里的控制点取的是(startX+toX)/2,startY
path.quadTo((startX + toX) / 2, startY, toX, toY)
//mPathMeasure用来计算贝塞尔曲线的曲线长度和贝塞尔曲线中间插值的坐标,
// 如果是true,path会形成一个闭环,Path用来计算path路径中的点的坐标
mPathMeasure = PathMeasure(path, false)
//★★★属性动画实现(从0到贝塞尔曲线的长度之间进行插值计算,获取中间过程的距离值)
val valueAnimator = ValueAnimator.ofFloat(0f, mPathMeasure!!.length)
valueAnimator.duration = 500
// 匀速线性插值器
valueAnimator.interpolator = LinearInterpolator()
valueAnimator.addUpdateListener { animation -> // 当插值计算进行时,获取中间的每个值,
// 这里这个值是中间过程中的曲线长度(下面根据这个值来得出中间点的坐标值)
val value = animation.animatedValue as Float
// ★★★★★获取当前点坐标封装到mCurrentPosition
// boolean getPosTan(float distance, float[] pos, float[] tan) :
// 传入一个距离distance(0<=distance<=getLength()),然后会计算当前距
// 离的坐标点和切线,pos会自动填充上坐标,这个方法很重要。
mPathMeasure!!.getPosTan(
value,
mCurrentPosition,
null
) //mCurrentPosition此时就是中间距离点的坐标值
// 移动的商品图片(动画图片)的坐标设置为该中间点的坐标
)
goods.translationX = mCurrentPosition[0]
goods.translationY = mCurrentPosition[1]
}
// 五、 开始执行动画
valueAnimator.start()
// 六、动画结束后的处理
valueAnimator.addListener(object : Animator.AnimatorListener {
override fun onAnimationStart(animation: Animator) {}
//当动画结束后:
override fun onAnimationEnd(animation: Animator) {
// 把移动的图片imageview从父布局里移除
rl.removeView(goods)
}
......@@ -539,4 +529,76 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
override fun onAnimationRepeat(animation: Animator) {}
})
}
private fun initVp() {
topAdapter = TopAdapter(topList)
val ma = LinearLayoutManager(requireContext())
ma.orientation = LinearLayoutManager.HORIZONTAL
rv_main_list.layoutManager = ma
rv_main_list.adapter = topAdapter
topAdapter?.setOnItemClickListener(object : TopAdapter.OnItemClickListener {
override fun onItemClick(position: Int) {
if (topList.size > 0) {
LocalVedioManager.startVedioDetailActivityForType(
requireActivity(),
topList[position]
)
}
}
})
vpAdapter = HomeVideoPageAdapter(tabsData, this)
vp2.adapter = vpAdapter
vp2.desensitization()
TabLayoutMediator(tablayout, vp2) { tab, position ->
// 初始化Tab
tab.id = position
if (tabsData.size > 0) {
tab.customView = getTabView(tabsData[position].type)
}
}.attach()
tablayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab?) {
updateTab(tab, true)
mSelectTabIndex = tab!!.id
}
override fun onTabUnselected(tab: TabLayout.Tab?) {
updateTab(tab, false)
}
override fun onTabReselected(tab: TabLayout.Tab?) {
}
})
vp2.offscreenPageLimit = 100
}
private fun updateTab(tab: TabLayout.Tab?, isSelected: Boolean) {
tab?.customView?.let {
val text = it.findViewById<TextView>(R.id.item_tv)
if (isSelected) {
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.red))
} else {
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_8D8F90))
}
}
}
private fun getTabView(text: String): View {
val view = LayoutInflater.from(requireContext()).inflate(R.layout.item_video_tab, null)
view.findViewById<TextView>(R.id.item_tv).text = text
return view
}
override fun onRefresh(refreshLayout: RefreshLayout) {
vpAdapter?.run {
if (getFragments().isNotEmpty()) {
val fragment = getFragments()[mSelectTabIndex]
if (fragment != null) {
(fragment as MovieFragment).onRefresh()
refreshLayout.finishRefresh()
}
}
}
}
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import android.content.Context
import android.text.Spannable
import android.view.Gravity
import android.view.View
import com.duben.dayplaylet.mvp.model.SignInfoBean
import java.lang.ref.WeakReference
object DialogUtils {
......@@ -126,7 +127,7 @@ object DialogUtils {
/**
* 签到弹框
*/
fun showSignDialog(ctx: Context, dialogListener: DialogListener, signDay: Int) {
fun showSignDialog(ctx: Context, dialogListener: DialogListener, signDay: SignInfoBean.SignMsgBean) {
val weakReference = WeakReference<Context>(ctx)
val signDialog = SignDialog(weakReference.get()!!, dialogListener, signDay)
signDialog.show()
......
......@@ -5,16 +5,19 @@ import android.content.Context
import android.os.Handler
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import androidx.core.content.ContextCompat
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.duben.dayplaylet.R
import com.duben.dayplaylet.mvp.model.SignInfoBean
import com.duben.dayplaylet.utils.BubbleUtils
import com.duben.dayplaylet.utils.SpanUtils
import kotlinx.android.synthetic.main.dialog_sign.*
class SignDialog(context: Context, listener: DialogListener, signDay: Int) :
class SignDialog(context: Context, listener: DialogListener, signMsg: SignInfoBean.SignMsgBean) :
Dialog(context, R.style.dialog) {
private var rope: YoYo.YoYoString? = null
......@@ -41,7 +44,26 @@ class SignDialog(context: Context, listener: DialogListener, signDay: Int) :
tv_sign_withdraw.setOnClickListener(listener)
tv_sign_rule.setOnClickListener(listener)
setLayoutStyle(signDay)
tv_sign_title.text = SpanUtils()
.append("签到7天领")
.setForegroundColor(context.resources.getColor(R.color.apk_uninstalled))
.append(signMsg.sumCash.toString())
.setFontSize(BubbleUtils.sp2px(30))
.setForegroundColor(context.resources.getColor(R.color.red))
.append("元红包")
.setForegroundColor(context.resources.getColor(R.color.apk_uninstalled))
.create()
val cashList = signMsg.signWeekCashArr
for (i in 1 until 8) {
if (i < signMsg.signDay) {
setEverydayStatus(i, 1, cashList[i - 1])
} else if (i == signMsg.signDay) {
setEverydayStatus(i, 0, cashList[i - 1])
} else {
setEverydayStatus(i, 2, cashList[i - 1])
}
}
Handler().postDelayed({
rope = YoYo.with(Techniques.Pulse).duration(500).repeat(-1).playOn(tv_sign_withdraw)
......@@ -54,65 +76,115 @@ class SignDialog(context: Context, listener: DialogListener, signDay: Int) :
rope = null
}
private fun setLayoutStyle(signDay: Int) {
tv_sign_title.text = SpanUtils()
.append("签到7天领")
.setForegroundColor(context.resources.getColor(R.color.apk_uninstalled))
.append("88")
.setFontSize(BubbleUtils.sp2px(30))
.setForegroundColor(context.resources.getColor(R.color.red))
.append("元红包")
.setForegroundColor(context.resources.getColor(R.color.apk_uninstalled))
.create()
/**
* status 0-可领取 1-已领取 2-未领取
*/
private fun setEverydayStatus(signDay: Int, status: Int, cash: Int) {
// 3
when (signDay) {
1 -> {
if (true) {
if (status == 0) {
tv_sign_status1.text = "可领取"
tv_sign_money1.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status1.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status1.visibility = View.GONE
tv_sign_money1.visibility = View.GONE
ll_sign_status1.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status1.text = "已领取"
ll_sign_status1.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status1.text = "第${signDay}天"
tv_sign_money1.text = "${cash}元"
}
}
2 -> {
if (true) {
if (status == 0) {
tv_sign_status2.text = "可领取"
tv_sign_money2.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status2.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status2.visibility = View.GONE
tv_sign_money2.visibility = View.GONE
ll_sign_status2.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status2.text = "已领取"
ll_sign_status2.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status2.text = "第${signDay}天"
tv_sign_money2.text = "${cash}元"
}
}
3 -> {
if (true) {
if (status == 0) {
tv_sign_status3.text = "可领取"
tv_sign_money3.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status3.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status3.visibility = View.GONE
tv_sign_money3.visibility = View.GONE
ll_sign_status3.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status3.text = "已领取"
ll_sign_status3.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status3.text = "第${signDay}天"
tv_sign_money3.text = "${cash}元"
}
}
4 -> {
if (true) {
if (status == 0) {
tv_sign_status4.text = "可领取"
tv_sign_money4.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status4.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status4.visibility = View.GONE
tv_sign_money4.visibility = View.GONE
ll_sign_status4.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status4.text = "已领取"
ll_sign_status4.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status4.text = "第${signDay}天"
tv_sign_money4.text = "${cash}元"
}
}
5 -> {
if (true) {
if (status == 0) {
tv_sign_status5.text = "可领取"
tv_sign_money5.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status5.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status5.visibility = View.GONE
tv_sign_money5.visibility = View.GONE
ll_sign_status5.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status5.text = "已领取"
ll_sign_status5.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status5.text = "第${signDay}天"
tv_sign_money5.text = "${cash}元"
}
}
6 -> {
if (true) {
if (status == 0) {
tv_sign_status6.text = "可领取"
tv_sign_money6.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status6.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status6.visibility = View.GONE
tv_sign_money6.visibility = View.GONE
ll_sign_status6.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status6.text = "已领取"
ll_sign_status6.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status6.text = "第${signDay}天"
tv_sign_money6.text = "${cash}元"
}
}
7 -> {
if (true) {
if (status == 0) {
tv_sign_status7.text = "可领取"
tv_sign_money7.setTextColor(ContextCompat.getColor(context, R.color.red))
ll_sign_status7.setBackgroundResource(R.mipmap.bg_no_sign)
} else if (status == 1) {
tv_sign_status7.visibility = View.GONE
tv_sign_money7.visibility = View.GONE
ll_sign_status7.setBackgroundResource(R.mipmap.bg_sign)
} else {
tv_sign_status7.text = "已领取"
ll_sign_status7.setBackgroundResource(R.mipmap.bg_sign_green)
tv_sign_status7.text = "第${signDay}天"
tv_sign_money7.text = "${cash}元"
}
}
}
......
......@@ -7,25 +7,29 @@ import android.view.Gravity
import android.view.KeyEvent
import android.view.WindowManager
import com.duben.dayplaylet.R
import com.duben.dayplaylet.mvp.model.SignInfoBean
import com.duben.dayplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import com.duben.dayplaylet.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.duben.dayplaylet.utils.BubbleUtils
import com.duben.dayplaylet.utils.SpanUtils
import kotlinx.android.synthetic.main.dialog_sign_draw.*
class SignDrawDialog(private val context: Context, private val isTimer: Boolean) :
class SignDrawDialog(
private val context: Context,
val times: Int,
signMsg: SignInfoBean.SignMsgBean
) :
Dialog(
context, R.style.dialog
) {
private val lp: WindowManager.LayoutParams
var timer: CountDownTimerSupport? = null
private var isClickBtn = false
private var adListener: AdListener? = null
interface AdListener {
fun showAd()
fun click()
fun close()
}
fun setAdListener(listener: AdListener?) {
......@@ -54,15 +58,22 @@ class SignDrawDialog(private val context: Context, private val isTimer: Boolean)
adListener?.click()
}
iv_close.setOnClickListener {
adListener?.close()
}
tv_sign_draw_cash.text = SpanUtils()
.append("¥")
.append("2.92")
.setFontSize(BubbleUtils.sp2px(40))
.create()
Handler().postDelayed({
startTimer()
}, 200)
if (times == 0) {
Handler().postDelayed({
startTimer()
}, 200)
}
}
override fun dismiss() {
......@@ -79,7 +90,7 @@ class SignDrawDialog(private val context: Context, private val isTimer: Boolean)
timer!!.stop()
timer = null
}
timer = CountDownTimerSupport(4000, 1000)
timer = CountDownTimerSupport(3000, 1000)
timer!!.setOnCountDownTimerListener(object : OnCountDownTimerListener {
override fun onTick(millisUntilFinished: Long) {
if (isShowing) {
......@@ -88,9 +99,6 @@ class SignDrawDialog(private val context: Context, private val isTimer: Boolean)
}
override fun onFinish() {
if (isShowing && !isClickBtn) {
adListener?.showAd()
}
}
})
timer!!.start()
......
package com.duben.dayplaylet.utils
import java.math.BigDecimal
object FormatUtil {
fun getCashFormaet(rewardCoin: Int): String {
val sumCoin = rewardCoin.toString()
val allcoinBig = BigDecimal(sumCoin)
val rateBig = BigDecimal("10000")
val cashStr = allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString()
return cashStr
}
/**
* 相减
*/
fun sub(d1: Double, d2: Double): Double {
val bd1 = BigDecimal(java.lang.Double.toString(d1))
val bd2 = BigDecimal(java.lang.Double.toString(d2))
return bd1.subtract(bd2).toDouble()
// val temp= bd1.subtract(bd2)
// return temp.setScale(2, BigDecimal.ROUND_HALF_UP).toDouble()
}
}
\ No newline at end of file
package com.duben.dayplaylet.utils
import android.content.Context
import android.content.pm.PackageManager
import android.text.TextUtils
import java.math.BigDecimal
object StringUtil {
/**
* 获取application中指定的meta-data
*
* @return 如果没有获取成功(没有对应值 , 或者异常),则返回值为空
*/
fun getAppMetaData(ctx: Context?, key: String): String {
if (ctx == null || TextUtils.isEmpty(key)) {
return ""
}
var resultData = ""
try {
val packageManager = ctx.packageManager
if (packageManager != null) {
val applicationInfo =
packageManager.getApplicationInfo(ctx.packageName, PackageManager.GET_META_DATA)
if (applicationInfo != null) {
if (applicationInfo.metaData != null) {
resultData = applicationInfo.metaData.getString(key)!!
}
}
}
} catch (e: PackageManager.NameNotFoundException) {
e.printStackTrace()
return ""
}
return resultData
}
fun getCashFormaet(rewardCoin: Int): String {
val sumCoin = rewardCoin.toString()
val allcoinBig = BigDecimal(sumCoin)
val rateBig = BigDecimal("10000")
val cashStr = allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString()
return cashStr
}
}
\ No newline at end of file
......@@ -31,11 +31,13 @@
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_sign_status1"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="10dp"
......@@ -57,11 +59,13 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_status2"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="10dp"
......@@ -83,11 +87,13 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_status3"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="10dp"
......@@ -109,11 +115,13 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_status4"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="10dp"
......@@ -136,16 +144,19 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_sign_status5"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="10dp"
......@@ -167,11 +178,13 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_status6"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingLeft="10dp"
......@@ -193,11 +206,13 @@
</LinearLayout>
<RelativeLayout
android:id="@+id/ll_sign_status7"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="2"
android:background="@mipmap/bg_no_sign"
android:gravity="center_horizontal"
android:paddingLeft="10dp"
android:paddingRight="10dp">
......
......@@ -171,15 +171,35 @@
</LinearLayout>
<ImageView
<FrameLayout
android:id="@+id/iv_main_sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="400dp"
android:layout_marginRight="20dp"
android:src="@mipmap/ic_main_sign"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:src="@mipmap/ic_main_sign" />
<TextView
android:id="@+id/tv_main_signcash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_red"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="3dp"
android:text="88元"
android:textColor="@color/white"
android:textSize="13sp" />
</FrameLayout>
<ImageView
android:id="@+id/iv_main_tempanim"
......
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