Commit 74579543 authored by jyx's avatar jyx

页面更新

parent b1938d77
......@@ -26,11 +26,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
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 twoFragment: Fragment? = null
private var threeFragment: Fragment? = null
......@@ -239,4 +234,27 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
}
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 {
if (convertView == null) {
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.ic_my_icon = convertView.findViewById(R.id.ic_my_icon);
......@@ -60,8 +60,8 @@ public class GvSignAdapter extends BaseAdapter {
viewHolder = (ViewHolder) convertView.getTag();
}
viewHolder.ic_my_icon.setImageResource(R.mipmap.ic_main_red);
viewHolder.tv_my_title.setText(mList.get(position));
viewHolder.ic_my_icon.setImageResource(R.mipmap.ic_bouns_redbox_normal);
viewHolder.tv_my_title.setText(mList.get(position) + "天");
return convertView;
}
......
package com.mints.flowbox.ui.fragment
import android.app.Dialog
import android.view.View
import androidx.core.content.ContextCompat
import com.mints.flowbox.R
import com.mints.flowbox.common.AppConfig
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.listener.OnItemChildClickListener
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.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.header_layout.*
private val TAG = HomeFragment::class.java.simpleName
......@@ -19,7 +27,11 @@ private val TAG = HomeFragment::class.java.simpleName
* @date 2021/6/4
* @des 福利页
*/
class BonusFragment : BaseFragment() {
class BonusFragment : BaseFragment(), OnItemChildClickListener {
// 任务数据
private val dataList: MutableList<String> = mutableListOf()
private var bonusTaskAdapter: BonusTaskAdapter? = null
private var signData = arrayListOf<String>()
......@@ -43,7 +55,7 @@ class BonusFragment : BaseFragment() {
override fun initViewsAndEvents() {
initView()
for (i in 1..16) {
for (i in 1..14) {
signData.add("" + i)
}
......@@ -52,14 +64,45 @@ class BonusFragment : BaseFragment() {
}
private fun initView() {
tv_title.text = "福利"
tv_1.text = SpanUtils()
.append("新人红包:")
.append("200元").setForegroundColor(ContextCompat.getColor(mContext, R.color.red))
.setBold().setFontSize(BubbleUtils.dp2px(20))
.append("200元")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.color_FFF5E8))
.setBold().setFontSize(BubbleUtils.dp2px(30))
.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 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
import android.Manifest
import android.app.Dialog
import android.os.Bundle
import android.text.TextUtils
......@@ -33,6 +34,7 @@ import com.mints.flowbox.utils.WifiUtils
import com.mints.library.utils.CommonUtils
import com.mints.library.utils.nodoubleclick.AntiShake
import com.rd.animation.type.AnimationType
import com.tbruyelle.rxpermissions.RxPermissions
import kotlinx.android.synthetic.main.fragment_home.*
import kotlinx.android.synthetic.main.item_promotions.*
import net.grandcentrix.tray.AppPreferences
......@@ -83,16 +85,6 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
init()
initView()
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,
}
// 扫一扫
R.id.btn_scan -> {
readyGo(ScanActivity::class.java)
RxPermissions(requireActivity())
.request(Manifest.permission.CAMERA)
.subscribe { granted: Boolean ->
if (granted) {
readyGo(ScanActivity::class.java)
} else {
showMissingPermissionDialog("拍照")
}
}
}
// wifi提速
R.id.btn_speed_fast -> {
......
......@@ -449,7 +449,7 @@ class DashboradView : View {
fun setVelocity(velocity: Int) {
if (mVelocity == velocity || velocity < mMin || velocity > mMax) {
return;
return
}
mVelocity = velocity
postInvalidate()
......
......@@ -118,7 +118,7 @@ public class ScanRectView extends View {
/**
* 设置为正方形
*/
public void setIsSquqre(boolean isSquare) {
public void setIsSquare(boolean isSquare) {
if (this.isSquare == isSquare) {
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
import android.view.WindowManager
import android.widget.TextView
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 @@
<corners android:radius="100dp" />
<solid android:color="@color/color_E1B867" />
<solid android:color="@color/color_FDEB98" />
</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 @@
<solid android:color="#FFFFFF" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="50dip" />
<corners android:radius="10dip" />
</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 @@
<com.mints.flowbox.ui.widgets.ScanRectView
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_gravity="center" />
android:layout_gravity="center"
app:scanRectLineWidth="5dp" />
<com.mints.flowbox.ui.widgets.ScanView
android:id="@+id/sv"
......@@ -20,7 +21,7 @@
android:layout_height="280dp"
android:layout_gravity="center"
android:background="#00ffffff"
app:duration="3000"
app:duration="4000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="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"?>
<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"
android:layout_width="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"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srlAccentColor="@color/gray"
app:srlPrimaryColor="@color/white">
android:layout_height="match_parent">
<com.scwang.smartrefresh.layout.header.ClassicsHeader
<View
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:background="@mipmap/bg_bonus" />
<androidx.core.widget.NestedScrollView
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never">
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_marginTop="46dp"
android:layout_marginBottom="30dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_2"
android:layout_centerHorizontal="true"
android:text="新人红包:" />
<TextView
android:id="@+id/tv_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_toEndOf="@id/tv_1"
android:text="冻结中"
android:textColor="@color/red" />
<TextView
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_1"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="连续签到14天后即可解冻200元现金红包" />
</RelativeLayout>
<TextView
android:id="@+id/tv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_2"
android:layout_centerHorizontal="true"
android:text="新人红包"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_toEndOf="@id/tv_1"
android:background="@drawable/shape_write"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="冻结中"
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
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_1"
android:layout_centerHorizontal="true"
android:background="@drawable/shape_write"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="连续签到14天后即可解冻200元现金红包"
android:textColor="@color/red" />
<com.mints.flowbox.ui.widgets.ExpandableGridView
android:id="@+id/item_promotions_egv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="16dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:columnWidth="35dp"
android:divider="@null"
android:dividerHeight="10dp"
......@@ -74,29 +87,52 @@
android:scrollbars="none"
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
android:id="@+id/recy_task"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<Button
android:id="@+id/btn_sign"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/btn_circle"
android:layout_marginTop="10dp"
android:background="@mipmap/ic_bouns_sign"
android:text="签到"
android:textColor="@color/white" />
android:textColor="@color/white"
android:textSize="18sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>
</FrameLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
</androidx.core.widget.NestedScrollView>
<?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>
This diff is collapsed.
......@@ -34,7 +34,7 @@
<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
android:id="@+id/fl_my_banner"
......@@ -45,7 +45,7 @@
android:background="@drawable/shape_bg_award"
android:visibility="gone" />
<include layout="@layout/item_divider_gray" />
<!-- <include layout="@layout/item_divider_gray" />-->
<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 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="10dp">
android:paddingTop="10dp"
>
<FrameLayout
android:id="@+id/fl_my_icon"
......@@ -17,7 +18,6 @@
android:scaleType="fitXY" />
</FrameLayout>
<TextView
android:id="@+id/tv_my_title"
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 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="2dp"
android:visibility="gone"
app:piv_count="2"
app:piv_selectedColor="@color/color_FF9837"
......
......@@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_write">
<com.mints.flowbox.ui.widgets.CountDownView
......
......@@ -10,6 +10,8 @@
<color name="color_cb4a39">#cb4a39</color>
<color name="color_0000FF">#0000FF</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_0000">#00000000</color>
<color name="color_20000000">#20000000</color>
......@@ -30,6 +32,7 @@
<color name="color_333">#333333</color>
<color name="color_4BB93F">#4BB93F</color>
<color name="color_FEB63D">#FEB63D</color>
<color name="color_FFF5E8">#FFF5E8</color>
<color name="color_FF5E5E">#FF5E5E</color>
<color name="color_172B54">#172B54</color>
<color name="color_707A8D">#707A8D</color>
......@@ -64,7 +67,11 @@
<color name="color_FAF6E8">#FAF6E8</color>
<color name="color_F3E7C5">#F3E7C5</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_994B23">#994B23</color>
<color name="color_F28335">#F28335</color>
<color name="color_F23009">#F23009</color>
</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