Commit 70821062 authored by jyx's avatar jyx

我的页面UI样式开发

parent 8ebbd2f0
......@@ -57,4 +57,6 @@ object Constant {
const val FRAGMENT_CLICK_FRIENDS = 2
const val FRAGMENT_CLICK_MY = 3
var AD_SOURCE_CSJ = "CSJ"
}
\ No newline at end of file
......@@ -51,6 +51,11 @@ public class UserManager {
private static final String CREATE_TIME = "CREATE_TIME";
/**
* 广告隐藏标识
*/
private static final String AD_SHOW_FLAG = "ad_show_flag";
public static UserManager getInstance() {
if (_inst != null) {
......@@ -216,6 +221,21 @@ public class UserManager {
ps.put(CREATE_TIME, createTime);
}
public void setAdShowFlag(boolean adShowFlag) {
if (ps == null) {
return;
}
ps.put(AD_SHOW_FLAG, adShowFlag);
}
public boolean getAdShowFlag() {
if (ps == null) {
return false;
}
return ps.getBoolean(AD_SHOW_FLAG, false);
}
public void userLogout() {
if (ps != null) {
ps.remove(USER_ID);
......
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
public class MyInfo implements Serializable {
private int coin;
private String idcode;
public int getCoin() {
return coin;
}
public String getIdcode() {
return idcode;
}
}
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
import java.util.List;
/**
* 签到打卡bean
*/
public class SignCardBean implements Serializable {
/**
* nowDate : 1
* list : [{"date":"2019-12-25","d":1,"status":1,"coin":"5"},{"date":"2019-12-26","d":2,"status":0,"coin":"5"},{"date":"2019-12-27","d":3,"status":0,"coin":"5"},{"date":"2019-12-28","d":4,"status":0,"coin":"5"},{"date":"2019-12-29","d":5,"status":0,"coin":"5"},{"date":"2019-12-30","d":6,"status":0,"coin":"5"},{"date":"2019-12-31","d":7,"status":0,"coin":"5"}]
*/
private int nowDate;
private List<ListBean> list;
public int getNowDate() {
return nowDate;
}
public void setNowDate(int nowDate) {
this.nowDate = nowDate;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public class ListBean implements Serializable {
/**
* date : 2019-12-25
* d : 1
* status : 1
* coin : 5
*/
private String date;
private int d;
private int status;
private int coin;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public int getD() {
return d;
}
public void setD(int d) {
this.d = d;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getCoin() {
return coin;
}
public void setCoin(int coin) {
this.coin = coin;
}
}
}
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
/**
* 描述:签到实体
* 作者:孟崔广
* 时间:2019/12/23 16:12
* 邮箱:mengcga@163.com
*/
public class SignViewBean implements Serializable {
private int firstStatus;//0-未签到 1-已签到 2-已签到且看了视频
private int twoStatus;
private int threeStatus;
private int fourStatus;
private int fiveStatus;
private int sixStatus;
private int sevenStatus;
public int getFirstStatus() {
return firstStatus;
}
public void setFirstStatus(int firstStatus) {
this.firstStatus = firstStatus;
}
public int getTwoStatus() {
return twoStatus;
}
public void setTwoStatus(int twoStatus) {
this.twoStatus = twoStatus;
}
public int getThreeStatus() {
return threeStatus;
}
public void setThreeStatus(int threeStatus) {
this.threeStatus = threeStatus;
}
public int getFourStatus() {
return fourStatus;
}
public void setFourStatus(int fourStatus) {
this.fourStatus = fourStatus;
}
public int getFiveStatus() {
return fiveStatus;
}
public void setFiveStatus(int fiveStatus) {
this.fiveStatus = fiveStatus;
}
public int getSixStatus() {
return sixStatus;
}
public void setSixStatus(int sixStatus) {
this.sixStatus = sixStatus;
}
public int getSevenStatus() {
return sevenStatus;
}
public void setSevenStatus(int sevenStatus) {
this.sevenStatus = sevenStatus;
}
}
package com.mints.goodmoney.mvp.model;
public class TaskBean {
private int imageSrc;
private String title;
private String coin;
private int coinSrc;
private String info;
private String btnStr;
private Boolean isNeedTimer = false;
private int time;
private int type;
public TaskBean(int imageSrc, String title, String coin, int coinSrc, String info, String btnStr, Boolean isNeedTimer, int time, int type) {
this.imageSrc = imageSrc;
this.title = title;
this.coin = coin;
this.coinSrc = coinSrc;
this.info = info;
this.btnStr = btnStr;
this.isNeedTimer = isNeedTimer;
this.time = time;
this.type = type;
}
public TaskBean(int imageSrc, String title, String coin, int coinSrc, String info, String btnStr) {
this.imageSrc = imageSrc;
this.title = title;
this.coin = coin;
this.coinSrc = coinSrc;
this.info = info;
this.btnStr = btnStr;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Boolean getNeedTimer() {
return isNeedTimer;
}
public void setNeedTimer(Boolean needTimer) {
isNeedTimer = needTimer;
}
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}
public int getImageSrc() {
return imageSrc;
}
public void setImageSrc(int imageSrc) {
this.imageSrc = imageSrc;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCoin() {
return coin;
}
public void setCoin(String coin) {
this.coin = coin;
}
public int getCoinSrc() {
return coinSrc;
}
public void setCoinSrc(int coinSrc) {
this.coinSrc = coinSrc;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
public String getBtnStr() {
return btnStr;
}
public void setBtnStr(String btnStr) {
this.btnStr = btnStr;
}
}
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
public class UserVersusBean implements Serializable {
// Complete 0-未完成 1-完成 2-领取
private int challenge_vedio1_vedio_coin;
private int challenge_firsthomegame_complete;
private int challenge_wechat_coin;
private int challenge_firstwater_coin;
private int challenge_vedio1_maxcount;
private int challenge_notice_complete;
private int challenge_download1_maxcount;
private int challenge_firstwater_complete;
private int challenge_notice_coin;
private int csj_vedio_complatecount;
private int cardOrderType;
private int challenge_firstcashout_coin;
private int sys_task_time_interval;
private int challenge_mobile_complete;
private int csj_vedio_needcount;
private int challenge_firstcashout_complete;
private int challenge_idcode_coin;
private int challenge_vedio1_complatecount;
private int challenge_download1_complatecount;
private int challenge_mobile_coin;
private int challenge_vedio1_download_coin;
private int challenge_wechat_complete;
private int challenge_idcode_complete;
private int challenge_firsthomegame_coin;
private int challenge_download1_vedio_coin;
private int challenge_download1_download_coin;
private int turnOrderType;
private int gameChallengePlaytimesLevelOneCoin;
private int gameChallengePlaytimesLevelOneMinTimes;
private int gameChallengePlaytimesLevelOneStatus;
private int coinRate = 10000;
// 移动积分兑换
private boolean mobileCoinExchangeEnable; //true/false 是否展示积分兑换功能
private int mobileCoinExchangeStatus; //状态:0兑换未完成,1兑换完成未领取奖励
private int mobileCoinExchangeCompleteReward; //奖励积分
private String mobileCoinExchangeUrl; //状态为0时进入兑换url
private int firstGiveFriendCoin;// 好友金币
// 每日喝水
private int challenge_watercomplete_maxcount;
private int challenge_watercomplete_complatecount;
private int challenge_watercomplete_coin;
private int waterComplete;
// 每日分享
private int challenge_sharefriend_coin;
private int challenge_sharefriend_status;
private int challenge_sharefriend_complatecount;
private int challenge_sharefriend_maxcount;
private int challenge_health_breath_maxcount;
private int challenge_health_breath_coin;
private int challenge_health_breath_complatecount;
private int timelimit_challenge_health_breath;
private int challenge_health_eye_maxcount;
private int challenge_health_eye_coin;
private int challenge_health_eye_complatecount;
private int timelimit_challenge_health_eye;
private int challenge_health_fruit_maxcount;
private int challenge_health_fruit_coin;
private int challenge_health_fruit_complatecount;
private int timelimit_challenge_health_fruit;
private int challenge_health_stand_maxcount;
private int challenge_health_stand_coin;
private int challenge_health_stand_complatecount;
private int timelimit_challenge_health_stand;
private String ywhzCoin;
private boolean ywhzShow;
public int getChallenge_vedio1_vedio_coin() {
return challenge_vedio1_vedio_coin;
}
public int getChallenge_firsthomegame_complete() {
return challenge_firsthomegame_complete;
}
public int getChallenge_wechat_coin() {
return challenge_wechat_coin;
}
public int getChallenge_firstwater_coin() {
return challenge_firstwater_coin;
}
public int getChallenge_vedio1_maxcount() {
return challenge_vedio1_maxcount;
}
public int getChallenge_notice_complete() {
return challenge_notice_complete;
}
public int getChallenge_download1_maxcount() {
return challenge_download1_maxcount;
}
public int getChallenge_firstwater_complete() {
return challenge_firstwater_complete;
}
public int getChallenge_notice_coin() {
return challenge_notice_coin;
}
public int getCsj_vedio_complatecount() {
return csj_vedio_complatecount;
}
public int getCardOrderType() {
return cardOrderType;
}
public int getChallenge_firstcashout_coin() {
return challenge_firstcashout_coin;
}
public int getSys_task_time_interval() {
return sys_task_time_interval;
}
public int getChallenge_mobile_complete() {
return challenge_mobile_complete;
}
public int getCsj_vedio_needcount() {
return csj_vedio_needcount;
}
public int getChallenge_firstcashout_complete() {
return challenge_firstcashout_complete;
}
public int getChallenge_idcode_coin() {
return challenge_idcode_coin;
}
public int getChallenge_vedio1_complatecount() {
return challenge_vedio1_complatecount;
}
public int getChallenge_download1_complatecount() {
return challenge_download1_complatecount;
}
public int getChallenge_mobile_coin() {
return challenge_mobile_coin;
}
public int getChallenge_vedio1_download_coin() {
return challenge_vedio1_download_coin;
}
public int getChallenge_wechat_complete() {
return challenge_wechat_complete;
}
public int getChallenge_idcode_complete() {
return challenge_idcode_complete;
}
public int getChallenge_firsthomegame_coin() {
return challenge_firsthomegame_coin;
}
public int getChallenge_download1_vedio_coin() {
return challenge_download1_vedio_coin;
}
public int getChallenge_download1_download_coin() {
return challenge_download1_download_coin;
}
public int getTurnOrderType() {
return turnOrderType;
}
public int getGameChallengePlaytimesLevelOneCoin() {
return gameChallengePlaytimesLevelOneCoin;
}
public int getGameChallengePlaytimesLevelOneMinTimes() {
return gameChallengePlaytimesLevelOneMinTimes;
}
public int getGameChallengePlaytimesLevelOneStatus() {
return gameChallengePlaytimesLevelOneStatus;
}
public int getCoinRate() {
return coinRate;
}
public boolean isMobileCoinExchangeEnable() {
return mobileCoinExchangeEnable;
}
public int getMobileCoinExchangeStatus() {
return mobileCoinExchangeStatus;
}
public int getMobileCoinExchangeCompleteReward() {
return mobileCoinExchangeCompleteReward;
}
public String getMobileCoinExchangeUrl() {
return mobileCoinExchangeUrl;
}
public int getFirstGiveFriendCoin() {
return firstGiveFriendCoin;
}
public int getChallenge_watercomplete_maxcount() {
return challenge_watercomplete_maxcount;
}
public int getChallenge_watercomplete_complatecount() {
return challenge_watercomplete_complatecount;
}
public int getChallenge_watercomplete_coin() {
return challenge_watercomplete_coin;
}
public int getWaterComplete() {
return waterComplete;
}
public int getChallenge_sharefriend_coin() {
return challenge_sharefriend_coin;
}
public int getChallenge_sharefriend_status() {
return challenge_sharefriend_status;
}
public int getChallenge_sharefriend_complatecount() {
return challenge_sharefriend_complatecount;
}
public int getChallenge_sharefriend_maxcount() {
return challenge_sharefriend_maxcount;
}
public int getChallenge_health_breath_maxcount() {
return challenge_health_breath_maxcount;
}
public int getChallenge_health_breath_coin() {
return challenge_health_breath_coin;
}
public int getChallenge_health_breath_complatecount() {
return challenge_health_breath_complatecount;
}
public int getTimelimit_challenge_health_breath() {
return timelimit_challenge_health_breath;
}
public int getChallenge_health_eye_maxcount() {
return challenge_health_eye_maxcount;
}
public int getChallenge_health_eye_coin() {
return challenge_health_eye_coin;
}
public int getChallenge_health_eye_complatecount() {
return challenge_health_eye_complatecount;
}
public int getTimelimit_challenge_health_eye() {
return timelimit_challenge_health_eye;
}
public int getChallenge_health_fruit_maxcount() {
return challenge_health_fruit_maxcount;
}
public int getChallenge_health_fruit_coin() {
return challenge_health_fruit_coin;
}
public int getChallenge_health_fruit_complatecount() {
return challenge_health_fruit_complatecount;
}
public int getTimelimit_challenge_health_fruit() {
return timelimit_challenge_health_fruit;
}
public int getChallenge_health_stand_maxcount() {
return challenge_health_stand_maxcount;
}
public int getChallenge_health_stand_coin() {
return challenge_health_stand_coin;
}
public int getChallenge_health_stand_complatecount() {
return challenge_health_stand_complatecount;
}
public int getTimelimit_challenge_health_stand() {
return timelimit_challenge_health_stand;
}
public String getYwhzCoin() {
return ywhzCoin;
}
public boolean isYwhzShow() {
return ywhzShow;
}
}
......@@ -2,19 +2,158 @@ package com.mints.goodmoney.mvp.presenters
import android.content.Context
import android.text.TextUtils
import com.mints.goodmoney.R
import com.mints.goodmoney.common.DeviceInfo
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.UserBean
import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.views.MyView
import com.mints.goodmoney.utils.DeviceUuidFactory
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import java.util.*
class MyPresenter : BasePresenter<MyView>() {
/**
* 获取签到内容
*/
open fun getSignInHomePageMsg(): Unit {
// view.showLoading("加载中...");
AppHttpManager.getInstance(loanApplication)
.call(loanService.signInHomePageMsg,
object : BaseSubscriber<BaseResponse<SignCardBean?>?>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
fun onNext(baseResponse: BaseResponse<SignCardBean?>) {
if (isLinkView) return
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
when (code) {
200 -> view.getSignInHomePageMsgSuc(baseResponse.getData())
401 -> {
}
else -> view.showToast(message)
}
}
})
}
/**
* 签到
*/
fun signInHomePage() {
view.showLoading("加载中...")
AppHttpManager.getInstance(loanApplication)
.call(loanService.signInHomePage(),
object : BaseSubscriber<BaseResponse<Any?>?>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
fun onNext(baseResponse: BaseResponse<Any?>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.signInHomePageSuc()
}
}
})
}
/**
* isCall -- true 连续调用
* 获取用户配置信息
*/
fun getUserTaskMsg(isCall: Boolean) {
AppHttpManager.getInstance(loanApplication)
.call(loanService.myInfoMsg, object : BaseSubscriber<BaseResponse<MyInfo>>() {
override fun onCompleted() {
if (isLinkView)
return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<MyInfo>) {
if (isLinkView) return
val code: Int = baseResponse.getStatus()
val message: String = baseResponse.getMessage()
when (code) {
200 -> {
if (isCall) {
view.getUserTaskMsgSuc(baseResponse.getData())
} else {
view.getUserTaskMsgSuc(baseResponse.getData())
}
myHotActivity()
}
401 -> view.getUserTaskMsgFail()
else -> {
view.getUserTaskMsgFail()
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e!!.message)
view.getUserTaskMsgFail()
}
})
}
/**
* 热门活动接口
*/
private fun myHotActivity() {
val vo = HashMap<String, Any>()
vo["os"] = "android"
vo["isShowYwhzGame"] = true
AppHttpManager.getInstance(loanApplication)
.call(loanService.myHotActivity(vo),
object : BaseSubscriber<BaseResponse<BannerBean?>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
}
override fun onNext(baseResponse: BaseResponse<BannerBean?>) {
if (isLinkView) return
val data: BannerBean? = baseResponse.getData()
if (data != null) {
view.getMyHotActivitySuc(data)
}
}
})
}
/**
* 游客登录
*/
......
package com.mints.goodmoney.mvp.views
import com.mints.goodmoney.mvp.model.UserBean
import com.mints.goodmoney.mvp.model.BannerBean
import com.mints.goodmoney.mvp.model.MyInfo
import com.mints.goodmoney.mvp.model.SignCardBean
interface MyView : BaseView {
fun getMyInfoSuc(data: UserBean)
/**
* 获取用户配置信息成功
*/
fun getUserTaskMsgSuc(data: MyInfo?)
/**
* 获取用户配置信息失败
*/
fun getUserTaskMsgFail()
fun getMyHotActivitySuc(data: BannerBean?)
/**
* 获取签到信息成功
*/
fun getSignInHomePageMsgSuc(signBean: SignCardBean?)
/**
* 签到成功
*/
fun signInHomePageSuc()
}
......@@ -4,7 +4,10 @@ import android.content.Context;
import android.text.TextUtils;
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.MyInfo;
import com.mints.goodmoney.mvp.model.SignCardBean;
import com.mints.goodmoney.mvp.model.UserBean;
import com.mints.goodmoney.mvp.model.Version;
import com.mints.goodmoney.utils.AESUtils;
......@@ -61,6 +64,38 @@ public interface LoanService {
@POST("api/saveTerminalInfo")
Observable<BaseResponse<Object>> saveTerminalInfo(@Body Map<String, Object> vo);
/**
* 我的界面信息
*
* @return
*/
@POST("api/v125/myInfoMsg")
Observable<BaseResponse<MyInfo>> getMyInfoMsg();
/**
* 热门活动接口
*
* @return
*/
@POST("api/v125/myHotActivity")
Observable<BaseResponse<BannerBean>> myHotActivity(@Body Map<String, Object> vo);
/**
* 签到
*
* @return
*/
@POST("api/signInHomePage")
Observable<BaseResponse<Object>> signInHomePage();
/**
* 签到信息
*
* @return
*/
@POST("api/getSignInHomePageMsg")
Observable<BaseResponse<SignCardBean>> getSignInHomePageMsg();
/**
* 默认http工厂
*/
......
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.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.mints.goodmoney.R;
import com.mints.goodmoney.mvp.model.BannerBean;
import com.mints.library.utils.GlideUtils;
import java.util.List;
/**
* 描述:我的界面
* 作者:孟崔广
* 时间:2019/10/28 19:21
* 邮箱:mengcga@163.com
*/
public class GvMyAdapter extends BaseAdapter {
private List<BannerBean.ListBean> orders;
private Context context;
public GvMyAdapter(Context context, List<BannerBean.ListBean> orders) {
this.orders = orders;
this.context = context;
}
@Override
public int getCount() {
return orders == null ? 0 : orders.size();
}
@Override
public Object getItem(int position) {
return orders.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
LayoutInflater inflater = LayoutInflater.from(context);
convertView = inflater.inflate(R.layout.item_list_my, null);
viewHolder = new ViewHolder();
viewHolder.ic_my_icon = (ImageView) convertView.findViewById(R.id.ic_my_icon);
viewHolder.tv_my_title = (TextView) convertView.findViewById(R.id.tv_my_title);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
BannerBean.ListBean data = orders.get(position);
if (data != null) {
GlideUtils.loadImageViewLoding(context, data.getImgUrl(), viewHolder.ic_my_icon, R.mipmap.ic_my_gury, R.mipmap.ic_my_gury);
viewHolder.tv_my_title.setText(data.getTitle());
}
return convertView;
}
class ViewHolder {
public ImageView ic_my_icon;
public TextView tv_my_title;
}
}
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.ImageView
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.widgets.countdowntimer.CountDownTimerSupport
import com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.mints.goodmoney.utils.TimeRender
class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
companion object {
const val HEALTH_TYPE_BREATH = 0x00000001 // 呼吸
const val HEALTH_TYPE_STAND = 0x00000002 // 站一站
const val HEALTH_TYPE_FRUIT = 0x00000003 // 吃水果
const val HEALTH_TYPE_EYE = 0x00000004 // 放松眼睛
const val TASK_TYPE_VIDEO = 0x00000005 // 看视频
const val TASK_TYPE_INVITE = 0x00000006 // 邀好友
const val TASK_TYPE_GAME = 0x00000007 // 玩游戏
const val TASK_TYPE_FICTION = 0x00000007 // 看小说
const val COUNT_DOWN_INTERVAL = 1000L
}
constructor(context: Context, taskData: MutableList<TaskBean>) {
mContext = context
this.taskData = taskData
}
private var mContext: Context
private var taskData: List<TaskBean>? = null
private var mOnItemClickListener: OnItemClickListener? = null
private var mOnItemChildClickListener: OnItemChildClickListener? = null
private var mBreathTimer: CountDownTimerSupport? = null
private var mStandTimer: CountDownTimerSupport? = null
private var mFruitTimer: CountDownTimerSupport? = null
private var mEyeTimer: CountDownTimerSupport? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
val inflater: LayoutInflater = LayoutInflater.from(mContext)
return TaskHolder(inflater.inflate(R.layout.item_fragment_main_my_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 = taskBean.title
holder.itemTaskInfo.text = taskBean.info
holder.itemTaskMoney.text = taskBean.coin
holder.itemTaskMoney.setCompoundDrawables(mContext.resources.getDrawable(R.mipmap.ic_gold), null, null, null)
holder.itemTaskImg.setImageDrawable(mContext.resources.getDrawable(taskBean.imageSrc))
if (taskBean.btnStr.isNotEmpty() && !taskBean.needTimer) {
holder.itemTaskClick.text = taskBean.btnStr
} else {
when (taskBean.type) {
HEALTH_TYPE_BREATH -> {
mBreathTimer = CountDownTimerSupport(taskBean.time * COUNT_DOWN_INTERVAL, COUNT_DOWN_INTERVAL)
startTime(mBreathTimer!!, HEALTH_TYPE_BREATH, holder.itemTaskClick, holder.itemTaskTitle)
}
HEALTH_TYPE_EYE -> {
mEyeTimer = CountDownTimerSupport(taskBean.time * COUNT_DOWN_INTERVAL, COUNT_DOWN_INTERVAL)
startTime(mEyeTimer!!, HEALTH_TYPE_EYE, holder.itemTaskClick, holder.itemTaskTitle)
}
HEALTH_TYPE_FRUIT -> {
mFruitTimer = CountDownTimerSupport(taskBean.time * COUNT_DOWN_INTERVAL, COUNT_DOWN_INTERVAL)
startTime(mFruitTimer!!, HEALTH_TYPE_FRUIT, holder.itemTaskClick, holder.itemTaskTitle)
}
HEALTH_TYPE_STAND -> {
mStandTimer = CountDownTimerSupport(taskBean.time * COUNT_DOWN_INTERVAL, COUNT_DOWN_INTERVAL)
startTime(mStandTimer!!, HEALTH_TYPE_STAND, holder.itemTaskClick, holder.itemTaskTitle)
}
}
}
when (taskBean.btnStr) {
"立即领取" -> {
holder.itemTaskClick.background = mContext.resources.getDrawable(R.drawable.shape_tv_gold)
}
"去完成" -> {
holder.itemTaskClick.background = mContext.resources.getDrawable(R.drawable.shape_main_water)
}
else -> {
holder.itemTaskClick.background = mContext.resources.getDrawable(R.drawable.shape_tv_gold_gury)
}
}
}
}
}
private fun startTime(timer: CountDownTimerSupport, type: Int, tvClick: TextView, tvTitle: TextView) {
timer.setOnCountDownTimerListener(object : OnCountDownTimerListener {
override fun onFinish() {
val str = tvTitle.text.toString()
var currentIndex = str.substring(str.indexOf("(") + 1, str.indexOf("(") + 2).toInt()
val maxCount = str.substring(str.indexOf(")") - 1, str.indexOf(")")).toInt()
if (currentIndex < maxCount) {
val replaceStr = str.replace(currentIndex.toString(), (currentIndex + 1).toString())
tvTitle.text = replaceStr
tvClick.text = "立即领取"
tvClick.background = mContext.resources.getDrawable(R.drawable.shape_tv_gold)
} else {
val replaceStr = str.replace(maxCount.toString(), currentIndex.toString())
tvTitle.text = replaceStr
tvClick.text = "已完成"
tvClick.background = mContext.resources.getDrawable(R.drawable.shape_tv_gold_gury)
}
}
override fun onTick(millisUntilFinished: Long) {
tvClick.text = TimeRender.ms2HMS(millisUntilFinished.toInt())
}
})
timer.start()
}
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 itemTaskMoney: TextView = itemView.findViewById(R.id.item_task_money)
val itemTaskInfo: TextView = itemView.findViewById(R.id.item_task_info)
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
}
}
\ 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/main_water_btn" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="40dip" />
</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="#FFFFFF" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="8dip" />
</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/loan_year_color" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="14dip" />
</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">
<!-- 弧形的半径 -->
<corners android:radius="20dip" />
<!-- 渐变色 -->
<gradient
android:centerColor="#fffd9a2a"
android:endColor="#fffd8d26"
android:startColor="#fffece38" />
</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/grayc" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="20dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/srl_my"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
android:layout_height="match_parent"
app:srlAccentColor="@color/gray"
app:srlPrimaryColor="@color/white">
<ScrollView
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fadingEdge="none"
android:overScrollMode="never">
android:layout_height="wrap_content" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/item_fragment_main_my_title" />
<include layout="@layout/item_fragment_main_my_clock" />
<include layout="@layout/item_fragment_main_my_promotions" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_my"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<include layout="@layout/item_fragment_main_my_bottom" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
\ 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="100dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingTop="20dp"
android:paddingBottom="20dp">
<TextView
android:id="@+id/item_bottom_tel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="客服电话:4000000000" />
<TextView
android:id="@+id/item_bottom_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="v1.0.0" />
</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="300dp"
android:background="@mipmap/bg_versus_top"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_gravity="center_horizontal"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:background="@mipmap/bg_versus_sign">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="100dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/item_clock_sign"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@mipmap/ic_versus_sign_icon"
android:visibility="visible" />
<TextView
android:id="@+id/item_clock_signday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="16pt" />
</LinearLayout>
<com.mints.goodmoney.ui.widgets.SignView
android:id="@+id/item_clock_signview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:visibility="visible" />
</RelativeLayout>
</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:id="@+id/ll_my_hot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_my_about_write"
android:elevation="2dip"
android:orientation="vertical"
android:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="热门活动"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<com.mints.goodmoney.ui.widgets.ExpandableGridView
android:id="@+id/item_promotions_egv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="16dp"
android:columnWidth="80dp"
android:divider="@null"
android:dividerHeight="10dp"
android:elevation="6dip"
android:listSelector="@color/full_transparent"
android:numColumns="4"
android:scrollbars="none"
android:stretchMode="spacingWidthUniform" />
</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="100dp"
android:orientation="horizontal"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<ImageView
android:id="@+id/item_title_img"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_vertical"
android:src="@mipmap/ic_versus_drinkone" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp">
<TextView
android:id="@+id/item_task_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginBottom="6dp"
android:text="首次喝水打卡"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:id="@+id/item_task_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@+id/item_task_title"
android:drawableStart="@mipmap/ic_gold"
android:drawablePadding="2dp"
android:gravity="center_vertical"
android:text="1000"
android:textColor="@color/main_mints"
android:textSize="12sp" />
</RelativeLayout>
<TextView
android:id="@+id/item_task_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="喝水还能赚金币,健康挣钱两不误"
android:textColor="@color/graya"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/item_task_click"
android:layout_width="90dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:background="@drawable/shape_main_water"
android:gravity="center"
android:text="立即领取"
android:textColor="@color/white"
android:textSize="12sp" />
</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="260dp"
android:background="@mipmap/bg_my_top"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="个人中心"
android:textColor="@color/white"
android:textSize="18sp" />
<ImageView
android:id="@+id/item_title_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:src="@mipmap/ic_my_account" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:paddingStart="20dp">
<com.mints.goodmoney.ui.widgets.CircleImageView
android:id="@+id/item_title_avatar"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@mipmap/ic_launcher" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/item_title_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="未登录"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:orientation="horizontal">
<TextView
android:id="@+id/item_title_invitecode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="14sp" />
<TextView
android:id="@+id/item_title_invitecode_copy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@drawable/shape_tv_gold_gury"
android:paddingLeft="12dp"
android:paddingTop="2dp"
android:paddingRight="12dp"
android:paddingBottom="2dp"
android:text="复制"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<TextView
android:id="@+id/item_title_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:paddingLeft="38dp"
android:paddingTop="8dp"
android:paddingRight="38dp"
android:paddingBottom="8dp"
android:text="去登录"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/shape_my_about_write"
android:elevation="2dip"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/item_title_gold"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:layout_marginTop="20dp"
android:text="金币兑换"
android:textColor="@color/product_text"
android:textSize="14sp" />
<TextView
android:id="@+id/item_title_gold_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="0.00"
android:textColor="@color/main_mints"
android:textSize="26sp" />
</FrameLayout>
</LinearLayout>
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_marginTop="26dp"
android:layout_marginBottom="26dp"
android:background="@color/line_color" />
<LinearLayout
android:id="@+id/item_title_cash"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:layout_marginTop="20dp"
android:text="零钱"
android:textColor="@color/product_text"
android:textSize="14sp" />
<TextView
android:id="@+id/item_title_cash_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="0.00"
android:textColor="@color/main_mints"
android:textSize="26sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="48dp"
android:layout_marginTop="10dp"
android:background="@drawable/shape_my_red"
android:paddingLeft="10dp"
android:paddingTop="2dp"
android:paddingRight="10dp"
android:paddingBottom="2dp"
android:text="提现"
android:textColor="@color/white"
android:textSize="12sp" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
</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="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:paddingBottom="6dp"
android:orientation="vertical">
<ImageView
android:id="@+id/ic_my_icon"
android:layout_width="38dp"
android:scaleType="fitXY"
android:layout_height="38dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_my_gury" />
<TextView
android:id="@+id/tv_my_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_gravity="center_horizontal"
android:textColor="@color/product_net_text"
android:textSize="12sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="10pt"
android:layout_gravity="center_vertical"
android:layout_marginLeft="54pt"
android:layout_marginTop="-14pt"
android:layout_marginRight="54pt"
android:background="@color/order_hint_color" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_sign_firstday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_first"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_firstday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="1天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_twoday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_two"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_twoday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="2天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_threeday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_three"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_threeday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="3天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_fourday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_four"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_fourday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="4天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_fiveday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_five"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_fiveday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="5天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_sixday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_six"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_sixday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="6天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_sign_sevenday"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_sign_seven"
android:layout_width="50pt"
android:layout_height="50pt"
android:gravity="center"
android:text="78"
android:textColor="@color/white"
android:textSize="@dimen/font_size_12" />
<TextView
android:id="@+id/tv_sign_sevenday"
android:layout_width="wrap_content"
android:layout_height="30pt"
android:gravity="center_vertical"
android:text="7天"
android:textColor="@color/black"
android:textSize="@dimen/font_size_10" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
\ 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