Commit c1d4be40 authored by jyx's avatar jyx

添加提现记录,金币记录页面

parent 8be4c27d
......@@ -126,6 +126,8 @@
<activity android:name=".ui.activitys.WaterActivity" />
<activity android:name=".ui.activitys.WalkActivity" />
<activity android:name=".ui.activitys.EraseActivity" />
<activity android:name=".ui.activitys.DrawcashRecordActivity" />
<activity android:name=".ui.activitys.CoinRecordActivity" />
<service
android:name=".service.UpdateService"
......
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
import java.util.List;
/**
* 描述:提现记录
* 作者:孟崔广
* 时间:2019/10/29 18:42
* 邮箱:mengcga@163.com
*/
public class DrawcashRecordBean implements Serializable {
private List<RecordsBean> records;
public List<RecordsBean> getRecords() {
return records;
}
public void setRecords(List<RecordsBean> records) {
this.records = records;
}
public class RecordsBean implements Serializable {
/**
* newCash : 67.9
* cashId : 1192015331518976000
* createTime : 1573033576
* accountName : 兔兔
* updateTime : 1573033577
* oldCash : 68
* cash : 0.1
* account : 18311400069
* status : 3
*/
private double newCash;
private long cashId;
private long createTime;
private String accountName;
private String payChannel;
private long updateTime;
private double oldCash;
private double cash;
private String account;
private String errormsg;
private int status;// 0/1-支付中 2-suc 3-fail
public double getNewCash() {
return newCash;
}
public void setNewCash(double newCash) {
this.newCash = newCash;
}
public long getCashId() {
return cashId;
}
public void setCashId(long cashId) {
this.cashId = cashId;
}
public long getCreateTime() {
return createTime;
}
public void setCreateTime(int createTime) {
this.createTime = createTime;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(int updateTime) {
this.updateTime = updateTime;
}
public double getOldCash() {
return oldCash;
}
public void setOldCash(double oldCash) {
this.oldCash = oldCash;
}
public double getCash() {
return cash;
}
public void setCash(double cash) {
this.cash = cash;
}
public String getErrormsg() {
return errormsg;
}
public void setErrormsg(String errormsg) {
this.errormsg = errormsg;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getPayChannel() {
return payChannel;
}
public void setPayChannel(String payChannel) {
this.payChannel = payChannel;
}
}
}
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
import java.util.List;
/**
* 描述:金币明细
* 作者:孟崔广
* 时间:2019/10/29 18:42
* 邮箱:mengcga@163.com
*/
public class GoldRecordBean implements Serializable {
private int sumCoin;
private List<ListBean> list;
public int getSumCoin() {
return sumCoin;
}
public void setSumCoin(int sumCoin) {
this.sumCoin = sumCoin;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public class ListBean implements Serializable {
/**
* uid : 16
* type : 1
* descript : 积分兑换余额1元
* tid :
* oldCoin : 8630
* unitCoin : 100
* newCoin : 8530
* detailType : 11
* coin_id : 1931505541203900000
* createTime : 1573451653000
*/
private long uid;
private int type;
private String descript;
private String tid;
private String goldStatus;
private String goldText;
private String time;
private String day;
private boolean showDay;
private int oldCoin;
private int rewardType;
private int unitCoin;
private int newCoin;
private int detailType;
private long coin_id;
private long createTime;
public long getUid() {
return uid;
}
public int getType() {
return type;
}
public String getDescript() {
return descript;
}
public String getTid() {
return tid;
}
public String getGoldStatus() {
return goldStatus;
}
public String getGoldText() {
return goldText;
}
public int getOldCoin() {
return oldCoin;
}
public int getUnitCoin() {
return unitCoin;
}
public int getNewCoin() {
return newCoin;
}
public int getDetailType() {
return detailType;
}
public long getCoin_id() {
return coin_id;
}
public long getCreateTime() {
return createTime;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
public boolean isShowDay() {
return showDay;
}
public void setShowDay(boolean showDay) {
this.showDay = showDay;
}
public int getRewardType() {
return rewardType;
}
public void setRewardType(int rewardType) {
this.rewardType = rewardType;
}
}
}
package com.mints.goodmoney.mvp.presenters
import com.mints.goodmoney.manager.AppHttpManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.model.DrawcashBean
import com.mints.goodmoney.mvp.model.UserBean
import com.mints.goodmoney.mvp.views.SettingsView
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import java.util.*
class SettingsPresenter : BasePresenter<SettingsView>() {
/**
* 修改用户信息
*/
fun editUserMsg(wxInfo: String) {
val vo = HashMap<String, Any>()
vo["type"] = "OPENID"
vo["value"] = wxInfo
AppHttpManager.getInstance(loanApplication)
.call(loanService.bindingWechat(vo),
object : BaseSubscriber<BaseResponse<UserBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<UserBean>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
val data = baseResponse.data
if (data != null) {
UserManager.getInstance().saveUserInfo(data)
view.editUserMsgSuc()
}
}
else -> view.showToast(message)
}
}
})
}
/**
* 获取用户配置信息
*/
fun getUserTaskMsg() {
view.showLoading("加载中...")
AppHttpManager.getInstance(loanApplication)
.call(loanService.drawcashUserTaskMsg,
object : BaseSubscriber<BaseResponse<DrawcashBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<DrawcashBean>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.getUserTaskMsgSuc(baseResponse.data)
else -> view.showToast(message)
}
}
})
}
}
\ No newline at end of file
package com.mints.goodmoney.mvp.views
import com.mints.goodmoney.mvp.model.DrawcashBean
interface SettingsView : BaseView {
/**
* 修改用户信息
*/
fun editUserMsgSuc()
/**
* 获取用户配置信息成功
*/
fun getUserTaskMsgSuc(data: DrawcashBean)
}
\ No newline at end of file
......@@ -7,7 +7,9 @@ import com.mints.goodmoney.BuildConfig;
import com.mints.goodmoney.mvp.model.BannerBean;
import com.mints.goodmoney.mvp.model.BaseResponse;
import com.mints.goodmoney.mvp.model.DrawcashBean;
import com.mints.goodmoney.mvp.model.DrawcashRecordBean;
import com.mints.goodmoney.mvp.model.FriendsTaskBean;
import com.mints.goodmoney.mvp.model.GoldRecordBean;
import com.mints.goodmoney.mvp.model.MainVedioMsgBean;
import com.mints.goodmoney.mvp.model.MyInfo;
import com.mints.goodmoney.mvp.model.SignCardBean;
......@@ -230,6 +232,22 @@ public interface LoanService {
@POST("api/addCashoutReq")
Observable<BaseResponse<Object>> addCashoutReq(@Body Map<String, Object> vo);
/**
* 提现记录
*
* @return
*/
@POST("api/getCashOutRecords")
Observable<BaseResponse<DrawcashRecordBean>> getCashOutRecords();
/**
* 金币明细
*
* @return
*/
@POST("api/getCoinRecords")
Observable<BaseResponse<GoldRecordBean>> getCoinRecords();
/**
* 世界人民排行信息
*
......
package com.mints.goodmoney.ui.activitys
import android.view.View
import androidx.recyclerview.widget.DividerItemDecoration
import com.mints.goodmoney.R
import com.mints.goodmoney.manager.AppHttpManager
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.model.GoldRecordBean
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.adapter.CoinRecordAdapter
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import kotlinx.android.synthetic.main.activity_drawcash_record.*
import kotlinx.android.synthetic.main.header_layout.*
class CoinRecordActivity : BaseActivity(), View.OnClickListener, OnRefreshListener {
private var coinRecordAdapter: CoinRecordAdapter? = null
private var mCoinData: MutableList<GoldRecordBean.ListBean> = mutableListOf()
override fun getContentViewLayoutID() = R.layout.activity_drawcash_record
override fun initViewsAndEvents() {
tv_title.text = "金币记录"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
iv_left_icon.setOnClickListener(this)
srl_drawcash.setOnRefreshListener(this)
initRecy()
getData()
}
private fun getData() {
AppHttpManager.getInstance(baseApplication)
.call(baseApplication.loanService.coinRecords, object : BaseSubscriber<BaseResponse<GoldRecordBean>>() {
override fun onError(e: Throwable) {
srl_drawcash.finishRefresh(false)
}
override fun onNext(t: BaseResponse<GoldRecordBean>) {
if (t.status == 200) {
srl_drawcash.finishRefresh(true)
mCoinData.clear()
mCoinData.addAll(t.data.list)
coinRecordAdapter?.notifyDataSetChanged()
} else {
srl_drawcash.finishRefresh(false)
}
}
})
}
private fun initRecy() {
recy_drawcash.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
coinRecordAdapter = CoinRecordAdapter(this, mCoinData)
recy_drawcash.adapter = coinRecordAdapter
}
override fun isApplyKitKatTranslucency() = false
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> finish()
}
}
override fun onRefresh(refreshLayout: RefreshLayout) {
getData()
}
}
\ No newline at end of file
......@@ -17,10 +17,12 @@ import com.mints.goodmoney.mvp.presenters.DrawcashPresenter
import com.mints.goodmoney.mvp.views.DrawcashView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.adapter.DrawcashAdapter
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import com.mints.goodmoney.utils.SpanUtils
import com.mints.library.utils.json.JsonUtil
import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.header_activity.*
import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.view_title.*
import net.grandcentrix.tray.AppPreferences
import java.util.*
......@@ -30,7 +32,7 @@ import java.util.*
* 时间:2020/10/12 14:37
*/
class DrawcashActivity : BaseActivity(),
DrawcashView, View.OnClickListener, DrawcashAdapter.OnItemClickListener, OnLoginListener {
DrawcashView, View.OnClickListener, OnItemClickListener, OnLoginListener {
private val drawcashPresenter by lazy { DrawcashPresenter() }
private val ps by lazy { AppPreferences(context) }
......@@ -48,7 +50,14 @@ class DrawcashActivity : BaseActivity(),
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
tv_activity_title.text = "提现"
tv_title.text = "提现"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
tv_right_subtitle.visibility = View.VISIBLE
tv_right_subtitle.text = "提现记录"
view_title.text = "提现规则"
drawcashPresenter.attachView(this)
initText()
initListener()
......@@ -71,7 +80,25 @@ class DrawcashActivity : BaseActivity(),
override fun onClick(v: View?) {
when (v?.id) {
R.id.tv_activity_back -> finish()
R.id.iv_left_icon -> finish()
R.id.tv_right_subtitle -> {
// 是否登录
if (!userManager.userIsLogin()) {
readyGo(LoginActivity::class.java)
return
}
readyGo(DrawcashRecordActivity::class.java)
}
R.id.iv_coin -> {
// 是否登录
if (!userManager.userIsLogin()) {
readyGo(LoginActivity::class.java)
return
}
readyGo(CoinRecordActivity::class.java)
}
R.id.tvDrawcashWx -> {
if (!TextUtils.isEmpty(userConfig?.openid)) {
return
......@@ -90,7 +117,7 @@ class DrawcashActivity : BaseActivity(),
R.id.tvDrawcashNext -> {
if (priceList != null && priceList!!.size > 0) {
// 校验当前金币< 选择金币 =提示 去做任务
if (userConfig?.coin!! < priceList!![drawcashAdapter?.getPosition()].money * 10000) {
if (userConfig?.coin!! < priceList!![drawcashAdapter.getPosition()].money * 10000) {
showToast("金币不足,快去做任务吧")
return
}
......@@ -115,7 +142,7 @@ class DrawcashActivity : BaseActivity(),
return
}
drawcashPresenter.saveTerminalInfo(ps, priceList!![drawcashAdapter?.getPosition()].money)
drawcashPresenter.saveTerminalInfo(ps, priceList!![drawcashAdapter.getPosition()].money)
}
}
}
......@@ -201,12 +228,14 @@ class DrawcashActivity : BaseActivity(),
}
private fun initListener() {
tv_activity_back.setOnClickListener(this)
iv_left_icon.setOnClickListener(this)
tv_right_subtitle.setOnClickListener(this)
iv_coin.setOnClickListener(this)
tvDrawcashWx.setOnClickListener(this)
tvDrawcashNext.setOnClickListener(this)
}
override fun onItemClick(position: Int) {
override fun onItemClick(view: View?, position: Int) {
drawcashAdapter.setPosition(position)
drawcashAdapter.notifyDataSetChanged()
}
......
package com.mints.goodmoney.ui.activitys
import android.view.View
import androidx.recyclerview.widget.DividerItemDecoration
import com.mints.goodmoney.R
import com.mints.goodmoney.manager.AppHttpManager
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.model.DrawcashRecordBean
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.adapter.DrawcashRecordAdapter
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import kotlinx.android.synthetic.main.activity_drawcash_record.*
import kotlinx.android.synthetic.main.header_layout.*
class DrawcashRecordActivity : BaseActivity(), View.OnClickListener, OnRefreshListener {
private var drawcashRecordAdapter: DrawcashRecordAdapter? = null
private var mDrawcashData: MutableList<DrawcashRecordBean.RecordsBean> = mutableListOf()
override fun getContentViewLayoutID() = R.layout.activity_drawcash_record
override fun initViewsAndEvents() {
tv_title.text = "提现记录"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
iv_left_icon.setOnClickListener(this)
srl_drawcash.setOnRefreshListener(this)
initRecy()
getData()
}
private fun getData() {
AppHttpManager.getInstance(baseApplication)
.call(baseApplication.loanService.cashOutRecords, object : BaseSubscriber<BaseResponse<DrawcashRecordBean>>() {
override fun onError(e: Throwable) {
srl_drawcash.finishRefresh(false)
}
override fun onNext(t: BaseResponse<DrawcashRecordBean>) {
if (t.status == 200) {
srl_drawcash.finishRefresh(true)
mDrawcashData.clear()
mDrawcashData.addAll(t.data.records)
drawcashRecordAdapter?.notifyDataSetChanged()
} else {
srl_drawcash.finishRefresh(false)
}
}
})
}
private fun initRecy() {
recy_drawcash.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
drawcashRecordAdapter = DrawcashRecordAdapter(this, mDrawcashData)
recy_drawcash.adapter = drawcashRecordAdapter
}
override fun isApplyKitKatTranslucency() = false
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> finish()
}
}
override fun onRefresh(refreshLayout: RefreshLayout) {
getData()
}
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ import com.mints.goodmoney.mvp.model.TurntableBean
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.library.utils.json.JsonUtil
import kotlinx.android.synthetic.main.activity_erase.*
import kotlinx.android.synthetic.main.header_activity.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:刮刮乐
......@@ -35,14 +35,16 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
override fun isApplyKitKatTranslucency()=false
override fun initViewsAndEvents() {
tv_activity_title.setText("刮刮乐")
tv_title.text = "刮刮乐"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
initListener()
loadTurnUrl()
}
private fun initListener() {
tv_activity_back.setOnClickListener(this)
iv_left_icon.setOnClickListener(this)
}
override fun onDestroy() {
......@@ -66,7 +68,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
override fun onClick(v: View) {
when (v.id) {
R.id.tv_activity_back -> {
R.id.iv_left_icon -> {
androidCallJsCancel()
finish()
......
......@@ -13,6 +13,7 @@ import com.mints.goodmoney.utils.SpanUtils
import com.mints.library.utils.json.JsonUtil
import kotlinx.android.synthetic.main.activity_liebao_game.*
import kotlinx.android.synthetic.main.header_activity.*
import kotlinx.android.synthetic.main.header_layout.*
import java.util.*
/**
......@@ -40,7 +41,10 @@ class LiebaoGameActivity : BaseActivity()
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
tv_activity_title.text = "游戏推荐"
tv_title.text = "游戏推荐"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
tvGameHint.setText(SpanUtils()
.append("试玩小游戏").setForegroundColor(resources.getColor(R.color.black_text))
.append("15秒以上可获取金币").setForegroundColor(resources.getColor(R.color.red))
......@@ -66,12 +70,12 @@ class LiebaoGameActivity : BaseActivity()
override fun onClick(v: View?) {
when (v?.id) {
R.id.tv_activity_back -> finish()
R.id.iv_left_icon -> finish()
}
}
private fun initListener() {
tv_activity_back.setOnClickListener(this)
iv_left_icon.setOnClickListener(this)
gvGameLiebao.inflate(this)
// 默认游戏中心页面,点击游戏试,触发回调
......
......@@ -4,25 +4,39 @@ import android.os.Bundle
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.Window
import android.view.inputmethod.InputMethodManager
import android.widget.EditText
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import com.mints.goodmoney.R
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.login.LoginApi
import com.mints.goodmoney.login.OnLoginListener
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.DrawcashBean
import com.mints.goodmoney.mvp.model.WXInfo
import com.mints.goodmoney.mvp.presenters.SettingsPresenter
import com.mints.goodmoney.mvp.views.SettingsView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.utils.CacheUtil
import com.mints.library.utils.json.JsonUtil
import kotlinx.android.synthetic.main.activity_settings.*
import kotlinx.android.synthetic.main.header_layout.*
import java.util.HashMap
class SettingsActivity : BaseActivity(), View.OnClickListener {
class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener, SettingsView {
private val userManager by lazy { UserManager.getInstance() }
private val settingsPresenter by lazy { SettingsPresenter() }
private val loginApi by lazy { LoginApi() }
private var wxInfo: WXInfo? = null
override fun initViewsAndEvents() {
settingsPresenter.attachView(this)
initLayout()
}
......@@ -43,6 +57,10 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
}
private fun initLayout() {
if (!userManager.userIsLogin()) {
btn_switch.visibility = View.GONE
}
tv_title.text = "设置"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
......@@ -69,17 +87,17 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
item_phone.findViewById<TextView>(R.id.tv_right).text = "未绑定"
}
// item_wechat.findViewById<TextView>(R.id.tv_title).text = "微信昵称"
// val wechat = resources.getDrawable(R.mipmap.icon_settings_wechat)
// wechat.setBounds(0, 0, 56, 56)
// item_wechat.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(wechat, null, null, null)
// item_wechat.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
// item_wechat.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE
// if (userManager.wxOpenid.isNotEmpty()) {
// item_wechat.findViewById<TextView>(R.id.tv_right).text = userManager.wxName
// } else {
// item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权"
// }
item_wechat.findViewById<TextView>(R.id.tv_title).text = "微信昵称"
val wechat = resources.getDrawable(R.mipmap.icon_settings_wechat)
wechat.setBounds(0, 0, 56, 56)
item_wechat.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(wechat, null, null, null)
item_wechat.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
item_wechat.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE
if (userManager.wxOpenid.isNotEmpty()) {
item_wechat.findViewById<TextView>(R.id.tv_right).text = userManager.wxName
} else {
item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权"
}
// item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "邀请码"
// val invitedCode = resources.getDrawable(R.mipmap.icon_settings_invite)
......@@ -126,19 +144,26 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
override fun onClick(v: View?) {
when (v?.id) {
R.id.item_phone -> {
if (userManager.userIsLogin() && userManager.mobile.isEmpty()) {
if (userManager.mobile.isEmpty()) {
val bundle = Bundle()
bundle.putBoolean(Constant.LOGIN_FLAG, true)
readyGo(LoginActivity::class.java, bundle)
}
}
// R.id.item_wechat -> {
// if (userManager.userIsLogin() && userManager.wxOpenid.isEmpty()) {
// val bundle = Bundle()
// bundle.putBoolean(Constant.LOGIN_FLAG, true)
// readyGo(LoginActivity::class.java)
// }
// }
R.id.item_wechat -> {
if (userManager.wxOpenid.isEmpty()) {
val wechat = ShareSDK.getPlatform(Wechat.NAME)
if (!wechat.isClientValid) {
showToast("请先安装微信")
return
}
loginApi.setOnLoginListener(this)
loginApi.setPlatform(Wechat.NAME)
loginApi.login(this)
}
}
R.id.item_invitedCode -> {
submitInvitedCode()
}
......@@ -225,4 +250,37 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
dialog.show()
}
override fun onLogin(platform: String?, res: HashMap<String, Any>): Boolean {
try {
wxInfo = WXInfo()
wxInfo?.let {
it.setUnionid(res["unionid"].toString() + "")
it.setOpenid(res["openid"].toString() + "")
it.setProvince(res["province"].toString() + "")
it.setCity(res["city"].toString() + "")
it.setCountry(res["country"].toString() + "")
it.setHeadimgurl(res["headimgurl"].toString() + "")
it.setNickname(res["nickname"].toString() + "")
it.setSex((res["sex"].toString() + "").toInt())
}
if (!isFinishing) {
settingsPresenter.editUserMsg(JsonUtil.toJson(wxInfo))
}
} catch (e: Exception) {
e.printStackTrace()
}
return false
}
override fun editUserMsgSuc() {
showToast("微信授权成功")
settingsPresenter.getUserTaskMsg()
}
override fun getUserTaskMsgSuc(data: DrawcashBean) {
item_wechat.findViewById<TextView>(R.id.tv_right).text = data.nickName
}
}
\ No newline at end of file
package com.mints.goodmoney.ui.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.GoldRecordBean
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
class CoinRecordAdapter(context: Context, coinData: MutableList<GoldRecordBean.ListBean>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
const val HOLDER_TYPE_EMPTY = 0
const val HOLDER_TYPE_COIN = 1
}
private var mContext: Context = context
private var mCoinData: List<GoldRecordBean.ListBean> = coinData
private var mOnItemClickListener: OnItemClickListener? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (viewType == HOLDER_TYPE_EMPTY) {
val emptyView = LayoutInflater.from(mContext).inflate(R.layout.item_empty, parent, false)
return EmptyHolder(emptyView)
}
val view = LayoutInflater.from(mContext).inflate(R.layout.item_list_goldrecord, parent, false)
return ViewHolder(view)
}
override fun getItemViewType(position: Int): Int {
if (mCoinData.isEmpty()) {
return HOLDER_TYPE_EMPTY
}
return HOLDER_TYPE_COIN
}
override fun onBindViewHolder(viewHolder: RecyclerView.ViewHolder, position: Int) {
if (viewHolder is EmptyHolder) {
return
}
val holder = viewHolder as ViewHolder
val coinData = mCoinData[position]
if (coinData.isShowDay) {
holder.tv_goldrecord_date.visibility = View.VISIBLE
holder.tv_goldrecord_date.text = coinData.day
if (coinData.day.contains("今")) {
holder.tv_goldrecord_date.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null)
} else {
holder.tv_goldrecord_date.setCompoundDrawablesWithIntrinsicBounds(mContext.resources.getDrawable(R.mipmap.ic_goldrecord_time), null, null, null)
}
} else {
holder.tv_goldrecord_date.visibility = View.GONE
}
holder.tv_goldrecord_time.text = coinData.time
holder.tv_goldrecord_content.text = coinData.goldText
when (coinData.type) {
0 -> {
if (coinData.rewardType == 0) {
// 0-金币
holder.tv_goldrecord_cash_type.text = "金币"
holder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(mContext, R.color.main_mints))
} else {
holder.tv_goldrecord_cash_type.text = "钻石"
holder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(mContext, R.color.versus_task_play_text))
}
holder.tv_goldrecord_cash.text = "+" + coinData.unitCoin
}
else -> {
if (coinData.rewardType == 0) {
// 0-金币
holder.tv_goldrecord_cash_type.text = "金币"
} else {
holder.tv_goldrecord_cash_type.text = "钻石"
}
holder.tv_goldrecord_cash.text = "-" + coinData.unitCoin
holder.tv_goldrecord_cash.setTextColor(ContextCompat.getColor(mContext, R.color.loan_green))
}
}
}
override fun getItemCount(): Int {
return if (mCoinData.isEmpty()) {
1
} else {
mCoinData.size
}
}
inner class EmptyHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val tv_goldrecord_date: TextView = view.findViewById(R.id.tv_goldrecord_date)
val tv_goldrecord_time: TextView = view.findViewById(R.id.tv_goldrecord_time)
val tv_goldrecord_content: TextView = view.findViewById(R.id.tv_goldrecord_content)
val tv_goldrecord_cash: TextView = view.findViewById(R.id.tv_goldrecord_cash)
val tv_goldrecord_cash_type: TextView = view.findViewById(R.id.tv_goldrecord_cash_type)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.DrawcashBean
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import java.lang.String
class DrawcashAdapter(val priceList: MutableList<DrawcashBean.CashOutMoneyArrBean>) :
......@@ -56,7 +57,7 @@ class DrawcashAdapter(val priceList: MutableList<DrawcashBean.CashOutMoneyArrBea
holder.llDrawItem.setOnClickListener {
if (priceBean.isCanCashOut) {
holder.llDrawItem.setEnabled(true)
mOnItemClickListener.onItemClick(position)
mOnItemClickListener.onItemClick(holder.llDrawItem, position)
notifyDataSetChanged()
} else {
holder.llDrawItem.setEnabled(false)
......@@ -86,10 +87,6 @@ class DrawcashAdapter(val priceList: MutableList<DrawcashBean.CashOutMoneyArrBea
override fun getItemCount() = priceList.size
interface OnItemClickListener {
fun onItemClick(position: Int)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
......
package com.mints.goodmoney.ui.adapter
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.DrawcashRecordBean
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import com.mints.goodmoney.utils.TimeRender
import java.util.*
class DrawcashRecordAdapter(context: Context, invitedData: MutableList<DrawcashRecordBean.RecordsBean>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
const val HOLDER_TYPE_EMPTY = 0
const val HOLDER_TYPE_DRAWCASH = 1
}
private var mContext: Context = context
private var mDarwcashData: List<DrawcashRecordBean.RecordsBean> = invitedData
private var mOnItemClickListener: OnItemClickListener? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (viewType == HOLDER_TYPE_EMPTY) {
val emptyView = LayoutInflater.from(parent.context).inflate(R.layout.item_empty, parent, false)
return EmptyHolder(emptyView)
}
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_list_drawcashrecord, parent, false)
return ViewHolder(view)
}
override fun onBindViewHolder(viewHolder: RecyclerView.ViewHolder, position: Int) {
if (viewHolder is EmptyHolder) {
return
}
val holder = viewHolder as ViewHolder
val data: DrawcashRecordBean.RecordsBean = mDarwcashData[position]
holder.tv_drawcashrecord_applyno.text = "订单号:" + data.cashId
viewHolder.tv_drawcashrecord_date.text = TimeRender.formatDate(Date(data.createTime), TimeRender.DEFAULT_FORMAT_SHOW)
viewHolder.tv_drawcashrecord_money.text = "¥" + String.format("%.2f", data.cash) + "元"
// viewHolder.tv_drawcashrecord_account.setText("支付宝账户:" + data.getAccount());
if (TextUtils.equals(data.payChannel, "ALIPAY")) {
viewHolder.tv_drawcashrecord_account.text = "提现账户:支付宝"
viewHolder.tv_drawcashrecord_account.setTextColor(ContextCompat.getColor(mContext, R.color.water_color))
} else {
viewHolder.tv_drawcashrecord_account.text = "提现账户:微信"
viewHolder.tv_drawcashrecord_account.setTextColor(ContextCompat.getColor(mContext, R.color.loan_green))
}
val errormsg: String = data.errormsg
if (TextUtils.isEmpty(errormsg)) {
viewHolder.tv_drawcashrecord_fail.visibility = View.GONE
} else {
viewHolder.tv_drawcashrecord_fail.visibility = View.VISIBLE
viewHolder.tv_drawcashrecord_fail.text = "失败原因:$errormsg"
}
when (data.status) {
0, 1 -> {
viewHolder.tv_drawcashrecord_status.text = "处理中"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.text_font))
}
2 -> {
viewHolder.tv_drawcashrecord_status.text = "已提现"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.main_nor_color))
}
3 -> {
viewHolder.tv_drawcashrecord_status.text = "提现失败"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.tv_message_recente_money))
}
else -> {
viewHolder.tv_drawcashrecord_status.text = "未知"
viewHolder.tv_drawcashrecord_status.setTextColor(ContextCompat.getColor(mContext, R.color.text_font))
}
}
}
override fun getItemCount(): Int {
return if (mDarwcashData.isEmpty()) {
1
} else {
mDarwcashData.size
}
}
override fun getItemViewType(position: Int): Int {
if (mDarwcashData.isEmpty()) {
return HOLDER_TYPE_EMPTY
}
return HOLDER_TYPE_DRAWCASH
}
inner class EmptyHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val tv_drawcashrecord_applyno: TextView = view.findViewById(R.id.tv_drawcashrecord_applyno)
val tv_drawcashrecord_date: TextView = view.findViewById(R.id.tv_drawcashrecord_date)
val tv_drawcashrecord_money: TextView = view.findViewById(R.id.tv_drawcashrecord_money)
val tv_drawcashrecord_status: TextView = view.findViewById(R.id.tv_drawcashrecord_status)
val tv_drawcashrecord_account: TextView = view.findViewById(R.id.tv_drawcashrecord_account)
val tv_drawcashrecord_fail: TextView = view.findViewById(R.id.tv_drawcashrecord_fail)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.FriendsTaskBean
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import com.mints.library.utils.GlideUtils
class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.FriendsBean.ListBeanX>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
......@@ -80,14 +81,13 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.
val data = invitedData[position]
GlideUtils.loadCircleImageView(mContext, data.head, holder.ivAvatar, R.mipmap.ic_avatar_ph, R.mipmap.ic_avatar_ph)
if (data.nickName != null) {
holder.tvName.text = data.nickName
holder.tvName.text = data.nickName.substring(0, data.nickName.length - 1) + "*"
} else {
holder.tvName.text = data.mobile
}
holder.tvCoin.text = "" + data.sumCoin
holder.ivAvatar
holder.itemView.setOnClickListener {
mOnItemClickListener?.onItemClick(holder.itemView, position)
}
......@@ -103,11 +103,6 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.
val tvCoin: TextView = itemView.findViewById(R.id.item_invited_tv_coin)
}
//define interface
interface OnItemClickListener {
fun onItemClick(view: View?, position: Int)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
......
......@@ -10,8 +10,10 @@ import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.TaskBean
import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
class MainMyAdapter(context: Context, taskData: MutableList<TaskBean>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
const val TASK_TYPE_HOME = 0x00000001
......@@ -20,16 +22,10 @@ class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
const val TASK_TYPE_GAME = 0x00000004
const val TASK_TYPE_FICTION = 0x00000005
const val TASK_TYPE_DEMO = 0x00000006
}
constructor(context: Context, taskData: MutableList<TaskBean>) {
mContext = context
this.taskData = taskData
}
private var mContext: Context
private var taskData: List<TaskBean>? = null
private var mContext: Context = context
private var taskData: List<TaskBean>? = taskData
private var mOnItemClickListener: OnItemClickListener? = null
private var mOnItemChildClickListener: OnItemChildClickListener? = null
......@@ -99,19 +95,6 @@ class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
val itemTaskClick: TextView = itemView.findViewById(R.id.item_task_click)
}
//define interface
interface OnItemClickListener {
fun onItemClick(view: View?, position: Int)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
interface OnItemChildClickListener {
fun onItemChildClick(view: View?, position: Int)
}
fun setOnItemChildClickListener(listener: OnItemChildClickListener) {
mOnItemChildClickListener = listener
}
......
package com.mints.goodmoney.ui.adapter.listener
import android.view.View
interface OnItemChildClickListener {
fun onItemChildClick(view: View?, position: Int)
}
\ No newline at end of file
package com.mints.goodmoney.ui.adapter.listener
import android.view.View
//define interface
interface OnItemClickListener {
fun onItemClick(view: View?, position: Int)
}
\ No newline at end of file
......@@ -129,7 +129,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener {
})
// 滚动到边缘无阴影
bv_friends_task.overScrollMode = View.OVER_SCROLL_NEVER
bv_friends_task.viewPager.overScrollMode = View.OVER_SCROLL_NEVER
pageIndicatorView.setViewPager(bv_friends_task.viewPager)
bv_friends_task.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
......
......@@ -25,6 +25,7 @@ import com.mints.goodmoney.mvp.presenters.MyPresenter
import com.mints.goodmoney.mvp.views.MyView
import com.mints.goodmoney.ui.activitys.*
import com.mints.goodmoney.ui.adapter.MainMyAdapter
import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.utils.ImageUtil
import com.mints.goodmoney.utils.SpanUtils
......@@ -51,7 +52,7 @@ import java.util.*
* 时间:2020/6/4 17:30
*/
@SuppressLint("SetTextI18n")
class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListener, OnRefreshListener, View.OnClickListener, AdapterView.OnItemClickListener {
class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshListener, View.OnClickListener, AdapterView.OnItemClickListener {
private val ps by lazy { AppPreferences(context) }
private val myPresenter by lazy { MyPresenter() }
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:background="@color/white"
android:orientation="vertical">
<include layout="@layout/header_activity" />
<include layout="@layout/header_layout" />
<ScrollView
android:layout_width="match_parent"
......@@ -16,7 +15,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
......@@ -28,7 +27,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:drawableLeft="@mipmap/ic_draw_gold"
android:drawableStart="@mipmap/ic_draw_gold"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="我的金币"
......@@ -39,12 +38,21 @@
android:id="@+id/tvDrawcashGold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_toStartOf="@id/iv_coin"
android:gravity="center_vertical"
android:text="0"
android:textColor="@color/main_mints"
android:textSize="22sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/iv_coin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:padding="4dp"
android:src="@mipmap/ic_arrow_more" />
</RelativeLayout>
<View
......@@ -86,44 +94,13 @@
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:background="@null"
android:overScrollMode="never" />
<View
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@color/color_F8F" />
<include layout="@layout/item_divider_gray" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="15dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="12dp"
android:background="@drawable/shape_main" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="提现规则"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#E1E1E1" />
<include layout="@layout/view_title" />
<TextView
android:id="@+id/tvDrawcashExplain"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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">
<include layout="@layout/header_layout" />
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srl_drawcash"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srlAccentColor="@color/gray"
app:srlPrimaryColor="@color/white">
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_drawcash"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
\ No newline at end of file
......@@ -5,7 +5,7 @@
android:background="@color/my_color_gray2"
android:orientation="vertical">
<include layout="@layout/header_activity" />
<include layout="@layout/header_layout" />
<com.github.lzyzsd.jsbridge.BridgeWebView
android:id="@+id/blEarseWebview"
......
......@@ -6,7 +6,7 @@
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/header_activity" />
<include layout="@layout/header_layout" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
......
......@@ -12,8 +12,7 @@
<include
android:id="@+id/item_wechat"
layout="@layout/item_settings"
android:visibility="gone" />
layout="@layout/item_settings" />
<include
android:id="@+id/item_invitedCode"
......
......@@ -37,6 +37,18 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_right_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textColor="@color/product_net_text"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
......
......@@ -7,8 +7,7 @@
android:id="@+id/iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="200dp"
android:layout_gravity="center"
android:src="@mipmap/ic_record_empty" />
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_drawcashrecord_applyno"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:text="单号"
android:textColor="@color/text_font"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<View
android:layout_width="3dp"
android:layout_height="10dp"
android:layout_gravity="center_vertical"
android:background="@color/tv_loan_bg" />
<TextView
android:id="@+id/tv_drawcashrecord_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:text="2020-10-19"
android:textColor="@color/text_font"
android:textSize="12sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="1dp"
android:layout_marginRight="15dp">
<TextView
android:id="@+id/tv_drawcashrecord_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="¥ 50"
android:textColor="@color/text_font"
android:textSize="26sp" />
<TextView
android:id="@+id/tv_drawcashrecord_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:text="未知"
android:textSize="14sp" />
</RelativeLayout>
<TextView
android:id="@+id/tv_drawcashrecord_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="2pt"
android:layout_marginBottom="15dp"
android:text="提现账户"
android:textColor="@color/main_nor_color"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_drawcashrecord_fail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="15dp"
android:textColor="@color/red"
android:textSize="12sp"
android:visibility="gone" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_goldrecord_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:drawablePadding="10pt"
android:gravity="center_vertical"
android:text="今日"
android:textColor="@color/versus_task_play_text"
android:textSize="18sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_goldrecord_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="12:12:32"
android:textColor="@color/black"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_goldrecord_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="12:12:32"
android:textColor="@color/black"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_goldrecord_cash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="7dp"
android:text="0"
android:textColor="@color/main_mints"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_goldrecord_cash_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="金币"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ 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