Commit 74579543 authored by jyx's avatar jyx

页面更新

parent b1938d77
...@@ -26,11 +26,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -26,11 +26,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
private val audioManager by lazy { getSystemService(Context.AUDIO_SERVICE) as AudioManager } private val audioManager by lazy { getSystemService(Context.AUDIO_SERVICE) as AudioManager }
// private var friendsFragment: Fragment? = null
// private var myFragment: Fragment? = null
// private var channelFragment: Fragment? = null
// private var wzFragment: Fragment? = null
private var oneFragment: Fragment? = null private var oneFragment: Fragment? = null
private var twoFragment: Fragment? = null private var twoFragment: Fragment? = null
private var threeFragment: Fragment? = null private var threeFragment: Fragment? = null
...@@ -239,4 +234,27 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener { ...@@ -239,4 +234,27 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
} }
currentFragment = fragment currentFragment = fragment
} }
/**
* 更换碎片
*
* @param fm
* @param fragment
*/
fun changeBonusFragment(
fragment: Fragment,
tag: String
) {
if (currentFragment === fragment) return
val ft: FragmentTransaction = supportFragmentManager.beginTransaction()
if (threeFragment != null && threeFragment!!.isAdded) {
ft.replace(R.id.content_layout, fragment).commitAllowingStateLoss()
threeFragment = fragment
} else {
threeFragment = fragment
ft.hide(currentFragment!!)
.add(R.id.content_layout, fragment, tag).show(fragment).commitAllowingStateLoss()
}
currentFragment = threeFragment
}
} }
\ No newline at end of file
package com.mints.flowbox.ui.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.mints.flowbox.R
import com.mints.flowbox.ui.adapter.listener.OnItemChildClickListener
import com.mints.flowbox.ui.adapter.listener.OnItemClickListener
class BonusTaskAdapter(context: Context, taskData: MutableList<String>) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private var mContext: Context = context
private var taskData: List<String>? = taskData
private var mOnItemClickListener: OnItemClickListener? = null
private var mOnItemChildClickListener: OnItemChildClickListener? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
val inflater: LayoutInflater = LayoutInflater.from(mContext)
return TaskHolder(inflater.inflate(R.layout.item_fragment_bouns_task, parent, false))
}
override fun getItemCount(): Int {
return if (taskData == null) {
0
} else {
taskData!!.size
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
holder.itemView.setOnClickListener {
mOnItemClickListener?.onItemClick(it, position)
}
taskData?.let {
val taskBean = it[position]
if (holder is TaskHolder) {
holder.itemTaskClick.setOnClickListener { it2 ->
mOnItemChildClickListener?.onItemChildClick(it2, position)
}
// 标题
holder.itemTaskTitle.text = "1.观看5个激励视频"
// 按钮文字
holder.itemTaskClick.text = "看视频"
when (position) {
0 -> holder.itemTaskImg.setImageDrawable(
ContextCompat.getDrawable(
mContext,
R.mipmap.ic_bouns_one
)
)
1 -> holder.itemTaskImg.setImageDrawable(
ContextCompat.getDrawable(
mContext,
R.mipmap.ic_bouns_two
)
)
2 -> holder.itemTaskImg.setImageDrawable(
ContextCompat.getDrawable(
mContext,
R.mipmap.ic_bouns_three
)
)
3 -> holder.itemTaskImg.setImageDrawable(
ContextCompat.getDrawable(
mContext,
R.mipmap.ic_bouns_four
)
)
}
if ("" == null) {
holder.itemTaskClick.visibility = View.GONE
} else {
holder.itemTaskClick.visibility = View.VISIBLE
// 按钮颜色
}
// 进度条
}
}
}
private inner class TaskHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val itemTaskImg: ImageView = itemView.findViewById(R.id.item_title_img)
val itemTaskTitle: TextView = itemView.findViewById(R.id.item_task_title)
val itemTaskClick: TextView = itemView.findViewById(R.id.item_task_click)
val itemTaskPb: ProgressBar = itemView.findViewById(R.id.item_task_pb)
}
fun setOnItemChildClickListener(listener: OnItemChildClickListener) {
mOnItemChildClickListener = listener
}
}
\ No newline at end of file
...@@ -49,7 +49,7 @@ public class GvSignAdapter extends BaseAdapter { ...@@ -49,7 +49,7 @@ public class GvSignAdapter extends BaseAdapter {
if (convertView == null) { if (convertView == null) {
LayoutInflater inflater = LayoutInflater.from(mContext); LayoutInflater inflater = LayoutInflater.from(mContext);
convertView = inflater.inflate(R.layout.item_list_my, null); convertView = inflater.inflate(R.layout.item_list_sign, null);
viewHolder = new ViewHolder(); viewHolder = new ViewHolder();
viewHolder.ic_my_icon = convertView.findViewById(R.id.ic_my_icon); viewHolder.ic_my_icon = convertView.findViewById(R.id.ic_my_icon);
...@@ -60,8 +60,8 @@ public class GvSignAdapter extends BaseAdapter { ...@@ -60,8 +60,8 @@ public class GvSignAdapter extends BaseAdapter {
viewHolder = (ViewHolder) convertView.getTag(); viewHolder = (ViewHolder) convertView.getTag();
} }
viewHolder.ic_my_icon.setImageResource(R.mipmap.ic_main_red); viewHolder.ic_my_icon.setImageResource(R.mipmap.ic_bouns_redbox_normal);
viewHolder.tv_my_title.setText(mList.get(position)); viewHolder.tv_my_title.setText(mList.get(position) + "天");
return convertView; return convertView;
} }
......
package com.mints.flowbox.ui.fragment package com.mints.flowbox.ui.fragment
import android.app.Dialog
import android.view.View
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import com.mints.flowbox.R import com.mints.flowbox.R
import com.mints.flowbox.common.AppConfig import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant import com.mints.flowbox.common.Constant
import com.mints.flowbox.ui.adapter.BonusTaskAdapter
import com.mints.flowbox.ui.adapter.GvSignAdapter import com.mints.flowbox.ui.adapter.GvSignAdapter
import com.mints.flowbox.ui.adapter.listener.OnItemChildClickListener
import com.mints.flowbox.ui.fragment.base.BaseFragment import com.mints.flowbox.ui.fragment.base.BaseFragment
import com.mints.flowbox.ui.widgets.dialog.BonusDialog
import com.mints.flowbox.ui.widgets.dialog.BonusTintDialog
import com.mints.flowbox.ui.widgets.dialog.DialogListener
import com.mints.flowbox.ui.widgets.seekbar.BubbleUtils import com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
import com.mints.flowbox.utils.SpanUtils import com.mints.flowbox.utils.SpanUtils
import com.mints.library.net.netstatus.NetUtils
import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.fragment_bonus.* import kotlinx.android.synthetic.main.fragment_bonus.*
import kotlinx.android.synthetic.main.header_layout.*
private val TAG = HomeFragment::class.java.simpleName private val TAG = HomeFragment::class.java.simpleName
...@@ -19,7 +27,11 @@ private val TAG = HomeFragment::class.java.simpleName ...@@ -19,7 +27,11 @@ private val TAG = HomeFragment::class.java.simpleName
* @date 2021/6/4 * @date 2021/6/4
* @des 福利页 * @des 福利页
*/ */
class BonusFragment : BaseFragment() { class BonusFragment : BaseFragment(), OnItemChildClickListener {
// 任务数据
private val dataList: MutableList<String> = mutableListOf()
private var bonusTaskAdapter: BonusTaskAdapter? = null
private var signData = arrayListOf<String>() private var signData = arrayListOf<String>()
...@@ -43,7 +55,7 @@ class BonusFragment : BaseFragment() { ...@@ -43,7 +55,7 @@ class BonusFragment : BaseFragment() {
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
initView() initView()
for (i in 1..16) { for (i in 1..14) {
signData.add("" + i) signData.add("" + i)
} }
...@@ -52,14 +64,45 @@ class BonusFragment : BaseFragment() { ...@@ -52,14 +64,45 @@ class BonusFragment : BaseFragment() {
} }
private fun initView() { private fun initView() {
tv_title.text = "福利"
tv_1.text = SpanUtils() tv_1.text = SpanUtils()
.append("新人红包:") .append("新人红包:")
.append("200元").setForegroundColor(ContextCompat.getColor(mContext, R.color.red)) .append("200元")
.setBold().setFontSize(BubbleUtils.dp2px(20)) .setForegroundColor(ContextCompat.getColor(mContext, R.color.color_FFF5E8))
.setBold().setFontSize(BubbleUtils.dp2px(30))
.create() .create()
dataList.add("")
dataList.add("")
dataList.add("")
dataList.add("")
recy_task.setItemViewCacheSize(10)
bonusTaskAdapter = BonusTaskAdapter(mContext, dataList)
recy_task.adapter = bonusTaskAdapter
bonusTaskAdapter?.setOnItemChildClickListener(this)
} }
override fun getContentViewLayoutID() = R.layout.fragment_bonus override fun getContentViewLayoutID() = R.layout.fragment_bonus
override fun onItemChildClick(view: View?, position: Int) {
if (AntiShake.check(view?.id)) return
if (!NetUtils.isNetworkConnected(context)) {
showToast("网络异常,请检测网络")
return
}
when (view?.id) {
R.id.item_task_click -> {
BonusTintDialog(mContext, object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) {
dialog?.dismiss()
}
})
.setTitle("恭喜您成功解冻20元现金红包!")
.setBtnStr("好的")
.show()
}
}
}
} }
\ No newline at end of file
package com.mints.flowbox.ui.fragment
import com.mints.flowbox.R
import com.mints.flowbox.ui.fragment.base.BaseFragment
/**
*
* @author jyx
* @date 2021/6/11
* @des
*/
class GetPacketFragment : BaseFragment() {
override fun initViewsAndEvents() {
}
override fun getContentViewLayoutID() = R.layout.fragment_get_packet
}
\ No newline at end of file
package com.mints.flowbox.ui.fragment package com.mints.flowbox.ui.fragment
import android.Manifest
import android.app.Dialog import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
...@@ -33,6 +34,7 @@ import com.mints.flowbox.utils.WifiUtils ...@@ -33,6 +34,7 @@ import com.mints.flowbox.utils.WifiUtils
import com.mints.library.utils.CommonUtils import com.mints.library.utils.CommonUtils
import com.mints.library.utils.nodoubleclick.AntiShake import com.mints.library.utils.nodoubleclick.AntiShake
import com.rd.animation.type.AnimationType import com.rd.animation.type.AnimationType
import com.tbruyelle.rxpermissions.RxPermissions
import kotlinx.android.synthetic.main.fragment_home.* import kotlinx.android.synthetic.main.fragment_home.*
import kotlinx.android.synthetic.main.item_promotions.* import kotlinx.android.synthetic.main.item_promotions.*
import net.grandcentrix.tray.AppPreferences import net.grandcentrix.tray.AppPreferences
...@@ -83,16 +85,6 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback, ...@@ -83,16 +85,6 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
init() init()
initView() initView()
initListener() initListener()
// RxPermissions(requireActivity())
// .request(Manifest.permission.ACCESS_FINE_LOCATION)
// .subscribe { granted: Boolean ->
// if (granted) {
//
// } else {
// showMissingPermissionDialog("设备")
// }
// }
} }
/** 初始化 */ /** 初始化 */
...@@ -188,7 +180,15 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback, ...@@ -188,7 +180,15 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
} }
// 扫一扫 // 扫一扫
R.id.btn_scan -> { R.id.btn_scan -> {
RxPermissions(requireActivity())
.request(Manifest.permission.CAMERA)
.subscribe { granted: Boolean ->
if (granted) {
readyGo(ScanActivity::class.java) readyGo(ScanActivity::class.java)
} else {
showMissingPermissionDialog("拍照")
}
}
} }
// wifi提速 // wifi提速
R.id.btn_speed_fast -> { R.id.btn_speed_fast -> {
......
...@@ -51,9 +51,9 @@ import com.mints.flowbox.utils.AppUtil ...@@ -51,9 +51,9 @@ import com.mints.flowbox.utils.AppUtil
import com.mints.flowbox.utils.SpanUtils import com.mints.flowbox.utils.SpanUtils
import kotlinx.android.synthetic.main.fragment_main_my.* import kotlinx.android.synthetic.main.fragment_main_my.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.item_fragment_main_my_clock.* //import kotlinx.android.synthetic.main.item_fragment_main_my_clock.*
import kotlinx.android.synthetic.main.item_fragment_main_my_title.* import kotlinx.android.synthetic.main.item_fragment_main_my_title.*
import kotlinx.android.synthetic.main.item_promotions.* //import kotlinx.android.synthetic.main.item_promotions.*
import kotlinx.android.synthetic.main.view_title.* import kotlinx.android.synthetic.main.view_title.*
import net.grandcentrix.tray.AppPreferences import net.grandcentrix.tray.AppPreferences
import java.math.BigDecimal import java.math.BigDecimal
...@@ -135,7 +135,7 @@ class MyFragment : BaseFragment(), ...@@ -135,7 +135,7 @@ class MyFragment : BaseFragment(),
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
item_clock_signview.stopRedbox() // item_clock_signview.stopRedbox()
} }
override fun onResume() { override fun onResume() {
...@@ -178,7 +178,7 @@ class MyFragment : BaseFragment(), ...@@ -178,7 +178,7 @@ class MyFragment : BaseFragment(),
} }
override fun onDestroyView() { override fun onDestroyView() {
item_clock_signview.onDestory() // item_clock_signview.onDestory()
super.onDestroyView() super.onDestroyView()
} }
...@@ -212,52 +212,52 @@ class MyFragment : BaseFragment(), ...@@ -212,52 +212,52 @@ class MyFragment : BaseFragment(),
srl_my.finishRefresh(false) srl_my.finishRefresh(false)
userConfig = null userConfig = null
vp_grid.visibility = View.GONE // vp_grid.visibility = View.GONE
setUserLoginStatus() setUserLoginStatus()
} }
override fun getMyHotActivitySuc(data: BannerBean?) { override fun getMyHotActivitySuc(data: BannerBean?) {
if (activity != null && !requireActivity().isFinishing) { if (activity != null && !requireActivity().isFinishing) {
data?.let { // data?.let {
vp_grid.visibility = View.VISIBLE // vp_grid.visibility = View.VISIBLE
hotList.clear() // hotList.clear()
hotList.addAll(it.list) // hotList.addAll(it.list)
//
generateGridData(hotList) // generateGridData(hotList)
} // }
} }
} }
// 生成热门活动数据 // 生成热门活动数据
private fun generateGridData(data: List<BannerBean.ListBean>) { private fun generateGridData(data: List<BannerBean.ListBean>) {
val inflater = LayoutInflater.from(mContext) // val inflater = LayoutInflater.from(mContext)
//
val pageCount = ceil(data.size * 1.0 / HOT_PAGE_SIZE).toInt() // val pageCount = ceil(data.size * 1.0 / HOT_PAGE_SIZE).toInt()
val pagerList = arrayListOf<View>() // val pagerList = arrayListOf<View>()
//
for (i in 0 until pageCount) { // for (i in 0 until pageCount) {
val gridView = inflater.inflate( // val gridView = inflater.inflate(
R.layout.item_fragment_main_my_promotions_gv, // R.layout.item_fragment_main_my_promotions_gv,
vp_grid, false // vp_grid, false
) as GridView // ) as GridView
gridView.adapter = GvMyAdapter(requireActivity(), data, i, HOT_PAGE_SIZE) // gridView.adapter = GvMyAdapter(requireActivity(), data, i, HOT_PAGE_SIZE)
pagerList.add(gridView) // pagerList.add(gridView)
//
gridView.onItemClickListener = this // gridView.onItemClickListener = this
} // }
if (pageCount <= 1) { // if (pageCount <= 1) {
piv_grid.visibility = View.GONE // piv_grid.visibility = View.GONE
} else { // } else {
piv_grid.visibility = View.VISIBLE // piv_grid.visibility = View.VISIBLE
piv_grid.count = pageCount // piv_grid.count = pageCount
} // }
mCurrentIndex = 0 // mCurrentIndex = 0
piv_grid.count = pageCount // piv_grid.count = pageCount
piv_grid.setAnimationType(AnimationType.THIN_WORM) // 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) {}
// //
...@@ -278,9 +278,9 @@ class MyFragment : BaseFragment(), ...@@ -278,9 +278,9 @@ class MyFragment : BaseFragment(),
return return
} }
signCardBean = signBean // signCardBean = signBean
// 初始化签到 // 初始化签到
setSignDayLayout(signCardBean!!) // setSignDayLayout(signCardBean!!)
} }
override fun signInHomePageSuc() { override fun signInHomePageSuc() {
...@@ -352,90 +352,90 @@ class MyFragment : BaseFragment(), ...@@ -352,90 +352,90 @@ class MyFragment : BaseFragment(),
* *
* @param signCardBean * @param signCardBean
*/ */
private fun setSignDayLayout(signCardBean: SignCardBean) { // private fun setSignDayLayout(signCardBean: SignCardBean) {
ll_my_sign.visibility = View.VISIBLE // ll_my_sign.visibility = View.VISIBLE
val nowDate = signCardBean.nowDate // val nowDate = signCardBean.nowDate
var signStatus = 0 //0-未签到 1-已签到 2-已签到且看了视频 // var signStatus = 0 //0-未签到 1-已签到 2-已签到且看了视频
val signList = signCardBean.list // val signList = signCardBean.list
if (signList != null && signList.size > 0) { // if (signList != null && signList.size > 0) {
val signGoldList = ArrayList<Int>() // val signGoldList = ArrayList<Int>()
val signViewBean = SignViewBean() // val signViewBean = SignViewBean()
for (i in signList.indices) { // for (i in signList.indices) {
val signBean = signList[i] // val signBean = signList[i]
val signDays = signBean.d // val signDays = signBean.d
// 初始化每天的金币 // // 初始化每天的金币
when (signDays) { // when (signDays) {
1 -> { // 1 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.firstStatus = signBean.status // signViewBean.firstStatus = signBean.status
} // }
2 -> { // 2 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.twoStatus = signBean.status // signViewBean.twoStatus = signBean.status
} // }
3 -> { // 3 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.threeStatus = signBean.status // signViewBean.threeStatus = signBean.status
} // }
4 -> { // 4 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.fourStatus = signBean.status // signViewBean.fourStatus = signBean.status
} // }
5 -> { // 5 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.fiveStatus = signBean.status // signViewBean.fiveStatus = signBean.status
} // }
6 -> { // 6 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.sixStatus = signBean.status // signViewBean.sixStatus = signBean.status
} // }
7 -> { // 7 -> {
signGoldList.add(signBean.coin) // signGoldList.add(signBean.coin)
signViewBean.sevenStatus = signBean.status // signViewBean.sevenStatus = signBean.status
} // }
} // }
//
// 获取当天状态 // // 获取当天状态
if (nowDate == signDays) { // if (nowDate == signDays) {
signStatus = signBean.status // signStatus = signBean.status
curSignCoin = signBean.coin // curSignCoin = signBean.coin
} // }
} // }
//
// 初始化金币数据 // // 初始化金币数据
item_clock_signview.initSignViewGoldLayout(signGoldList) // item_clock_signview.initSignViewGoldLayout(signGoldList)
// 设置签到样式 // // 设置签到样式
item_clock_signview.setSignViewLayout(signViewBean) // item_clock_signview.setSignViewLayout(signViewBean)
// 重新设置当天签到样式 // // 重新设置当天签到样式
item_clock_signview.setCurDaysSignViewLayout(nowDate, signStatus) // item_clock_signview.setCurDaysSignViewLayout(nowDate, signStatus)
if (signStatus == 0) { // if (signStatus == 0) {
myPresenter.signInHomePage() // myPresenter.signInHomePage()
} // }
} // }
//
// 根据当天状态 计算连续签到天数 // // 根据当天状态 计算连续签到天数
val alwaysSignDay = if (signStatus == 0) { // val alwaysSignDay = if (signStatus == 0) {
nowDate - 1 // nowDate - 1
} else { // } else {
nowDate // nowDate
} // }
item_clock_signday.text = SpanUtils() // item_clock_signday.text = SpanUtils()
.append(" 已连续签到") // .append(" 已连续签到")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.color_172B54)) // .setForegroundColor(ContextCompat.getColor(mContext, R.color.color_172B54))
.append(" $alwaysSignDay ") // .append(" $alwaysSignDay ")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.color_F18542)) // .setForegroundColor(ContextCompat.getColor(mContext, R.color.color_F18542))
.append("天").setForegroundColor(ContextCompat.getColor(mContext, R.color.color_172B54)) // .append("天").setForegroundColor(ContextCompat.getColor(mContext, R.color.color_172B54))
.create() // .create()
val finalSignStatus = signStatus // val finalSignStatus = signStatus
item_clock_signview.setSignViewListener { day -> // item_clock_signview.setSignViewListener { day ->
if (nowDate == day) { // if (nowDate == day) {
if (finalSignStatus == 1) { // if (finalSignStatus == 1) {
carrierType = Constant.CARRIER_SIGNIN_HOMEPAGE_CARD // carrierType = Constant.CARRIER_SIGNIN_HOMEPAGE_CARD
awardVedio(curSignCoin * 2, Constant.CARRIER_SIGNIN_HOMEPAGE_CARD) // awardVedio(curSignCoin * 2, Constant.CARRIER_SIGNIN_HOMEPAGE_CARD)
} // }
} // }
} // }
} // }
private fun setUserLoginStatus() { private fun setUserLoginStatus() {
if (userManager.userIsLogin()) { if (userManager.userIsLogin()) {
...@@ -625,7 +625,8 @@ class MyFragment : BaseFragment(), ...@@ -625,7 +625,8 @@ class MyFragment : BaseFragment(),
// 去分享文章 // 去分享文章
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_WZ) bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_WZ)
readyGo(WrapperActivity::class.java, bundle) } readyGo(WrapperActivity::class.java, bundle)
}
1 -> { 1 -> {
val bundle = Bundle() val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin) bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin)
...@@ -869,7 +870,12 @@ class MyFragment : BaseFragment(), ...@@ -869,7 +870,12 @@ class MyFragment : BaseFragment(),
} }
} }
R.id.iv_right_icon -> { R.id.iv_right_icon -> {
readyGo(SettingsActivity::class.java) // readyGo(SettingsActivity::class.java)
(requireActivity() as MainActivity).changeBonusFragment(
WzFragment(),
Constant.FRAGMENT_TAG_THREE
)
} }
R.id.btn_withdraw -> { R.id.btn_withdraw -> {
if (userConfig == null) { if (userConfig == null) {
...@@ -1089,24 +1095,24 @@ class MyFragment : BaseFragment(), ...@@ -1089,24 +1095,24 @@ class MyFragment : BaseFragment(),
item_title_friends.setOnClickListener(this) item_title_friends.setOnClickListener(this)
ll_my_login.setOnClickListener(this) ll_my_login.setOnClickListener(this)
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( // override fun onPageScrolled(
position: Int, // position: Int,
positionOffset: Float, // positionOffset: Float,
positionOffsetPixels: Int // positionOffsetPixels: Int
) { // ) {
} // }
//
override fun onPageSelected(position: Int) { // override fun onPageSelected(position: Int) {
mCurrentIndex = position // mCurrentIndex = position
//
piv_grid.selection = position // piv_grid.selection = position
} // }
//
}) // })
} }
/** /**
......
...@@ -449,7 +449,7 @@ class DashboradView : View { ...@@ -449,7 +449,7 @@ class DashboradView : View {
fun setVelocity(velocity: Int) { fun setVelocity(velocity: Int) {
if (mVelocity == velocity || velocity < mMin || velocity > mMax) { if (mVelocity == velocity || velocity < mMin || velocity > mMax) {
return; return
} }
mVelocity = velocity mVelocity = velocity
postInvalidate() postInvalidate()
......
...@@ -118,7 +118,7 @@ public class ScanRectView extends View { ...@@ -118,7 +118,7 @@ public class ScanRectView extends View {
/** /**
* 设置为正方形 * 设置为正方形
*/ */
public void setIsSquqre(boolean isSquare) { public void setIsSquare(boolean isSquare) {
if (this.isSquare == isSquare) { if (this.isSquare == isSquare) {
return; return;
} }
......
package com.mints.flowbox.ui.widgets.dialog
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.Button
import android.widget.TextView
import com.mints.flowbox.R
/**
*
* @author jyx
* @date 2021/6/11
* @des 福利页领金币
*/
class BonusTintDialog(context: Context, listener: DialogListener) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_dialogper_title: TextView
private val btn_dialogper_submit: Button
fun setTitle(title: String): BonusTintDialog {
tv_dialogper_title.visibility = View.VISIBLE
tv_dialogper_title.text = title
return this
}
fun setBtnStr(btnStr: String): BonusTintDialog {
btn_dialogper_submit.text = btnStr
return this
}
init {
setContentView(R.layout.dialog_bonus_tint)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimBottom
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ ->
i == KeyEvent.KEYCODE_BACK
}
// 查找View
tv_dialogper_title =
findViewById<View>(R.id.tv_title) as TextView
btn_dialogper_submit =
findViewById<View>(R.id.btn_submit) as Button
tv_dialogper_title.setOnClickListener(listener)
btn_dialogper_submit.setOnClickListener(listener)
}
}
\ No newline at end of file
...@@ -8,7 +8,6 @@ import android.view.View ...@@ -8,7 +8,6 @@ import android.view.View
import android.view.WindowManager import android.view.WindowManager
import android.widget.TextView import android.widget.TextView
import com.mints.flowbox.R import com.mints.flowbox.R
import com.mints.flowbox.ui.widgets.dialog.DialogListener
/** /**
* 授权弹窗 * 授权弹窗
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_E72C2B" />
<corners android:radius="5dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!--3个层的顺序即为显示时的叠加顺序-->
<!--背景色-->
<item android:id="@android:id/background">
<shape>
<corners android:radius="20dip" />
<solid android:color="@color/white" />
<stroke
android:width="1dp"
android:color="@color/color_ccc" />
</shape>
</item>
<!--一级进度条的颜色,也可以直接替换成图片-->
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="20dip" />
<solid android:color="@color/color_F23009" />
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<corners android:radius="100dp" /> <corners android:radius="100dp" />
<solid android:color="@color/color_E1B867" /> <solid android:color="@color/color_FDEB98" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_F5F6F8" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" />
</shape>
\ No newline at end of file
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<solid android:color="#FFFFFF" /> <solid android:color="#FFFFFF" />
<!-- 设置按钮的四个角为弧形 --> <!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 --> <!-- android:radius 弧形的半径 -->
<corners android:radius="50dip" /> <corners android:radius="10dip" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_FFE5BD" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="20dip" />
</shape>
\ No newline at end of file
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<com.mints.flowbox.ui.widgets.ScanRectView <com.mints.flowbox.ui.widgets.ScanRectView
android:layout_width="300dp" android:layout_width="300dp"
android:layout_height="300dp" android:layout_height="300dp"
android:layout_gravity="center" /> android:layout_gravity="center"
app:scanRectLineWidth="5dp" />
<com.mints.flowbox.ui.widgets.ScanView <com.mints.flowbox.ui.widgets.ScanView
android:id="@+id/sv" android:id="@+id/sv"
...@@ -20,7 +21,7 @@ ...@@ -20,7 +21,7 @@
android:layout_height="280dp" android:layout_height="280dp"
android:layout_gravity="center" android:layout_gravity="center"
android:background="#00ffffff" android:background="#00ffffff"
app:duration="3000" app:duration="4000"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:background="@drawable/shape_bg_write">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_walk"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="@string/privacy_name"
android:textColor="@color/color_FDEB98"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btn_submit"
android:layout_width="200dp"
android:layout_height="42dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_btn_friends"
android:gravity="center"
android:textColor="@color/color_F23009"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:overScrollMode="never">
<include layout="@layout/header_layout" />
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srl_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srlAccentColor="@color/gray"
app:srlPrimaryColor="@color/white">
<com.scwang.smartrefresh.layout.header.ClassicsHeader <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:overScrollMode="never"> android:background="@mipmap/bg_bonus" />
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="46dp"
android:layout_marginBottom="30dp">
<TextView <TextView
android:id="@+id/tv_1" android:id="@+id/tv_1"
...@@ -38,7 +31,9 @@ ...@@ -38,7 +31,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/tv_2" android:layout_below="@id/tv_2"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:text="新人红包:" /> android:text="新人红包"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView <TextView
android:id="@+id/tv_2" android:id="@+id/tv_2"
...@@ -46,8 +41,25 @@ ...@@ -46,8 +41,25 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_toEndOf="@id/tv_1" android:layout_toEndOf="@id/tv_1"
android:background="@drawable/shape_write"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="冻结中" android:text="冻结中"
android:textColor="@color/red" /> android:textColor="@color/red"
android:textSize="12sp" />
</RelativeLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_yellow"
android:elevation="4dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="10dp">
<TextView <TextView
android:id="@+id/tv_3" android:id="@+id/tv_3"
...@@ -55,17 +67,18 @@ ...@@ -55,17 +67,18 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/tv_1" android:layout_below="@id/tv_1"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="10dp" android:background="@drawable/shape_write"
android:text="连续签到14天后即可解冻200元现金红包" /> android:paddingStart="15dp"
android:paddingEnd="15dp"
</RelativeLayout> android:text="连续签到14天后即可解冻200元现金红包"
android:textColor="@color/red" />
<com.mints.flowbox.ui.widgets.ExpandableGridView <com.mints.flowbox.ui.widgets.ExpandableGridView
android:id="@+id/item_promotions_egv" android:id="@+id/item_promotions_egv"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_marginTop="10dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="10dp"
android:columnWidth="35dp" android:columnWidth="35dp"
android:divider="@null" android:divider="@null"
android:dividerHeight="10dp" android:dividerHeight="10dp"
...@@ -74,29 +87,52 @@ ...@@ -74,29 +87,52 @@
android:scrollbars="none" android:scrollbars="none"
android:stretchMode="spacingWidthUniform" /> android:stretchMode="spacingWidthUniform" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:background="@drawable/shape_write"
android:elevation="4dp"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_1"
android:layout_marginStart="10dp"
android:text="完成任务后即可领取今日奖励"
android:textColor="@color/black"
android:textSize="16sp" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_task" android:id="@+id/recy_task"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="10dp"
android:layout_marginEnd="15dp" android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:nestedScrollingEnabled="false" android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<Button <Button
android:id="@+id/btn_sign" android:id="@+id/btn_sign"
android:layout_width="100dp" android:layout_width="80dp"
android:layout_height="100dp" android:layout_height="80dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:background="@drawable/btn_circle" android:layout_marginTop="10dp"
android:background="@mipmap/ic_bouns_sign"
android:text="签到" android:text="签到"
android:textColor="@color/white" /> android:textColor="@color/white"
android:textSize="18sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView> </FrameLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/bg_packet" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="140dp"
android:background="@drawable/shape_yellow"
android:paddingStart="20dp"
android:paddingTop="4dp"
android:paddingEnd="20dp"
android:paddingBottom="4dp"
android:text="恭喜您成功获得200元现金奖励!"
android:textColor="@color/red"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:background="@mipmap/bg_red_packet"
android:gravity="center_horizontal"
android:text="\n200元"
android:textColor="@color/color_FDEB98"
android:textSize="30sp"
android:textStyle="bold" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_yellow"
android:padding="20dp">
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="提现进度"
android:textColor="@color/color_C18529"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="您当前排在第234320位,排序每日更新,您的"
android:textColor="@color/color_C18529"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
<Button
android:id="@+id/btn_speed_test"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:background="@mipmap/bg_packet_video"
android:gravity="end|center_vertical"
android:text="看视频 > "
android:textSize="16sp"
app:layout_constraintEnd_toStartOf="@+id/btn_clean"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView6" />
<Button
android:id="@+id/btn_clean"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:background="@mipmap/bg_packet_invite"
android:gravity="end|center_vertical"
android:text="邀好友 > "
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_speed_test"
app:layout_constraintTop_toBottomOf="@+id/textView6" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</FrameLayout>
</androidx.core.widget.NestedScrollView>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:overScrollMode="never">
android:paddingStart="10dp"
android:paddingEnd="10dp"> <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/bg_home" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -14,7 +26,7 @@ ...@@ -14,7 +26,7 @@
android:layout_marginTop="40dp" android:layout_marginTop="40dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="流量补贴" android:text="流量补贴"
android:textColor="@color/black" android:textColor="@color/white"
android:textSize="18sp" /> android:textSize="18sp" />
<com.mints.flowbox.ui.widgets.WifiView <com.mints.flowbox.ui.widgets.WifiView
...@@ -22,8 +34,13 @@ ...@@ -22,8 +34,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginStart="10dp" android:layout_marginStart="15dp"
android:layout_marginEnd="10dp" /> android:layout_marginEnd="15dp" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_banner" />
<FrameLayout <FrameLayout
android:id="@+id/fl_my_banner" android:id="@+id/fl_my_banner"
...@@ -37,6 +54,7 @@ ...@@ -37,6 +54,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="功能列表" android:text="功能列表"
...@@ -46,14 +64,17 @@ ...@@ -46,14 +64,17 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:layout_marginStart="10dp"
android:layout_marginEnd="10dp">
<Button <Button
android:id="@+id/btn_speed_test" android:id="@+id/btn_speed_test"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="80dp" android:layout_height="100dp"
android:background="@mipmap/bg_speed_test"
android:gravity="end|center_vertical" android:gravity="end|center_vertical"
android:text="网路测速 " android:text="网路测速 "
android:textSize="15sp"
app:layout_constraintEnd_toStartOf="@+id/btn_clean" app:layout_constraintEnd_toStartOf="@+id/btn_clean"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -61,9 +82,11 @@ ...@@ -61,9 +82,11 @@
<Button <Button
android:id="@+id/btn_clean" android:id="@+id/btn_clean"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="80dp" android:layout_height="100dp"
android:background="@mipmap/bg_clear"
android:gravity="end|center_vertical" android:gravity="end|center_vertical"
android:text="垃圾清理 " android:text="内存清理 "
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_speed_test" app:layout_constraintStart_toEndOf="@id/btn_speed_test"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -71,9 +94,11 @@ ...@@ -71,9 +94,11 @@
<Button <Button
android:id="@+id/btn_scan" android:id="@+id/btn_scan"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="80dp" android:layout_height="100dp"
android:background="@mipmap/bg_scan"
android:gravity="end|center_vertical" android:gravity="end|center_vertical"
android:text="扫一扫连WIFI " android:text="扫一扫连WIFI "
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btn_speed_fast" app:layout_constraintEnd_toStartOf="@id/btn_speed_fast"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -82,9 +107,11 @@ ...@@ -82,9 +107,11 @@
<Button <Button
android:id="@+id/btn_speed_fast" android:id="@+id/btn_speed_fast"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="80dp" android:layout_height="100dp"
android:background="@mipmap/bg_wifi"
android:gravity="end|center_vertical" android:gravity="end|center_vertical"
android:text="WIFI提速 " android:text="WIFI提速 "
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btn_scan" app:layout_constraintStart_toEndOf="@id/btn_scan"
...@@ -95,12 +122,27 @@ ...@@ -95,12 +122,27 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="赚金币" android:text="赚金币"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp" /> android:textSize="18sp" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_bg_write"
android:elevation="4dp"
android:orientation="vertical">
<include layout="@layout/item_promotions" /> <include layout="@layout/item_promotions" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
</androidx.appcompat.widget.LinearLayoutCompat>
</FrameLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<include layout="@layout/item_fragment_main_my_title" /> <include layout="@layout/item_fragment_main_my_title" />
<include layout="@layout/item_fragment_main_my_clock" /> <!-- <include layout="@layout/item_fragment_main_my_clock" />-->
<FrameLayout <FrameLayout
android:id="@+id/fl_my_banner" android:id="@+id/fl_my_banner"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
android:background="@drawable/shape_bg_award" android:background="@drawable/shape_bg_award"
android:visibility="gone" /> android:visibility="gone" />
<include layout="@layout/item_divider_gray" /> <!-- <include layout="@layout/item_divider_gray" />-->
<include layout="@layout/item_promotions" /> <include layout="@layout/item_promotions" />
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<ImageView
android:id="@+id/item_title_img"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_task_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:text="1.观看5个激励视频"
android:textColor="@color/black"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@+id/item_task_pb"
app:layout_constraintStart_toEndOf="@+id/item_title_img"
app:layout_constraintTop_toTopOf="parent" />
<ProgressBar
android:id="@+id/item_task_pb"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="120dp"
android:layout_height="12dp"
android:layout_marginStart="10dp"
android:progress="20"
android:progressDrawable="@drawable/progressbar_versus_changevedio_bg_bouns"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/item_title_img" />
<TextView
android:id="@+id/item_task_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textColor="@color/color_F23009"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@id/item_task_pb"
app:layout_constraintStart_toEndOf="@id/item_task_pb"
app:layout_constraintTop_toTopOf="@id/item_task_pb" />
<TextView
android:id="@+id/item_task_click"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_bonus_task"
android:gravity="center"
android:paddingStart="12dp"
android:paddingTop="4dp"
android:paddingEnd="12dp"
android:paddingBottom="4dp"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="10dp"> android:paddingTop="10dp"
>
<FrameLayout <FrameLayout
android:id="@+id/fl_my_icon" android:id="@+id/fl_my_icon"
...@@ -17,7 +18,6 @@ ...@@ -17,7 +18,6 @@
android:scaleType="fitXY" /> android:scaleType="fitXY" />
</FrameLayout> </FrameLayout>
<TextView <TextView
android:id="@+id/tv_my_title" android:id="@+id/tv_my_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="10dp">
<FrameLayout
android:id="@+id/fl_my_icon"
android:layout_width="38dp"
android:layout_height="56dp"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/ic_my_icon"
android:layout_width="38dp"
android:layout_height="56dp"
android:scaleType="fitXY" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:text="20元"
android:textColor="@color/color_FDEB98"
android:textSize="12sp" />
</FrameLayout>
<TextView
android:text="1"
android:id="@+id/tv_my_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
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:layout_marginTop="8dp" android:layout_marginTop="2dp"
android:layout_marginBottom="8dp"
android:visibility="gone" android:visibility="gone"
app:piv_count="2" app:piv_count="2"
app:piv_selectedColor="@color/color_FF9837" app:piv_selectedColor="@color/color_FF9837"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shape_write"> android:background="@drawable/shape_write">
<com.mints.flowbox.ui.widgets.CountDownView <com.mints.flowbox.ui.widgets.CountDownView
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
<color name="color_cb4a39">#cb4a39</color> <color name="color_cb4a39">#cb4a39</color>
<color name="color_0000FF">#0000FF</color> <color name="color_0000FF">#0000FF</color>
<color name="color_ccc">#cccccc</color> <color name="color_ccc">#cccccc</color>
<color name="color_DBDBDB">#DBDBDB</color>
<color name="color_F5F6F8">#F5F6F8</color>
<color name="color_AAA">#AAAAAA</color> <color name="color_AAA">#AAAAAA</color>
<color name="color_0000">#00000000</color> <color name="color_0000">#00000000</color>
<color name="color_20000000">#20000000</color> <color name="color_20000000">#20000000</color>
...@@ -30,6 +32,7 @@ ...@@ -30,6 +32,7 @@
<color name="color_333">#333333</color> <color name="color_333">#333333</color>
<color name="color_4BB93F">#4BB93F</color> <color name="color_4BB93F">#4BB93F</color>
<color name="color_FEB63D">#FEB63D</color> <color name="color_FEB63D">#FEB63D</color>
<color name="color_FFF5E8">#FFF5E8</color>
<color name="color_FF5E5E">#FF5E5E</color> <color name="color_FF5E5E">#FF5E5E</color>
<color name="color_172B54">#172B54</color> <color name="color_172B54">#172B54</color>
<color name="color_707A8D">#707A8D</color> <color name="color_707A8D">#707A8D</color>
...@@ -64,7 +67,11 @@ ...@@ -64,7 +67,11 @@
<color name="color_FAF6E8">#FAF6E8</color> <color name="color_FAF6E8">#FAF6E8</color>
<color name="color_F3E7C5">#F3E7C5</color> <color name="color_F3E7C5">#F3E7C5</color>
<color name="color_E1B867">#E1B867</color> <color name="color_E1B867">#E1B867</color>
<color name="color_FFE5BD">#FFE5BD</color>
<color name="color_C18529">#C18529</color>
<color name="color_FDEB98">#FDEB98</color>
<color name="color_FCCCAC">#FCCCAC</color> <color name="color_FCCCAC">#FCCCAC</color>
<color name="color_994B23">#994B23</color> <color name="color_994B23">#994B23</color>
<color name="color_F28335">#F28335</color> <color name="color_F28335">#F28335</color>
<color name="color_F23009">#F23009</color>
</resources> </resources>
\ 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