Commit fb03f606 authored by jyx's avatar jyx

我的,邀请页面接口对接

parent 52a3949f
...@@ -15,10 +15,14 @@ ...@@ -15,10 +15,14 @@
<uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" <uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" /> tools:ignore="ProtectedPermissions" />
<permission android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE"
<permission
android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" /> android:protectionLevel="signature" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE" /> <uses-permission android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
...@@ -108,12 +112,13 @@ ...@@ -108,12 +112,13 @@
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activitys.SettingsActivity" android:name=".ui.activitys.SettingsActivity"
android:screenOrientation="portrait"/> android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.GuideActivity"/> <activity android:name=".ui.activitys.GuideActivity" />
<activity android:name=".ui.activitys.LiebaoGameActivity"/> <activity android:name=".ui.activitys.LiebaoGameActivity" />
<activity android:name=".ui.activitys.DrawcashActivity"/> <activity android:name=".ui.activitys.DrawcashActivity" />
<activity android:name=".ui.activitys.WaterActivity"/> <activity android:name=".ui.activitys.WaterActivity" />
<activity android:name=".ui.activitys.WalkActivity"/> <activity android:name=".ui.activitys.WalkActivity" />
<activity android:name=".ui.activitys.AboutusActivity" />
<service <service
android:name=".service.UpdateService" android:name=".service.UpdateService"
......
...@@ -8,15 +8,11 @@ import android.text.TextUtils ...@@ -8,15 +8,11 @@ import android.text.TextUtils
import cn.jpush.android.api.BasicPushNotificationBuilder import cn.jpush.android.api.BasicPushNotificationBuilder
import cn.jpush.android.api.JPushInterface import cn.jpush.android.api.JPushInterface
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.LiebaoManager
import com.mints.goodmoney.manager.OaidManager import com.mints.goodmoney.manager.OaidManager
import com.mints.goodmoney.manager.ShumeiManager import com.mints.goodmoney.manager.ShumeiManager
import com.mints.library.utils.CommonUtils import com.mints.library.utils.CommonUtils
import com.mob.MobSDK import com.mob.MobSDK
import com.orhanobut.logger.AndroidLogAdapter import com.orhanobut.logger.*
import com.orhanobut.logger.FormatStrategy
import com.orhanobut.logger.Logger
import com.orhanobut.logger.PrettyFormatStrategy
import com.tendcloud.tenddata.TCAgent import com.tendcloud.tenddata.TCAgent
import com.umeng.commonsdk.UMConfigure import com.umeng.commonsdk.UMConfigure
import com.yilan.sdk.ui.YLUIInit import com.yilan.sdk.ui.YLUIInit
......
...@@ -91,6 +91,7 @@ object Constant { ...@@ -91,6 +91,7 @@ object Constant {
const val CARRIER_DAILY_TURN = "DAILY_TURN" //每日大转盘 const val CARRIER_DAILY_TURN = "DAILY_TURN" //每日大转盘
const val CARRIER_CHALLENGE_TURN = "CHALLENGE_TURN" //挑战大转盘 const val CARRIER_CHALLENGE_TURN = "CHALLENGE_TURN" //挑战大转盘
const val CARRIER_SIGNIN_HOMEPAGE_CARD = "SIGNIN_HOMEPAGE_CARD" //签到翻倍 const val CARRIER_SIGNIN_HOMEPAGE_CARD = "SIGNIN_HOMEPAGE_CARD" //签到翻倍
const val CARRIER_SIGNIN_HOMEPAGE_AWARD = "SIGNIN_HOMEPAGE_AWARD" //签到奖励
const val CARRIER_OFFLINE_DOUBLE = "OFFLINE_DOUBLE" //离线收益 const val CARRIER_OFFLINE_DOUBLE = "OFFLINE_DOUBLE" //离线收益
const val CARRIER_CHALLENGE_CARD = "CHALLENGE_CARD" //挑战刮刮乐 const val CARRIER_CHALLENGE_CARD = "CHALLENGE_CARD" //挑战刮刮乐
const val CARRIER_ONLINE_INCOME = "ONLINE_INCOME" //在线收益 const val CARRIER_ONLINE_INCOME = "ONLINE_INCOME" //在线收益
...@@ -125,9 +126,13 @@ object Constant { ...@@ -125,9 +126,13 @@ object Constant {
const val CARRIER_CHALLENGE_HEALTH_STAND = "CHALLENGE_HEALTH_STAND" //小健康-站一站 const val CARRIER_CHALLENGE_HEALTH_STAND = "CHALLENGE_HEALTH_STAND" //小健康-站一站
const val CARRIER_CHALLENGE_HEALTH_FRUIT = "CHALLENGE_HEALTH_FRUIT" //小健康-吃水果 const val CARRIER_CHALLENGE_HEALTH_FRUIT = "CHALLENGE_HEALTH_FRUIT" //小健康-吃水果
const val CARRIER_CHALLENGE_HEALTH_EYE = "CHALLENGE_HEALTH_EYE" //小健康-放松眼 const val CARRIER_CHALLENGE_HEALTH_EYE = "CHALLENGE_HEALTH_EYE" //小健康-放松眼
const val CARRIER_FRIENDS = "CARRIER_FRIENDS" //邀请好友
const val CARRIER_NEW_USER = "CARRIER_NEW_USER" //新用户5000红包 const val CARRIER_NEW_USER = "CARRIER_NEW_USER" //新用户5000红包
// 邀请好友
const val CHALLENGE_SHAREFRIEND = "CHALLENGE_SHAREFRIEND" //邀请好友
const val AD_SOURCE_LY = "LIYAN" const val AD_SOURCE_LY = "LIYAN"
const val AD_SOURCE_CSJ = "CSJ" const val AD_SOURCE_CSJ = "CSJ"
...@@ -174,4 +179,9 @@ object Constant { ...@@ -174,4 +179,9 @@ object Constant {
const val EVENT_TYPE_TIME = "TIME" const val EVENT_TYPE_TIME = "TIME"
const val EVENT_TYPE_ADCLICK = "GAME_AD_CLICK" const val EVENT_TYPE_ADCLICK = "GAME_AD_CLICK"
const val EVENT_TYPE_GAMEINFO = "GAMEINFO" const val EVENT_TYPE_GAMEINFO = "GAMEINFO"
// 热门活动类型
const val HOT_ACTIVITY_WATER = "water"
const val HOT_ACTIVITY_WALK = "walk"
const val HOT_ACTIVITY_CARD = "card"
} }
\ No newline at end of file
package com.mints.goodmoney.mvp.model;
import java.util.List;
public class FriendsTaskBean {
/**
* challenge : {"complete":0,"list":[{"button":"去邀请","rewardCoin":100,"title":"任务一","remarks":"邀请1个好友 (0/1)","status":0},{"button":"去邀请","rewardCoin":200,"title":"任务二","remarks":"邀请5个好友 (0/5)","status":0},{"button":"去邀请","rewardCoin":300,"title":"任务三","remarks":"邀请10个好友 (0/10)","status":0},{"button":"去邀请","rewardCoin":400,"title":"任务四","remarks":"邀请20个好友 (0/20)","status":0},{"button":"去邀请","rewardCoin":500,"title":"任务五","remarks":"邀请50个好友 (0/50)","status":0},{"button":"去邀请","rewardCoin":600,"title":"任务六","remarks":"邀请100个好友 (0/100)","status":0}]}
* friends : {"friendSum":1,"list":[{"head":"","rcoin":0,"nickName":"","mobile":"186****1554","ruid":2028614250701500000,"time":"10月14日","cashout":0}]}
*/
private ChallengeBean challenge;
private FriendsBean friends;
public ChallengeBean getChallenge() {
return challenge;
}
public void setChallenge(ChallengeBean challenge) {
this.challenge = challenge;
}
public FriendsBean getFriends() {
return friends;
}
public void setFriends(FriendsBean friends) {
this.friends = friends;
}
public static class ChallengeBean {
/**
* complete : 0
* list : [{"button":"去邀请","rewardCoin":100,"title":"任务一","remarks":"邀请1个好友 (0/1)","status":0},{"button":"去邀请","rewardCoin":200,"title":"任务二","remarks":"邀请5个好友 (0/5)","status":0},{"button":"去邀请","rewardCoin":300,"title":"任务三","remarks":"邀请10个好友 (0/10)","status":0},{"button":"去邀请","rewardCoin":400,"title":"任务四","remarks":"邀请20个好友 (0/20)","status":0},{"button":"去邀请","rewardCoin":500,"title":"任务五","remarks":"邀请50个好友 (0/50)","status":0},{"button":"去邀请","rewardCoin":600,"title":"任务六","remarks":"邀请100个好友 (0/100)","status":0}]
*/
private int complete;
private List<ListBean> list;
public int getComplete() {
return complete;
}
public void setComplete(int complete) {
this.complete = complete;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* button : 去邀请
* rewardCoin : 100
* title : 任务一
* remarks : 邀请1个好友 (0/1)
* status : 0
*/
private String button;
private int rewardCoin;
private String title;
private String remarks;
private int status;
public String getButton() {
return button;
}
public void setButton(String button) {
this.button = button;
}
public int getRewardCoin() {
return rewardCoin;
}
public void setRewardCoin(int rewardCoin) {
this.rewardCoin = rewardCoin;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}
}
public static class FriendsBean {
/**
* friendSum : 1
* list : [{"head":"","rcoin":0,"nickName":"","mobile":"186****1554","ruid":2028614250701500000,"time":"10月14日","cashout":0}]
*/
private int friendSum;
private List<ListBeanX> list;
public int getFriendSum() {
return friendSum;
}
public void setFriendSum(int friendSum) {
this.friendSum = friendSum;
}
public List<ListBeanX> getList() {
return list;
}
public void setList(List<ListBeanX> list) {
this.list = list;
}
public static class ListBeanX {
/**
* head :
* rcoin : 0
* nickName :
* mobile : 186****1554
* ruid : 2028614250701500000
* time : 10月14日
* cashout : 0
*/
private String head;
private int rcoin;
private String nickName;
private String mobile;
private long ruid;
private String time;
private int cashout;
public String getHead() {
return head;
}
public void setHead(String head) {
this.head = head;
}
public int getRcoin() {
return rcoin;
}
public void setRcoin(int rcoin) {
this.rcoin = rcoin;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public long getRuid() {
return ruid;
}
public void setRuid(long ruid) {
this.ruid = ruid;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public int getCashout() {
return cashout;
}
public void setCashout(int cashout) {
this.cashout = cashout;
}
}
}
}
...@@ -3,14 +3,176 @@ package com.mints.goodmoney.mvp.model; ...@@ -3,14 +3,176 @@ package com.mints.goodmoney.mvp.model;
import java.io.Serializable; import java.io.Serializable;
public class MyInfo implements Serializable { public class MyInfo implements Serializable {
private int coin;
private String idcode;
public int getCoin() { /**
return coin; * taskVeido : {"max":20,"carrierType":"CHALLENGE_VEDIO","complete":0}
* taskShareFriend : {"max":20,"carrierType":"CHALLENGE_SHAREFRIEND","complete":0}
* userMsg : {"head":"","realName":null,"surplus":0,"idcode":"20000003","nickName":"","coin":50}
*/
private TaskVeidoBean taskVeido;
private TaskShareFriendBean taskShareFriend;
private UserMsgBean userMsg;
public TaskVeidoBean getTaskVeido() {
return taskVeido;
}
public void setTaskVeido(TaskVeidoBean taskVeido) {
this.taskVeido = taskVeido;
}
public TaskShareFriendBean getTaskShareFriend() {
return taskShareFriend;
}
public void setTaskShareFriend(TaskShareFriendBean taskShareFriend) {
this.taskShareFriend = taskShareFriend;
}
public UserMsgBean getUserMsg() {
return userMsg;
}
public void setUserMsg(UserMsgBean userMsg) {
this.userMsg = userMsg;
} }
public String getIdcode() { public static class TaskVeidoBean {
return idcode; /**
* max : 20
* carrierType : CHALLENGE_VEDIO
* complete : 0
*/
private int max;
private String carrierType;
private int complete;
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
public String getCarrierType() {
return carrierType;
}
public void setCarrierType(String carrierType) {
this.carrierType = carrierType;
}
public int getComplete() {
return complete;
}
public void setComplete(int complete) {
this.complete = complete;
}
}
public static class TaskShareFriendBean {
/**
* max : 20
* carrierType : CHALLENGE_SHAREFRIEND
* complete : 0
*/
private int max;
private String carrierType;
private int complete;
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
public String getCarrierType() {
return carrierType;
}
public void setCarrierType(String carrierType) {
this.carrierType = carrierType;
}
public int getComplete() {
return complete;
}
public void setComplete(int complete) {
this.complete = complete;
}
}
public static class UserMsgBean {
/**
* head :
* realName : null
* surplus : 0
* idcode : 20000003
* nickName :
* coin : 50
*/
private String head;
private Object realName;
private int surplus;
private String idcode;
private String nickName;
private int coin;
public String getHead() {
return head;
}
public void setHead(String head) {
this.head = head;
}
public Object getRealName() {
return realName;
}
public void setRealName(Object realName) {
this.realName = realName;
}
public int getSurplus() {
return surplus;
}
public void setSurplus(int surplus) {
this.surplus = surplus;
}
public String getIdcode() {
return idcode;
}
public void setIdcode(String idcode) {
this.idcode = idcode;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public int getCoin() {
return coin;
}
public void setCoin(int coin) {
this.coin = coin;
}
} }
} }
...@@ -4,59 +4,18 @@ public class TaskBean { ...@@ -4,59 +4,18 @@ public class TaskBean {
private int imageSrc; private int imageSrc;
private String title; private String title;
private String coin; private String progressStr;
private int coinSrc;
private String info;
private String btnStr; private String btnStr;
private Boolean isNeedTimer = false;
private int time;
private int type; private int type;
public TaskBean(int imageSrc, String title, String coin, int coinSrc, String info, String btnStr, Boolean isNeedTimer, int time, int type) { public TaskBean(int imageSrc, String title, String progressStr, String btnStr, int type) {
this.imageSrc = imageSrc; this.imageSrc = imageSrc;
this.title = title; this.title = title;
this.coin = coin; this.progressStr = progressStr;
this.coinSrc = coinSrc;
this.info = info;
this.btnStr = btnStr; this.btnStr = btnStr;
this.isNeedTimer = isNeedTimer;
this.time = time;
this.type = type; 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() { public int getImageSrc() {
return imageSrc; return imageSrc;
} }
...@@ -73,28 +32,12 @@ public class TaskBean { ...@@ -73,28 +32,12 @@ public class TaskBean {
this.title = title; this.title = title;
} }
public String getCoin() { public String getProgressStr() {
return coin; return progressStr;
}
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) { public void setProgressStr(String progressStr) {
this.info = info; this.progressStr = progressStr;
} }
public String getBtnStr() { public String getBtnStr() {
...@@ -104,4 +47,12 @@ public class TaskBean { ...@@ -104,4 +47,12 @@ public class TaskBean {
public void setBtnStr(String btnStr) { public void setBtnStr(String btnStr) {
this.btnStr = btnStr; this.btnStr = btnStr;
} }
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
} }
package com.mints.goodmoney.mvp.presenters
import com.mints.goodmoney.manager.AppHttpManager
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.model.FriendsTaskBean
import com.mints.goodmoney.mvp.views.FriendsView
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
class FriendsPresenter : BasePresenter<FriendsView>() {
/**
* 世界人民排名
*/
fun getLeaders() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.leaders, object : BaseSubscriber<BaseResponse< FriendsTaskBean.FriendsBean>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
}
override fun onNext(baseResponse: BaseResponse< FriendsTaskBean.FriendsBean>) {
if (isLinkView) return
when (baseResponse.status) {
200 -> view.getWorldRank(baseResponse.data)
}
}
})
}
/**
* 好友任务
*/
fun getFriendsMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.friendsMsg, object : BaseSubscriber<BaseResponse<FriendsTaskBean>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
}
override fun onNext(baseResponse: BaseResponse<FriendsTaskBean>) {
if (isLinkView) return
when (baseResponse.status) {
200 -> {
view.getFriendsRank(baseResponse.data)
}
}
}
})
}
}
\ No newline at end of file
...@@ -9,6 +9,7 @@ import com.mints.goodmoney.manager.UserManager ...@@ -9,6 +9,7 @@ import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.* import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.views.MyView import com.mints.goodmoney.mvp.views.MyView
import com.mints.goodmoney.utils.DeviceUuidFactory import com.mints.goodmoney.utils.DeviceUuidFactory
import com.mints.goodmoney.utils.LogUtil
import com.mints.library.net.neterror.BaseSubscriber import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable import com.mints.library.net.neterror.Throwable
import net.grandcentrix.tray.AppPreferences import net.grandcentrix.tray.AppPreferences
...@@ -20,10 +21,11 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -20,10 +21,11 @@ class MyPresenter : BasePresenter<MyView>() {
* 获取签到内容 * 获取签到内容
*/ */
open fun getSignInHomePageMsg() { open fun getSignInHomePageMsg() {
// view.showLoading("加载中..."); // view.showLoading("加载中...");
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.signInHomePageMsg, .call(loanService.signInHomePageMsg,
object : BaseSubscriber<BaseResponse<SignCardBean?>?>() { object : BaseSubscriber<BaseResponse<SignCardBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -35,12 +37,13 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -35,12 +37,13 @@ class MyPresenter : BasePresenter<MyView>() {
view.showToast(e.message) view.showToast(e.message)
} }
fun onNext(baseResponse: BaseResponse<SignCardBean?>) { override fun onNext(baseResponse: BaseResponse<SignCardBean>) {
if (isLinkView) return if (isLinkView) return
val code = baseResponse.getStatus() val code = baseResponse.status
val message = baseResponse.getMessage() val message = baseResponse.message
when (code) { when (code) {
200 -> view.getSignInHomePageMsgSuc(baseResponse.getData()) 200 -> view.getSignInHomePageMsgSuc(baseResponse.data)
401 -> { 401 -> {
} }
else -> view.showToast(message) else -> view.showToast(message)
...@@ -56,7 +59,7 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -56,7 +59,7 @@ class MyPresenter : BasePresenter<MyView>() {
view.showLoading("加载中...") view.showLoading("加载中...")
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.signInHomePage(), .call(loanService.signInHomePage(),
object : BaseSubscriber<BaseResponse<Any?>?>() { object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -68,7 +71,7 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -68,7 +71,7 @@ class MyPresenter : BasePresenter<MyView>() {
view.showToast(e.message) view.showToast(e.message)
} }
fun onNext(baseResponse: BaseResponse<Any?>) { override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return if (isLinkView) return
val code = baseResponse.status val code = baseResponse.status
val message = baseResponse.message val message = baseResponse.message
...@@ -79,13 +82,9 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -79,13 +82,9 @@ class MyPresenter : BasePresenter<MyView>() {
}) })
} }
/** fun getUserHallBaseMsg() {
* isCall -- true 连续调用
* 获取用户配置信息
*/
fun getUserTaskMsg(isCall: Boolean) {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.myInfoMsg, object : BaseSubscriber<BaseResponse<MyInfo>>() { .call(loanService.userHallBaseMsg, object : BaseSubscriber<BaseResponse<MyInfo>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) if (isLinkView)
...@@ -101,11 +100,7 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -101,11 +100,7 @@ class MyPresenter : BasePresenter<MyView>() {
val message: String = baseResponse.getMessage() val message: String = baseResponse.getMessage()
when (code) { when (code) {
200 -> { 200 -> {
if (isCall) { view.getUserTaskMsgSuc(baseResponse.getData())
view.getUserTaskMsgSuc(baseResponse.getData())
} else {
view.getUserTaskMsgSuc(baseResponse.getData())
}
myHotActivity() myHotActivity()
} }
401 -> view.getUserTaskMsgFail() 401 -> view.getUserTaskMsgFail()
...@@ -148,7 +143,7 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -148,7 +143,7 @@ class MyPresenter : BasePresenter<MyView>() {
override fun onNext(baseResponse: BaseResponse<BannerBean?>) { override fun onNext(baseResponse: BaseResponse<BannerBean?>) {
if (isLinkView) return if (isLinkView) return
val data: BannerBean? = baseResponse.getData() val data: BannerBean? = baseResponse.data
if (data != null) { if (data != null) {
view.getMyHotActivitySuc(data) view.getMyHotActivitySuc(data)
} }
...@@ -208,7 +203,7 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -208,7 +203,7 @@ class MyPresenter : BasePresenter<MyView>() {
} }
vo["androidid"] = deviceInfo.getAndroidId(null) vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI vo["imei"] = deviceInfo.iMEI
vo["oaid"] = ps.getString(Constant.OAID,"")!! vo["oaid"] = ps.getString(Constant.OAID, "")!!
vo["os"] = "android" vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid vo["uuid"] = DeviceUuidFactory().deviceUuid
...@@ -234,11 +229,38 @@ class MyPresenter : BasePresenter<MyView>() { ...@@ -234,11 +229,38 @@ class MyPresenter : BasePresenter<MyView>() {
if (isLinkView) return if (isLinkView) return
val code = baseResponse.status val code = baseResponse.status
when (code) { when (code) {
// 200 -> baseMsg() 200 -> view.userLoginSuc()
} }
} }
}) })
} }
/**
* 设置邀请成功
*
*/
fun cmtShareStatus() {
val vo = HashMap<String, Any>()
vo["carrierType"] = Constant.CHALLENGE_SHAREFRIEND
vo["value"] = "1"
AppHttpManager.getInstance(loanApplication)
.call(loanService.setStatusInOneDayByCarrierType(vo), object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
}
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
when (baseResponse.status) {
// 200 -> baseMsg()
}
}
})
}
} }
\ No newline at end of file
package com.mints.goodmoney.mvp.views
import com.mints.goodmoney.mvp.model.FriendsTaskBean
interface FriendsView : BaseView {
fun getWorldRank(data: FriendsTaskBean.FriendsBean)
fun getFriendsRank(data: FriendsTaskBean)
}
...@@ -27,4 +27,9 @@ interface MyView : BaseView { ...@@ -27,4 +27,9 @@ interface MyView : BaseView {
* 签到成功 * 签到成功
*/ */
fun signInHomePageSuc() fun signInHomePageSuc()
/**
* 游客登录成功
*/
fun userLoginSuc()
} }
...@@ -7,6 +7,7 @@ import com.mints.goodmoney.BuildConfig; ...@@ -7,6 +7,7 @@ import com.mints.goodmoney.BuildConfig;
import com.mints.goodmoney.mvp.model.BannerBean; import com.mints.goodmoney.mvp.model.BannerBean;
import com.mints.goodmoney.mvp.model.BaseResponse; import com.mints.goodmoney.mvp.model.BaseResponse;
import com.mints.goodmoney.mvp.model.DrawcashBean; import com.mints.goodmoney.mvp.model.DrawcashBean;
import com.mints.goodmoney.mvp.model.FriendsTaskBean;
import com.mints.goodmoney.mvp.model.MyInfo; import com.mints.goodmoney.mvp.model.MyInfo;
import com.mints.goodmoney.mvp.model.SignCardBean; import com.mints.goodmoney.mvp.model.SignCardBean;
import com.mints.goodmoney.mvp.model.UserBean; import com.mints.goodmoney.mvp.model.UserBean;
...@@ -72,15 +73,15 @@ public interface LoanService { ...@@ -72,15 +73,15 @@ public interface LoanService {
* *
* @return * @return
*/ */
@POST("api/v125/myInfoMsg") @POST("api/getUserHallBaseMsg")
Observable<BaseResponse<MyInfo>> getMyInfoMsg(); Observable<BaseResponse<MyInfo>> getUserHallBaseMsg();
/** /**
* 热门活动接口 * 热门活动接口
* *
* @return * @return
*/ */
@POST("api/v125/myHotActivity") @POST("api/myHotActivity")
Observable<BaseResponse<BannerBean>> myHotActivity(@Body Map<String, Object> vo); Observable<BaseResponse<BannerBean>> myHotActivity(@Body Map<String, Object> vo);
/** /**
...@@ -99,6 +100,14 @@ public interface LoanService { ...@@ -99,6 +100,14 @@ public interface LoanService {
@POST("api/getSignInHomePageMsg") @POST("api/getSignInHomePageMsg")
Observable<BaseResponse<SignCardBean>> getSignInHomePageMsg(); Observable<BaseResponse<SignCardBean>> getSignInHomePageMsg();
/**
* 设置邀请成功
*
* @return
*/
@POST("api/setStatusInOneDayByCarrierType")
Observable<BaseResponse<Object>> setStatusInOneDayByCarrierType(@Body Map<String, Object> vo);
/** /**
* 获取验证码 * 获取验证码
* *
...@@ -120,7 +129,7 @@ public interface LoanService { ...@@ -120,7 +129,7 @@ public interface LoanService {
* *
* @return * @return
*/ */
@POST("api/v125/wechatlogin") @POST("api/wechatlogin")
Observable<BaseResponse<UserBean>> wechatlogin(@Body Map<String, Object> vo); Observable<BaseResponse<UserBean>> wechatlogin(@Body Map<String, Object> vo);
/** /**
...@@ -184,7 +193,7 @@ public interface LoanService { ...@@ -184,7 +193,7 @@ public interface LoanService {
* *
* @return * @return
*/ */
@POST("api/v125/bindingWechat") @POST("api/bindingWechat")
Observable<BaseResponse<UserBean>> bindingWechat(@Body Map<String, Object> vo); Observable<BaseResponse<UserBean>> bindingWechat(@Body Map<String, Object> vo);
/** /**
...@@ -192,9 +201,25 @@ public interface LoanService { ...@@ -192,9 +201,25 @@ public interface LoanService {
* *
* @return * @return
*/ */
@POST("api/v115/addCashoutReq") @POST("api/addCashoutReq")
Observable<BaseResponse<Object>> addCashoutReq(@Body Map<String, Object> vo); Observable<BaseResponse<Object>> addCashoutReq(@Body Map<String, Object> vo);
/**
* 世界人民排行信息
*
* @return
*/
@POST("api/getLeaders")
Observable<BaseResponse<FriendsTaskBean.FriendsBean>> getLeaders();
/**
* 好友任务信息
*
* @return
*/
@POST("api/getFriendsMsg")
Observable<BaseResponse<FriendsTaskBean>> getFriendsMsg();
/** /**
* 默认http工厂 * 默认http工厂
*/ */
......
package com.mints.goodmoney.ui.activitys
import android.os.Bundle
import android.view.View
import com.mints.goodmoney.R
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.library.utils.ConstantUtil
import kotlinx.android.synthetic.main.activity_aboutus.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:关于我们
* 作者:孟崔广
* 时间:2020/9/23 18:39
*/
class AboutusActivity : BaseActivity()
, View.OnClickListener {
override fun getContentViewLayoutID() = R.layout.activity_aboutus
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
tvAboutasVersion.text = getString(R.string.app_name) + " v" + ConstantUtil.getVersionName(context)
tv_title.text = "关于我们"
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
initListener()
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.tvAboutasService -> {
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.register_name))
bundle.putString(WebActivity.WEB_URL, Constant.REGISTER_URL)
readyGo(WebActivity::class.java, bundle)
}
R.id.tvAboutasPolicy -> {
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name))
bundle.putString(WebActivity.WEB_URL, Constant.PRIVACY_URL)
readyGo(WebActivity::class.java, bundle)
}
}
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
tvAboutasService.setOnClickListener(this)
tvAboutasPolicy.setOnClickListener(this)
}
}
...@@ -132,10 +132,10 @@ class SettingsActivity : BaseActivity(), View.OnClickListener { ...@@ -132,10 +132,10 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.item_aboutUs -> { R.id.item_aboutUs -> {
readyGo(AboutusActivity::class.java)
} }
R.id.btn_switch -> { R.id.btn_switch -> {
readyGo(LoginActivity::class.java)
} }
R.id.iv_left_icon -> { R.id.iv_left_icon -> {
onBackPressed() onBackPressed()
......
...@@ -2,13 +2,19 @@ package com.mints.goodmoney.ui.adapter ...@@ -2,13 +2,19 @@ package com.mints.goodmoney.ui.adapter
import android.content.Context import android.content.Context
import android.view.View import android.view.View
import android.widget.Button
import android.widget.TextView
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.FriendsTaskBean
class BannerTaskAdapter(context: Context) : BannerBaseAdapter<Any>(context) { class BannerTaskAdapter(context: Context) : BannerBaseAdapter<FriendsTaskBean.ChallengeBean.ListBean>(context) {
override fun getLayoutResID() = R.layout.item_bv_friends_task override fun getLayoutResID() = R.layout.item_bv_friends_task
override fun convert(convertView: View?, data: Any?) { override fun convert(convertView: View, data: FriendsTaskBean.ChallengeBean.ListBean) {
convertView.findViewById<TextView>(R.id.item_bv_friends_task_title).text = data.title
convertView.findViewById<TextView>(R.id.item_bv_friends_task_info).text = data.remarks
convertView.findViewById<Button>(R.id.item_bv_friends_task_btn).text = data.button
} }
} }
\ No newline at end of file
package com.mints.goodmoney.ui.adapter package com.mints.goodmoney.ui.adapter
import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.FriendsTaskBean
import com.mints.library.utils.GlideUtils
class InvitedAdapter(private val invitedData: List<Any>) : RecyclerView.Adapter<InvitedAdapter.InvitedHolder>() { class InvitedAdapter : RecyclerView.Adapter<InvitedAdapter.InvitedHolder> {
constructor(context: Context, invitedData: MutableList<FriendsTaskBean.FriendsBean.ListBeanX>) {
mContext = context
this.invitedData = invitedData
}
private var mContext: Context
private var invitedData: List<FriendsTaskBean.FriendsBean.ListBeanX>? = null
private var mOnItemClickListener: OnItemClickListener? = null private var mOnItemClickListener: OnItemClickListener? = null
...@@ -16,19 +28,59 @@ class InvitedAdapter(private val invitedData: List<Any>) : RecyclerView.Adapter< ...@@ -16,19 +28,59 @@ class InvitedAdapter(private val invitedData: List<Any>) : RecyclerView.Adapter<
return InvitedHolder(view) return InvitedHolder(view)
} }
override fun getItemCount() = invitedData.size override fun getItemCount(): Int {
return if (invitedData == null) {
0
} else {
invitedData!!.size
}
}
override fun onBindViewHolder(holder: InvitedHolder, position: Int) { override fun onBindViewHolder(holder: InvitedHolder, position: Int) {
when (position) {
0 -> {
holder.tvNum.visibility = View.GONE
holder.ivRanking.visibility = View.VISIBLE
holder.ivRanking.setImageResource(R.mipmap.icon_ranking_first)
}
1 -> {
holder.tvNum.visibility = View.GONE
holder.ivRanking.visibility = View.VISIBLE
holder.ivRanking.setImageResource(R.mipmap.icon_ranking_second)
}
2 -> {
holder.tvNum.visibility = View.GONE
holder.ivRanking.visibility = View.VISIBLE
holder.ivRanking.setImageResource(R.mipmap.icon_ranking_third)
}
else -> {
holder.tvNum.visibility = View.VISIBLE
holder.ivRanking.visibility = View.GONE
holder.tvNum.text = "" + position + 1
}
}
val data = invitedData!![position]
GlideUtils.loadImageViewLoding(mContext, data.head, holder.ivAvatar, R.mipmap.ic_avatar_ph, R.mipmap.ic_avatar_ph)
if (data.nickName.isNotEmpty()) {
holder.tvName.text = data.nickName
} else {
holder.tvName.text = data.mobile
}
holder.tvCoin.text = "" + data.rcoin
holder.ivAvatar
holder.itemView.setOnClickListener { holder.itemView.setOnClickListener {
mOnItemClickListener?.onItemClick(holder.itemView, position) mOnItemClickListener?.onItemClick(holder.itemView, position)
} }
} }
inner class InvitedHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { inner class InvitedHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
private val tvNum = itemView.findViewById<TextView>(R.id.item_invited_tv_num) val tvNum: TextView = itemView.findViewById(R.id.item_invited_tv_num)
private val iv = itemView.findViewById<TextView>(R.id.item_invited_iv) val ivAvatar: ImageView = itemView.findViewById(R.id.item_invited_iv_avatar)
private val tvName = itemView.findViewById<TextView>(R.id.item_invited_tv_name) val ivRanking: ImageView = itemView.findViewById(R.id.item_invite_iv_ranking)
private val tvCoin = itemView.findViewById<TextView>(R.id.item_invited_tv_coin) val tvName: TextView = itemView.findViewById(R.id.item_invited_tv_name)
val tvCoin: TextView = itemView.findViewById(R.id.item_invited_tv_coin)
} }
//define interface //define interface
......
package com.mints.goodmoney.ui.adapter package com.mints.goodmoney.ui.adapter
import android.content.Context import android.content.Context
import android.graphics.Color
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
...@@ -16,16 +17,13 @@ import com.mints.goodmoney.utils.TimeRender ...@@ -16,16 +17,13 @@ import com.mints.goodmoney.utils.TimeRender
class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> { class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
companion object { companion object {
const val HEALTH_TYPE_BREATH = 0x00000001 // 呼吸 const val TASK_TYPE_HOME = 0x00000001
const val HEALTH_TYPE_STAND = 0x00000002 // 站一站 const val TASK_TYPE_INVITE = 0x00000002
const val HEALTH_TYPE_FRUIT = 0x00000003 // 吃水果 const val TASK_TYPE_VIDEO = 0x00000003
const val HEALTH_TYPE_EYE = 0x00000004 // 放松眼睛 const val TASK_TYPE_GAME = 0x00000004
const val TASK_TYPE_VIDEO = 0x00000005 // 看视频 const val TASK_TYPE_FICTION = 0x00000005
const val TASK_TYPE_INVITE = 0x00000006 // 邀好友 const val TASK_TYPE_DEMO = 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>) { constructor(context: Context, taskData: MutableList<TaskBean>) {
...@@ -39,11 +37,6 @@ class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> { ...@@ -39,11 +37,6 @@ class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
private var mOnItemClickListener: OnItemClickListener? = null private var mOnItemClickListener: OnItemClickListener? = null
private var mOnItemChildClickListener: OnItemChildClickListener? = 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 { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
val inflater: LayoutInflater = LayoutInflater.from(mContext) val inflater: LayoutInflater = LayoutInflater.from(mContext)
return TaskHolder(inflater.inflate(R.layout.item_fragment_main_my_task, parent, false)) return TaskHolder(inflater.inflate(R.layout.item_fragment_main_my_task, parent, false))
...@@ -68,85 +61,37 @@ class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> { ...@@ -68,85 +61,37 @@ class MainMyAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder> {
mOnItemChildClickListener?.onItemChildClick(it2, position) mOnItemChildClickListener?.onItemChildClick(it2, position)
} }
holder.itemTaskTitle.text = taskBean.title holder.itemTaskTitle.text = taskBean.title
holder.itemTaskInfo.text = taskBean.info
holder.itemTaskMoney.text = taskBean.coin
val gold = mContext.resources.getDrawable(R.mipmap.ic_gold)
gold.setBounds(0, 0, 50, 50)
holder.itemTaskMoney.setCompoundDrawables(gold, null, null, null)
holder.itemTaskImg.setImageDrawable(mContext.resources.getDrawable(taskBean.imageSrc)) holder.itemTaskImg.setImageDrawable(mContext.resources.getDrawable(taskBean.imageSrc))
if (taskBean.btnStr.isNotEmpty() && !taskBean.needTimer) { if (taskBean.btnStr.isEmpty()) {
holder.itemTaskClick.text = taskBean.btnStr holder.itemTaskClick.visibility = View.GONE
} else { } else {
when (taskBean.type) { holder.itemTaskClick.visibility = View.VISIBLE
HEALTH_TYPE_BREATH -> { holder.itemTaskClick.text = taskBean.btnStr
mBreathTimer = CountDownTimerSupport(taskBean.time * COUNT_DOWN_INTERVAL, COUNT_DOWN_INTERVAL) if (taskBean.btnStr == "立即领取") {
startTime(mBreathTimer!!, HEALTH_TYPE_BREATH, holder.itemTaskClick, holder.itemTaskTitle) holder.itemTaskClick.setBackgroundResource(R.drawable.shape_btn_orange_complete)
} holder.itemTaskClick.setTextColor(Color.WHITE)
HEALTH_TYPE_EYE -> { } else {
mEyeTimer = CountDownTimerSupport(taskBean.time * COUNT_DOWN_INTERVAL, COUNT_DOWN_INTERVAL) holder.itemTaskClick.setBackgroundResource(R.drawable.shape_btn_orange)
startTime(mEyeTimer!!, HEALTH_TYPE_EYE, holder.itemTaskClick, holder.itemTaskTitle) holder.itemTaskClick.setTextColor(mContext.resources.getColor(R.color.my_color_orange))
}
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)
} }
} }
} if (taskBean.progressStr.isEmpty()) {
} holder.itemTaskProgress.visibility = View.GONE
}
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 { } else {
val replaceStr = str.replace(maxCount.toString(), currentIndex.toString()) holder.itemTaskProgress.visibility = View.VISIBLE
tvTitle.text = replaceStr holder.itemTaskProgress.text = taskBean.progressStr
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) { private inner class TaskHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val itemTaskImg: ImageView = itemView.findViewById(R.id.item_title_img) val itemTaskImg: ImageView = itemView.findViewById(R.id.item_title_img)
val itemTaskTitle: TextView = itemView.findViewById(R.id.item_task_title) val itemTaskTitle: TextView = itemView.findViewById(R.id.item_task_title)
val itemTaskMoney: TextView = itemView.findViewById(R.id.item_task_money) val itemTaskProgress: TextView = itemView.findViewById(R.id.item_task_progress)
val itemTaskInfo: TextView = itemView.findViewById(R.id.item_task_info)
val itemTaskClick: TextView = itemView.findViewById(R.id.item_task_click) val itemTaskClick: TextView = itemView.findViewById(R.id.item_task_click)
} }
......
package com.mints.goodmoney.ui.fragment package com.mints.goodmoney.ui.fragment
import android.text.TextUtils import android.graphics.Typeface
import android.view.View import android.view.View
import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.ShumeiManager
import com.mints.goodmoney.manager.UserManager import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.BannerBean import com.mints.goodmoney.mvp.model.FriendsTaskBean
import com.mints.goodmoney.ui.adapter.BannerAdapter import com.mints.goodmoney.mvp.presenters.FriendsPresenter
import com.mints.goodmoney.mvp.views.FriendsView
import com.mints.goodmoney.ui.adapter.BannerBaseAdapter import com.mints.goodmoney.ui.adapter.BannerBaseAdapter
import com.mints.goodmoney.ui.adapter.BannerTaskAdapter import com.mints.goodmoney.ui.adapter.BannerTaskAdapter
import com.mints.goodmoney.ui.adapter.InvitedAdapter import com.mints.goodmoney.ui.adapter.InvitedAdapter
import com.mints.goodmoney.ui.fragment.base.BaseFragment import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.ui.widgets.tablayout.TabLayout import com.mints.goodmoney.ui.widgets.tablayout.TabLayout
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import kotlinx.android.synthetic.main.fragment_main_friends.* import kotlinx.android.synthetic.main.fragment_main_friends.*
import kotlinx.android.synthetic.main.fragment_main_friends.srl_my
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
import com.mints.goodmoney.utils.LogUtil
/** /**
* 描述:邀请好友 * 描述:邀请好友
* 作者:孟崔广 * 作者:孟崔广
* 时间:2020/9/20 17:30 * 时间:2020/9/20 17:30
*/ */
class FriendsFragment : BaseFragment() { class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener {
private val friendsPresenter by lazy { FriendsPresenter() }
private val userManager by lazy { UserManager.getInstance() } private val userManager by lazy { UserManager.getInstance() }
private var bvTaskData: List<Any> = arrayListOf() private var bvTaskData: MutableList<FriendsTaskBean.ChallengeBean.ListBean> = mutableListOf()
private var bvBannerData: List<BannerBean.ListBean> = arrayListOf() private var invitedData: MutableList<FriendsTaskBean.FriendsBean.ListBeanX> = mutableListOf()
private var invitedData: List<Any> = arrayListOf() private var bannerTaskAdapter: BannerTaskAdapter? = null
private var invitedAdapter: InvitedAdapter? = null
override fun getContentViewLayoutID() = R.layout.fragment_main_friends override fun getContentViewLayoutID() = R.layout.fragment_main_friends
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
friendsPresenter.attachView(this)
srl_my.setOnRefreshListener(this)
initView() initView()
initRecy() initRecy()
...@@ -45,48 +53,52 @@ class FriendsFragment : BaseFragment() { ...@@ -45,48 +53,52 @@ class FriendsFragment : BaseFragment() {
private fun initView() { private fun initView() {
tv_title.text = "邀请好友" tv_title.text = "邀请好友"
view_title1.findViewById<TextView>(R.id.view_title).text = "邀好友 做任务 赚现金" view_title1.findViewById<TextView>(R.id.view_title).text = "邀好友 做任务 赚现金"
view_title2.findViewById<TextView>(R.id.view_title).text = "邀好友 赚分红 邀越多 赚越多"
} }
private fun initRecy() {
// rg.setOnCheckedChangeListener { group, checkedId ->
// when (checkedId) {
// R.id.rb_my_friends -> {
// showToast("我的好友")
// }
// R.id.rb_world_person -> {
// showToast("世界人民")
// }
// }
//
// }
private fun initRecy() {
tab_friends.addTab(tab_friends.newTab().setText("我的好友").setTag("my_friends")) tab_friends.addTab(tab_friends.newTab().setText("我的好友").setTag("my_friends"))
tab_friends.addTab(tab_friends.newTab().setText("世界人民").setTag("world_person")) tab_friends.addTab(tab_friends.newTab().setText("世界人民").setTag("world_person"))
tab_friends.setOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { tab_friends.setOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabReselected(tab: TabLayout.Tab?) { override fun onTabReselected(tab: TabLayout.Tab?) {}
}
override fun onTabUnselected(tab: TabLayout.Tab?) { override fun onTabUnselected(tab: TabLayout.Tab?) {
val title =
((tab_friends.getChildAt(0) as LinearLayout).getChildAt(tab!!.position) as LinearLayout).getChildAt(
1
) as TextView
title.apply {
// setTextAppearance(context, R.style.TabLayoutTextSize)
typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
}
} }
override fun onTabSelected(tab: TabLayout.Tab?) { override fun onTabSelected(tab: TabLayout.Tab?) {
val title =
((tab_friends.getChildAt(0) as LinearLayout).getChildAt(tab!!.position) as LinearLayout).getChildAt(
1
) as TextView
title.apply {
// setTextAppearance(context, R.style.BigTabLayoutTextStyle)
typeface = Typeface.defaultFromStyle(Typeface.BOLD)
}
tab?.let { tab?.let {
if (it.tag == "我的好友") { if (it.tag == "my_friends") {
showToast("我的好友")
} else { } else {
showToast("世界人民") friendsPresenter.getLeaders()
} }
} }
} }
}) })
// tab_friends.setOnScrollChangeListener(object :.(){})
recy_friends.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL)) recy_friends.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
val invitedAdapter = InvitedAdapter(invitedData) invitedAdapter = InvitedAdapter(mContext, invitedData)
recy_friends.adapter = invitedAdapter recy_friends.adapter = invitedAdapter
invitedAdapter.setOnItemClickListener(object : InvitedAdapter.OnItemClickListener { invitedAdapter?.setOnItemClickListener(object : InvitedAdapter.OnItemClickListener {
override fun onItemClick(view: View?, position: Int) { override fun onItemClick(view: View?, position: Int) {
} }
...@@ -95,41 +107,24 @@ class FriendsFragment : BaseFragment() { ...@@ -95,41 +107,24 @@ class FriendsFragment : BaseFragment() {
} }
private fun initBanner() { private fun initBanner() {
val bannerTaskAdapter = BannerTaskAdapter(mContext) bannerTaskAdapter = BannerTaskAdapter(mContext)
bannerTaskAdapter.setData(bvTaskData) bannerTaskAdapter?.let {
bv_friends_task.setAdapter(bannerTaskAdapter) it.setOnPageTouchListener(object : BannerBaseAdapter.OnPageTouchListener<FriendsTaskBean.ChallengeBean.ListBean> {
bannerTaskAdapter.setOnPageTouchListener(object : BannerBaseAdapter.OnPageTouchListener<Any> { override fun onPageClick(position: Int, t: FriendsTaskBean.ChallengeBean.ListBean?) {
override fun onPageClick(position: Int, t: Any?) {
}
override fun onPageDown() {
bv_friends_task.stopAutoScroll()
}
override fun onPageUp() {
bv_friends_task.startAutoScroll()
}
})
val bannerAdapter = BannerAdapter(mContext) }
bannerAdapter.setData(bvBannerData)
bv_friends_banner.setAdapter(bannerAdapter)
bannerAdapter.setOnPageTouchListener(object : BannerBaseAdapter.OnPageTouchListener<BannerBean.ListBean> {
override fun onPageClick(position: Int, t: BannerBean.ListBean?) {
}
override fun onPageDown() { override fun onPageDown() {
bv_friends_task.stopAutoScroll() bv_friends_task.stopAutoScroll()
} }
override fun onPageUp() { override fun onPageUp() {
bv_friends_task.startAutoScroll() bv_friends_task.startAutoScroll()
} }
}) })
}
bv_friends_task.setAdapter(bannerTaskAdapter)
} }
override fun onHiddenChanged(hidden: Boolean) { override fun onHiddenChanged(hidden: Boolean) {
...@@ -144,25 +139,41 @@ class FriendsFragment : BaseFragment() { ...@@ -144,25 +139,41 @@ class FriendsFragment : BaseFragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FRIENDS) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FRIENDS) {
if (!TextUtils.isEmpty(userManager?.userID)) { // if (!TextUtils.isEmpty(userManager?.userID)) {
// friendsPresenter.getFriendsMsg()
// }
} else { friendsPresenter.getFriendsMsg()
}
} }
bv_friends_banner.startAutoScroll() bv_friends_task.startAutoScroll()
bv_friends_task.stopAutoScroll()
} }
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
bv_friends_banner.startAutoScroll()
bv_friends_task.stopAutoScroll() bv_friends_task.stopAutoScroll()
} }
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
friendsPresenter.detachView()
} }
override fun onRefresh(refreshLayout: RefreshLayout) {
if (userManager.userID.isNotEmpty()) {
friendsPresenter.getFriendsMsg()
}
}
override fun getWorldRank(data: FriendsTaskBean.FriendsBean) {
invitedData.clear()
invitedData.addAll(data.list)
invitedAdapter?.notifyDataSetChanged()
}
override fun getFriendsRank(data: FriendsTaskBean) {
bvTaskData = data.challenge.list
bannerTaskAdapter?.setData(bvTaskData)
}
} }
\ No newline at end of file
...@@ -179,100 +179,100 @@ public class SignView extends LinearLayout implements View.OnClickListener { ...@@ -179,100 +179,100 @@ public class SignView extends LinearLayout implements View.OnClickListener {
*/ */
private void setContentLayoutAndBgColor(int days, int status, TextView tvContent, TextView tvDay, boolean isCurFlag) { private void setContentLayoutAndBgColor(int days, int status, TextView tvContent, TextView tvDay, boolean isCurFlag) {
Resources resources = getResources(); Resources resources = getResources();
if (UserManager.getInstance().getAdShowFlag()) { // if (UserManager.getInstance().getAdShowFlag()) {
switch (status) { switch (status) {
case 0: case 0:
if (days == 7) { if (days == 7) {
tvContent.setText(""); tvContent.setText("");
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close)); tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
} else { } else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish)); tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
} }
tvDay.setTextColor(resources.getColor(R.color.black)); tvDay.setTextColor(resources.getColor(R.color.black));
break; break;
case 1: case 1:
if (isCurFlag) { if (isCurFlag) {
tvContent.setText("");
tvContent.setTextColor(resources.getColor(R.color.graya));
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_vedio));
tvDay.setTextColor(resources.getColor(R.color.black));
tvDay.setText("可翻倍");
} else {
if (days == 7) {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open));
} else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_none));
}
tvContent.setText("");
tvContent.setTextColor(resources.getColor(R.color.graya));
tvDay.setTextColor(resources.getColor(R.color.graya));
tvDay.setText("已领");
}
break;
case 2:
if (days == 7) {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open));
} else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_none));
}
tvContent.setText(""); tvContent.setText("");
tvContent.setTextColor(resources.getColor(R.color.graya)); tvContent.setTextColor(resources.getColor(R.color.graya));
tvDay.setTextColor(resources.getColor(R.color.graya)); tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_vedio));
tvDay.setText("已领");
break;
default:
if (days == 7) {
tvContent.setText("");
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
} else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
}
tvDay.setTextColor(resources.getColor(R.color.black)); tvDay.setTextColor(resources.getColor(R.color.black));
break; tvDay.setText("可翻倍");
} } else {
} else {
switch (status) {
case 0:
if (days == 7) {
tvContent.setText("");
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
} else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
}
tvDay.setTextColor(resources.getColor(R.color.black));
break;
case 1:
case 2:
if (days == 7) { if (days == 7) {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open)); tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open));
} else { } else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_none)); tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
} }
tvContent.setText(""); tvContent.setText("");
tvContent.setTextColor(resources.getColor(R.color.graya)); tvContent.setTextColor(resources.getColor(R.color.graya));
tvDay.setTextColor(resources.getColor(R.color.graya)); tvDay.setTextColor(resources.getColor(R.color.graya));
tvDay.setText("已领"); tvDay.setText("已领");
break; }
default: break;
if (days == 7) { case 2:
tvContent.setText(""); if (days == 7) {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close)); tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open));
} else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish)); } else {
} tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
tvDay.setTextColor(resources.getColor(R.color.black)); }
break;
} tvContent.setText("");
tvContent.setTextColor(resources.getColor(R.color.graya));
tvDay.setTextColor(resources.getColor(R.color.graya));
tvDay.setText("已领");
break;
default:
if (days == 7) {
tvContent.setText("");
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
} else {
tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
}
tvDay.setTextColor(resources.getColor(R.color.black));
break;
} }
// } else {
// switch (status) {
// case 0:
// if (days == 7) {
// tvContent.setText("");
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
//
// } else {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
// }
// tvDay.setTextColor(resources.getColor(R.color.black));
// break;
// case 1:
// case 2:
// if (days == 7) {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_open));
//
// } else {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_none));
// }
//
// tvContent.setText("");
// tvContent.setTextColor(resources.getColor(R.color.graya));
// tvDay.setTextColor(resources.getColor(R.color.graya));
// tvDay.setText("已领");
// break;
// default:
// if (days == 7) {
// tvContent.setText("");
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_newgift_close));
// } else {
// tvContent.setBackground(resources.getDrawable(R.mipmap.ic_sign_finish));
// }
// tvDay.setTextColor(resources.getColor(R.color.black));
// break;
// }
// }
} }
......
<set xmlns:android="http://schemas.android.com/apk/res/android"> <set xmlns:android="http://schemas.android.com/apk/res/android">
<translate <translate
android:duration="500" android:duration="300"
android:fromYDelta="100%p" android:fromYDelta="100%p"
android:toYDelta="0" /> android:toYDelta="0" />
<alpha <alpha
android:duration="750" android:duration="500"
android:fromAlpha="0.0" android:fromAlpha="0.0"
android:toAlpha="1.0" /> android:toAlpha="1.0" />
</set> </set>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<stroke
android:width="1.5dp"
android:color="@color/my_color_orange" />
<corners android:radius="100dp" />
</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">
<gradient
android:angle="270"
android:endColor="#ffff7f2c"
android:startColor="#ffffb032"
android:type="linear"
android:useLevel="true" />
<corners android:radius="100dp" />
</shape>
\ 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="match_parent"
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<TextView
android:id="@+id/tvAboutasVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:layout_marginBottom="15dp"
android:text="@string/app_name"
android:textColor="@color/text_font"
android:textSize="13sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_launcher" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/tvAboutasService"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:padding="5dp"
android:text="@string/register_name"
android:textColor="@color/main_mints"
android:textSize="14sp" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/main_mints" />
<TextView
android:id="@+id/tvAboutasPolicy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:padding="5dp"
android:text="隐私政策"
android:textColor="@color/main_mints"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:gravity="center"
android:text="Copyright © 2020 Inc.."
android:textColor="@color/text_font"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
...@@ -25,14 +25,13 @@ ...@@ -25,14 +25,13 @@
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/white">
app:layout_behavior=".ui.widgets.FlingBehavior">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout" android:id="@+id/collapsingToolbarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"> app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -46,32 +45,41 @@ ...@@ -46,32 +45,41 @@
<com.mints.goodmoney.ui.widgets.BannerView <com.mints.goodmoney.ui.widgets.BannerView
android:id="@+id/bv_friends_task" android:id="@+id/bv_friends_task"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="120dp" android:layout_height="80dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:bannerAnimDuration="1500" app:bannerAnimDuration="1500"
app:bannerAnimScroll="true" app:bannerAnimScroll="true"
app:bannerAutoScroll="true" app:bannerAutoScroll="false"
app:bannerPageAlpha="0" app:bannerPageAlpha="0"
app:bannerPageMargin="8dp" app:bannerPageMargin="8dp"
app:bannerPagePercent="0.9" app:bannerPagePercent="0.9"
app:bannerPageScale="0.8" app:bannerPageScale="0.8"
app:bannerScrollDuration="4000" /> app:bannerScrollDuration="4000" />
<com.mints.goodmoney.ui.widgets.BannerView <include layout="@layout/item_divider_gray" />
android:id="@+id/bv_friends_banner"
<!-- <com.mints.goodmoney.ui.widgets.BannerView-->
<!-- android:id="@+id/bv_friends_banner"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="100dp"-->
<!-- app:bannerAnimDuration="1500"-->
<!-- app:bannerAnimScroll="true"-->
<!-- app:bannerAutoScroll="true"-->
<!-- app:bannerPageAlpha="0"-->
<!-- app:bannerPageMargin="8dp"-->
<!-- app:bannerPagePercent="0.9"-->
<!-- app:bannerPageScale="0.8"-->
<!-- app:bannerScrollDuration="4000" />-->
<ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="120dp" android:layout_height="wrap_content"
app:bannerAnimDuration="1500" android:padding="15dp"
app:bannerAnimScroll="true" android:scaleType="centerCrop"
app:bannerAutoScroll="true" android:src="@mipmap/bg_friends" />
app:bannerPageAlpha="0"
app:bannerPageMargin="8dp"
app:bannerPagePercent="0.9"
app:bannerPageScale="0.8"
app:bannerScrollDuration="4000" />
<include <include layout="@layout/item_divider_gray" />
android:id="@+id/view_title2"
layout="@layout/view_title" />
</LinearLayout> </LinearLayout>
...@@ -83,29 +91,25 @@ ...@@ -83,29 +91,25 @@
android:layout_height="56dp" android:layout_height="56dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
app:indicatorEndColor="#e73820" app:indicatorEndColor="#e73820"
app:indicatorMarginBottom="3dp" app:indicatorMarginEnd="20dp"
app:indicatorMarginEnd="22dp" app:indicatorMarginStart="20dp"
app:indicatorMarginStart="22dp"
app:indicatorStartColor="#d6694e" app:indicatorStartColor="#d6694e"
app:tabIndicatorHeight="4dp" app:tabIndicatorHeight="4dp"
app:tabMode="scrollable" /> app:tabMode="scrollable"
app:tabSelectedTextColor="@color/my_color_orange"
app:tabTextAppearance="@style/TabLayoutTextSize"
app:tabTextColor="@color/main_bg_text" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_friends"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fillViewport="true" android:layout_marginStart="15dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> android:layout_marginEnd="15dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
<androidx.recyclerview.widget.RecyclerView app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:id="@+id/recy_friends"
android:layout_width="match_parent"
android:layout_height="1000dp"
android:background="@color/blue"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:overScrollMode="never"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
......
...@@ -2,13 +2,16 @@ ...@@ -2,13 +2,16 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:padding="10dp">
<ImageView <ImageView
android:id="@+id/item_bv_friends_task_iv" android:id="@+id/item_bv_friends_task_iv"
android:layout_width="60dp" android:layout_width="50dp"
android:layout_height="60dp" android:layout_height="50dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:src="@mipmap/ic_friends_task"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -18,7 +21,11 @@ ...@@ -18,7 +21,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:text="任务1" android:text="任务1"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/item_bv_friends_task_iv" app:layout_constraintStart_toEndOf="@id/item_bv_friends_task_iv"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -27,16 +34,20 @@ ...@@ -27,16 +34,20 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginBottom="10dp"
android:text="邀请1名好友" android:text="邀请1名好友"
android:textColor="@color/main_bg_text"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/item_bv_friends_task_iv" /> app:layout_constraintStart_toEndOf="@id/item_bv_friends_task_iv" />
<Button <Button
android:id="@+id/item_bv_friends_task_btn" android:id="@+id/item_bv_friends_task_btn"
android:layout_width="wrap_content" android:layout_width="70dp"
android:layout_height="wrap_content" android:layout_height="30dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_btn_orange"
android:text="去邀请" android:text="去邀请"
android:textColor="@color/my_color_orange"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
......
...@@ -6,28 +6,30 @@ ...@@ -6,28 +6,30 @@
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:background="@mipmap/bg_sign" android:background="@mipmap/bg_sign"
android:gravity="center_vertical"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/item_clock_sign" android:id="@+id/item_clock_sign"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
android:src="@mipmap/ic_sign_icon" android:src="@mipmap/ic_sign_icon" />
android:visibility="visible" />
<TextView <TextView
android:id="@+id/item_clock_signday" android:id="@+id/item_clock_signday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:textColor="@color/black"
android:layout_marginStart="16pt" /> android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
...@@ -36,7 +38,6 @@ ...@@ -36,7 +38,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" android:layout_marginRight="20dp" />
android:visibility="visible" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="60dp"
android:orientation="horizontal" android:orientation="horizontal">
android:paddingStart="10dp"
android:paddingEnd="10dp">
<ImageView <ImageView
android:id="@+id/item_title_img" android:id="@+id/item_title_img"
android:layout_width="60dp" android:layout_width="26dp"
android:layout_height="60dp" android:layout_height="26dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical" />
android:src="@mipmap/ic_versus_drinkone" />
<LinearLayout <RelativeLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_weight="1" android:layout_weight="1">
android:gravity="center_vertical"
android:orientation="vertical">
<RelativeLayout <TextView
android:id="@+id/item_task_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="6dp"> android:layout_centerVertical="true"
android:layout_marginBottom="6dp"
<TextView android:text="首次喝水打卡"
android:id="@+id/item_task_title" android:textColor="@color/black"
android:layout_width="wrap_content" android:textSize="16sp" />
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 <TextView
android:id="@+id/item_task_info" android:id="@+id/item_task_progress"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="喝水还能赚金币,健康挣钱两不误" android:layout_centerVertical="true"
android:textColor="@color/graya" android:layout_marginStart="10dp"
android:textSize="12sp" /> android:layout_toEndOf="@+id/item_task_title"
</LinearLayout> android:gravity="center_vertical"
android:text="1000"
android:textColor="@color/black"
android:textSize="16sp" />
</RelativeLayout>
<TextView <TextView
android:id="@+id/item_task_click" android:id="@+id/item_task_click"
android:layout_width="90dp" android:layout_width="80dp"
android:layout_height="30dp" android:layout_height="32dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:background="@drawable/shape_main_water" android:background="@drawable/shape_btn_orange"
android:gravity="center" android:gravity="center"
android:text="立即领取" android:text="立即领取"
android:textColor="@color/white" android:textColor="@color/my_color_orange"
android:textSize="12sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -46,18 +46,20 @@ ...@@ -46,18 +46,20 @@
android:id="@+id/item_title_invitecode" android:id="@+id/item_title_invitecode"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/black" android:layout_gravity="center_vertical"
android:textColor="@color/loan_tv_choose_paycash"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/item_title_invitecode_copy" android:id="@+id/item_title_invitecode_copy"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:background="@drawable/shape_tv_gold_gury" android:background="@drawable/shape_tv_gold_gury"
android:paddingLeft="12dp" android:paddingLeft="10dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:paddingRight="12dp" android:paddingRight="10dp"
android:paddingBottom="2dp" android:paddingBottom="2dp"
android:text="复制" android:text="复制"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -70,7 +72,7 @@ ...@@ -70,7 +72,7 @@
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:padding="10dp" android:padding="12dp"
android:src="@mipmap/ic_arrow_more" /> android:src="@mipmap/ic_arrow_more" />
</LinearLayout> </LinearLayout>
...@@ -85,12 +87,12 @@ ...@@ -85,12 +87,12 @@
android:elevation="2dip" android:elevation="2dip"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="10dp" android:paddingStart="15dp"
android:paddingEnd="10dp"> android:paddingEnd="15dp">
<ImageView <ImageView
android:layout_width="30dp" android:layout_width="32dp"
android:layout_height="30dp" android:layout_height="32dp"
android:src="@mipmap/ic_gold" /> android:src="@mipmap/ic_gold" />
<TextView <TextView
...@@ -108,14 +110,13 @@ ...@@ -108,14 +110,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:text="5434344"
android:textColor="@color/my_color_orange" android:textColor="@color/my_color_orange"
android:textSize="26sp" /> android:textSize="30sp" />
<Button <Button
android:id="@+id/btn_withdraw" android:id="@+id/btn_withdraw"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="30dp" android:layout_height="32dp"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:background="@drawable/shape_btn_switch" android:background="@drawable/shape_btn_switch"
android:text="提现" android:text="提现"
......
...@@ -2,24 +2,23 @@ ...@@ -2,24 +2,23 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="4dp" android:orientation="vertical"
android:paddingBottom="6dp" android:paddingTop="10dp">
android:orientation="vertical">
<ImageView <ImageView
android:id="@+id/ic_my_icon" android:id="@+id/ic_my_icon"
android:layout_width="38dp" android:layout_width="38dp"
android:scaleType="fitXY"
android:layout_height="38dp" android:layout_height="38dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:scaleType="fitXY"
android:src="@mipmap/ic_my_gury" /> android:src="@mipmap/ic_my_gury" />
<TextView <TextView
android:id="@+id/tv_my_title" android:id="@+id/tv_my_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:textColor="@color/product_net_text" android:layout_marginTop="10dp"
android:textSize="12sp" /> android:textColor="@color/color_555"
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="50dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/item_invite_iv_ranking"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="3dp"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/item_invited_tv_num" android:id="@+id/item_invited_tv_num"
...@@ -12,22 +20,34 @@ ...@@ -12,22 +20,34 @@
android:text="1" /> android:text="1" />
<ImageView <ImageView
android:id="@+id/item_invited_iv" android:id="@+id/item_invited_iv_avatar"
android:layout_width="60dp" android:layout_width="30dp"
android:layout_height="60dp" /> android:layout_height="30dp"
android:layout_marginStart="10dp" />
<TextView <TextView
android:layout_weight="1"
android:id="@+id/item_invited_tv_name" android:id="@+id/item_invited_tv_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="我的好友" /> android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="我的好友"
android:textColor="@color/black_text"
android:textSize="16sp" />
<TextView <TextView
android:id="@+id/item_invited_tv_coin" android:id="@+id/item_invited_tv_coin"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="99999999金币" /> android:text="999999"
android:textColor="@color/my_color_orange"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="金币"
android:textColor="@color/my_color_orange"
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" android:layout_height="1dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="14dp" android:layout_marginStart="14dp"
android:layout_marginTop="-7dp" android:layout_marginTop="-7dp"
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
android:id="@+id/ll_sign_firstday" android:id="@+id/ll_sign_firstday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_first" android:id="@+id/tv_sign_first"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/font_size_14" /> android:textSize="@dimen/font_size_14" />
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
android:id="@+id/tv_sign_firstday" android:id="@+id/tv_sign_firstday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="1天" android:text="1天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -47,14 +48,14 @@ ...@@ -47,14 +48,14 @@
android:id="@+id/ll_sign_twoday" android:id="@+id/ll_sign_twoday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_two" android:id="@+id/tv_sign_two"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/font_size_14" /> android:textSize="@dimen/font_size_14" />
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
android:id="@+id/tv_sign_twoday" android:id="@+id/tv_sign_twoday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="2天" android:text="2天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -73,14 +75,14 @@ ...@@ -73,14 +75,14 @@
android:id="@+id/ll_sign_threeday" android:id="@+id/ll_sign_threeday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_three" android:id="@+id/tv_sign_three"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/font_size_14" /> android:textSize="@dimen/font_size_14" />
...@@ -89,6 +91,7 @@ ...@@ -89,6 +91,7 @@
android:id="@+id/tv_sign_threeday" android:id="@+id/tv_sign_threeday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="3天" android:text="3天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -99,14 +102,14 @@ ...@@ -99,14 +102,14 @@
android:id="@+id/ll_sign_fourday" android:id="@+id/ll_sign_fourday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_four" android:id="@+id/tv_sign_four"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/font_size_14" /> android:textSize="@dimen/font_size_14" />
...@@ -115,6 +118,7 @@ ...@@ -115,6 +118,7 @@
android:id="@+id/tv_sign_fourday" android:id="@+id/tv_sign_fourday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="4天" android:text="4天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -125,14 +129,14 @@ ...@@ -125,14 +129,14 @@
android:id="@+id/ll_sign_fiveday" android:id="@+id/ll_sign_fiveday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_five" android:id="@+id/tv_sign_five"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/font_size_14" /> android:textSize="@dimen/font_size_14" />
...@@ -141,6 +145,7 @@ ...@@ -141,6 +145,7 @@
android:id="@+id/tv_sign_fiveday" android:id="@+id/tv_sign_fiveday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="5天" android:text="5天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -151,14 +156,14 @@ ...@@ -151,14 +156,14 @@
android:id="@+id/ll_sign_sixday" android:id="@+id/ll_sign_sixday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_six" android:id="@+id/tv_sign_six"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/font_size_14" /> android:textSize="@dimen/font_size_14" />
...@@ -167,6 +172,7 @@ ...@@ -167,6 +172,7 @@
android:id="@+id/tv_sign_sixday" android:id="@+id/tv_sign_sixday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="6天" android:text="6天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
...@@ -177,14 +183,14 @@ ...@@ -177,14 +183,14 @@
android:id="@+id/ll_sign_sevenday" android:id="@+id/ll_sign_sevenday"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_sign_seven" android:id="@+id/tv_sign_seven"
android:layout_width="25dp" android:layout_width="30dp"
android:layout_height="25dp" android:layout_height="30dp"
android:gravity="center" android:gravity="center"
android:text="78" android:text="78"
android:textColor="@color/white" android:textColor="@color/white"
...@@ -194,6 +200,7 @@ ...@@ -194,6 +200,7 @@
android:id="@+id/tv_sign_sevenday" android:id="@+id/tv_sign_sevenday"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="7天" android:text="7天"
android:textColor="@color/main_bg_text" android:textColor="@color/main_bg_text"
......
...@@ -153,6 +153,7 @@ ...@@ -153,6 +153,7 @@
<color name="my_color_orange">#FB560C</color> <color name="my_color_orange">#FB560C</color>
<color name="color_999">#999999</color> <color name="color_999">#999999</color>
<color name="color_555">#555555</color>
<color name="color_F5F">#F5F5F5</color> <color name="color_F5F">#F5F5F5</color>
<color name="color_F8F">#F8F8F8</color> <color name="color_F8F">#F8F8F8</color>
<color name="color_D81B60">#D81B60</color> <color name="color_D81B60">#D81B60</color>
......
...@@ -118,4 +118,17 @@ ...@@ -118,4 +118,17 @@
<item name="android:textColor">#cb4a39</item> <item name="android:textColor">#cb4a39</item>
<item name="android:fontFamily">sans-serif-condensed</item> <item name="android:fontFamily">sans-serif-condensed</item>
</style> </style>
<!--默认Tablayout字体大小-->
<style name="TabLayoutTextSize">
<item name="android:textSize">@dimen/font_size_18</item>
</style>
<!--设置Tablayout字体加粗-->
<style name="TabLayoutTextStyle">
<item name="android:textStyle">bold</item>
</style>
<!--变大Tablayout字体-->
<style name="BigTabLayoutTextStyle">
<item name="android:textSize">@dimen/font_size_20</item>
</style>
</resources> </resources>
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