Commit bca0c164 authored by jyx's avatar jyx

资料页添加相册功能

parent cf052242
......@@ -39,9 +39,9 @@ android {
XG_ACCESS_ID : TX_XG_ACCESS_ID,
XG_ACCESS_KEY : TX_XG_ACCESS_KEY,
"VIVO_APPKEY": " ",
"VIVO_APPID" : " ",
"HONOR_APPID": " "
"VIVO_APPKEY" : " ",
"VIVO_APPID" : " ",
"HONOR_APPID" : " "
]
}
......@@ -326,6 +326,8 @@ dependencies {
// 权限
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
implementation 'com.hyman:flowlayout-lib:1.1.2'
// view模糊
implementation 'com.github.centerzx:ShapeBlurView:1.0.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
......
......@@ -127,6 +127,8 @@ public class CashException {
ex.setMessage(resultException.message);
return ex;
} else {
LogUtil.d("XXXXXXXXXX");
LogUtil.d(e.getMessage());
ex = new Throwable(e, ERROR.UNKNOWN);
ex.setMessage("系统异常,请退出app重新打开");
return ex;
......
package com.duben.roseplaylet.manager
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.text.method.ScrollingMovementMethod
......@@ -11,10 +12,15 @@ import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.WXInfo
import com.duben.roseplaylet.ui.activitys.IMActivity
import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.ToastUtil
import com.duben.roseplaylet.utils.UcropUtils
import com.google.gson.JsonObject
import com.tencent.imsdk.v2.V2TIMConversation
import com.tencent.qcloud.tuicore.TUIConfig
import com.tencent.qcloud.tuicore.TUIConstants
import com.tencent.qcloud.tuicore.interfaces.TUICallback
import com.tencent.qcloud.tuikit.timcommon.config.classicui.TUIConfigClassic
import com.tencent.qcloud.tuikit.tuichat.config.classicui.TUIChatConfigClassic
import com.tencent.qcloud.tuikit.tuiconversation.config.classicui.TUIConversationConfigClassic
......@@ -31,7 +37,8 @@ class IMHelper private constructor() {
customSet()
}
private var SECRET_KEY = ""
private var SECRET_KEY =
"eJw1Tl0LgjAU-S97Dru3bW4TegjpQTJMFKnHwlW3sqZJBNF-b2S9HDifnBcr0yKwT0edZZFELQBg9BUftmMRmwTABn6vz1vnqGYRhj4UGgFycKi21572NBQkoEAPXAAqHxT8P0AH7*vZqcwdv2mdqcqslys4lvl812zSZNzGra5iCZesXxQymf6KPTX*HCoeGuRGwfsDyCExtw__"
companion object {
const val IM_SDK_APPID = 1600069405
......@@ -56,6 +63,8 @@ class IMHelper private constructor() {
if (baseResponse.status == 200) {
val psw = baseResponse.data["pass"].asString
SECRET_KEY = psw
loginIm()
}
}
})
......@@ -78,8 +87,8 @@ class IMHelper private constructor() {
TUIConversationConfigClassic.setShowCellUnreadCount(true)
//开启消息已读回执
TUIChatConfigClassic.setMessageReadReceiptNeeded(true)
//开启消息已读回执 -旗舰版能用
// TUIChatConfigClassic.setMessageReadReceiptNeeded(true)
//设置系统通知消息文字的字体、颜色和背景色,针对所有系统通知消息生效
TUIChatConfigClassic.setSystemMessageTextColor(Color.WHITE)
TUIChatConfigClassic.setSystemMessageFontSize(23)
......@@ -122,4 +131,35 @@ class IMHelper private constructor() {
}
TUIChatConfigClassic.setCustomTopView(tipsView)
}
private fun loginIm() {
val instance = UserManager.getInstance()
val tuiLoginConfig = LoginWrapper.getLoginConfig()
// tuiLoginConfig.isInitLocalStorageOnly = true
val userID = instance.userPKID
val userSig = IMHelper.instance.getUserSig()
LogUtil.i("LoginWrapper ", "userSig $userSig")
LoginWrapper.getInstance().loginIMSDK(MintsApplication.getContext(), IMHelper.IM_SDK_APPID,
userID, userSig, tuiLoginConfig, object : TUICallback() {
override fun onSuccess() {
LogUtil.i("LoginWrapper ", "imLogin onSuccess")
}
override fun onError(errorCode: Int, errorMessage: String) {
LogUtil.i(
"LoginWrapper ",
"imLogin errorCode = $errorCode, errorInfo = $errorMessage"
)
}
})
}
fun startChatActivity(chatId: String) {
val intent = Intent(MintsApplication.getContext(), IMActivity::class.java)
intent.putExtra(TUIConstants.TUIChat.CHAT_TYPE, V2TIMConversation.V2TIM_C2C)
intent.putExtra(TUIConstants.TUIChat.CHAT_ID, chatId)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
MintsApplication.getContext().startActivity(intent)
}
}
\ No newline at end of file
......@@ -4,7 +4,6 @@ import android.content.Context;
import android.text.TextUtils;
import com.duben.roseplaylet.MintsApplication;
import com.duben.roseplaylet.common.AppConfig;
import com.duben.roseplaylet.utils.LogUtil;
import com.tencent.imsdk.BaseConstants;
import com.tencent.imsdk.v2.V2TIMConversationListener;
......@@ -32,7 +31,7 @@ public class LoginWrapper {
private V2TIMSDKListener v2TIMSDKListener;
private V2TIMConversationListener v2TIMConversationListener;
private List<AppLoginListener> appLoginObservers = new ArrayList<>();
private final List<AppLoginListener> appLoginObservers = new ArrayList<>();
private LoginWrapper() {
initIMSDKObserver();
......@@ -153,15 +152,16 @@ public class LoginWrapper {
UserManager userInfo = UserManager.getInstance();
int lastLoginCode = userInfo.getLastImLoginCode();
if (loginStatus == V2TIMManager.V2TIM_STATUS_LOGOUT && !TextUtils.isEmpty(userInfo.getUserID())) {
if (loginStatus == V2TIMManager.V2TIM_STATUS_LOGOUT && !TextUtils.isEmpty(userInfo.getUserPKID())) {
if (lastLoginCode >= BaseConstants.ERR_SDK_NET_ENCODE_FAILED && lastLoginCode <= BaseConstants.ERR_SDK_NET_SEND_REMAINING_TIMEOUT_NO_NETWORK) {
LogUtil.i(TAG, "onConnectSuccess, login IMSDK");
loginIMSDK(MintsApplication.getContext(), IMHelper.IM_SDK_APPID, userInfo.getUserID(),
loginIMSDK(MintsApplication.getContext(), IMHelper.IM_SDK_APPID, userInfo.getUserPKID(),
IMHelper.Companion.getInstance().getUserSig(), getLoginConfig(),
new TUICallback() {
@Override
public void onSuccess() {
// do nothing
LogUtil.e(TAG, "tryToAutoLogin onSuccess");
}
@Override
......
package com.duben.roseplaylet.manager
import android.content.Intent
import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.ui.activitys.BasicUserProfileActivity
import com.duben.roseplaylet.ui.activitys.RealAuthActivity
import com.duben.roseplaylet.ui.activitys.VipActivity
import com.duben.roseplaylet.ui.widgets.RealAuthDialog
import com.duben.roseplaylet.utils.ToastUtil
class UserHelper private constructor() {
companion object {
//缺少基础资料请填写
const val COMMON_ERROR_CODE_BASIC_PROFILE = 9404
//无vip或金币
const val COMMON_ERROR_CODE_NO_VIP = 9405
//未认证
const val COMMON_ERROR_CODE_NO_AUTH = 9406
val instance: UserHelper by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
UserHelper()
}
}
private val userInstance by lazy { UserManager.getInstance() }
//用户是否填写基本资料
fun isUserHaveBasic(): Boolean {
if (userInstance.userHasBasic()) {
return true
}
receiveErrorCode(COMMON_ERROR_CODE_BASIC_PROFILE)
return false
}
//用户是否实名
fun isUserAuth(): Boolean {
if (userInstance.idcardStatus == 1) {
return true
}
receiveErrorCode(COMMON_ERROR_CODE_NO_AUTH)
return false
}
fun showRealAuthDialog() {
RealAuthDialog(MintsApplication.getContext())
.show()
}
fun receiveErrorCode(code: Int) {
val appContext = MintsApplication.getContext()
val intent: Intent
when (code) {
COMMON_ERROR_CODE_BASIC_PROFILE -> {
// 缺少基础资料
ToastUtil.show(MintsApplication.getContext(), "缺少基础资料")
intent = Intent(appContext, BasicUserProfileActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
appContext.startActivity(intent)
}
COMMON_ERROR_CODE_NO_VIP -> {
// 无vip或金币
ToastUtil.show(MintsApplication.getContext(), "余额不足,请充值")
intent = Intent(appContext, VipActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
appContext.startActivity(intent)
}
COMMON_ERROR_CODE_NO_AUTH -> {
// 未认证
ToastUtil.show(MintsApplication.getContext(), "请完成真人认证")
showRealAuthDialog()
// intent = Intent(appContext, RealAuthActivity::class.java)
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
// appContext.startActivity(intent)
}
else -> {}
}
}
}
\ No newline at end of file
......@@ -27,6 +27,10 @@ public class UserManager {
* 用户ID
*/
private static final String USER_ID = "userId";
/**
* 用户PK_ID
*/
private static final String USER_PK_ID = "userPkId";
/**
* 登陆状态ID
*/
......@@ -55,32 +59,37 @@ public class UserManager {
* vip是否永久
*/
private static final String VIP_FOREVER = "VIP_FOREVER";
/**
* 上次IM登录CODE
*/
private static final String LAST_IM_LOGIN_CODE = "LAST_IM_LOGIN_CODE";
/**
* 用户性别
*/
private static final String USER_SEX = "USER_SEX";
/**
* 认证状态,1 已认证
*/
private static final String IDCARD_STATUS = "IDCARD_STATUS";
/**
* 是否填写基础资料了
*/
private static final String HAS_BEAN = "HAS_BEAN";
private static final String VIP_DATE = "VIP_DATE";
private static final String CODE_ID = "codeId";
private static final String SHARE_CODE = "share_code";
// 匹配用户 = true
private static final String NEW_FLAG = "new_flag";
/****************新加****************/
//分享码
private static final String SHARE_CODE = "SHARE_CODE";
//上次IM登录CODE
private static final String LAST_IM_LOGIN_CODE = "LAST_IM_LOGIN_CODE";
//用户性别
private static final String USER_SEX = "USER_SEX";
//认证状态,1 已认证
private static final String IDCARD_STATUS = "IDCARD_STATUS";
//是否填写基础资料
private static final String HAS_BASE = "HAS_BASE";
//金币,买各种虚拟资产
private static final String USER_BEANS = "USER_BEANS";
//年龄
private static final String USER_AGE = "USER_AGE";
//奖励金额
private static final String USER_REWARD_CASH = "USER_REWARD_CASH";
//城市
private static final String USER_CITY = "USER_CITY";
//头像
private static final String USER_HEAD_URL = "USER_HEAD_URL";
//提现支付宝账号 是否设置了
private static final String USER_ALIPAY_SET = "USER_ALIPAY_SET";
public static UserManager getInstance() {
if (_inst == null) {
_inst = new UserManager();
......@@ -111,34 +120,57 @@ public class UserManager {
ps.put(TOKEN_ID, token);
}
if (user != null) {
String uid = String.valueOf(user.getPk_id());
String mobile = user.getMobile();
String openid = user.getOpenid();
if (!TextUtils.isEmpty(mobile) || !TextUtils.isEmpty(openid)) {
ps.put(IS_TEMP_USER, uid);
} else {
ps.remove(IS_TEMP_USER);
}
if (user.getExpireTime() > 0) {
ps.put(VIP_FLAG, true);
} else {
ps.put(VIP_FLAG, false);
}
ps.put(SHARE_CODE, user.getShareCode());
ps.put(VIP_FOREVER, user.isForever());
ps.put(REAL_NAME, user.getNickName());
ps.put(HEAD, user.getHead());
ps.put(USER_ID, uid);
ps.put(MOBILE, user.getMobile());
ps.put(VIP_DATE, user.getExpireTime());
ps.put(WX_OPENID, openid);
ps.put(CODE_ID, user.getIdcode());
ps.put(NEW_FLAG, user.getActiviteFlag() == 1);
String uid = String.valueOf(user.getPk_id());
String mobile = user.getMobile();
String openid = user.getOpenid();
if (!TextUtils.isEmpty(mobile) || !TextUtils.isEmpty(openid)) {
ps.put(IS_TEMP_USER, uid);
} else {
ps.remove(IS_TEMP_USER);
}
if (user.getExpireTime() > 0) {
ps.put(VIP_FLAG, true);
} else {
ps.put(VIP_FLAG, false);
}
ps.put(SHARE_CODE, user.getShareCode());
ps.put(VIP_FOREVER, user.isForever());
ps.put(REAL_NAME, user.getNickName());
ps.put(HEAD, user.getHead());
ps.put(USER_ID, uid);
ps.put(USER_PK_ID, user.getPk_id());
ps.put(MOBILE, user.getMobile());
ps.put(VIP_DATE, user.getExpireTime());
ps.put(WX_OPENID, openid);
ps.put(CODE_ID, user.getIdcode());
ps.put(NEW_FLAG, user.getActiviteFlag() == 1);
ps.put(HAS_BASE, user.isHasBase());
ps.put(IDCARD_STATUS, user.getIdcardStatus());
ps.put(SHARE_CODE, user.getShareCode());
}
/**
* 判断用户是否填写基础资料
*/
public int getIdcardStatus() {
if (ps == null) {
return 0;
}
return ps.getInt(IDCARD_STATUS, 0);
}
/**
* 判断用户是否填写基础资料
*/
public boolean userHasBasic() {
if (ps == null) {
return false;
}
return ps.getBoolean(HAS_BASE, false);
}
/**
......@@ -171,7 +203,6 @@ public class UserManager {
if (ps == null) {
return false;
}
// return !TextUtils.isEmpty(ps.getString(TOKEN_ID));
return !TextUtils.isEmpty(ps.getString(IS_TEMP_USER, ""));
}
......@@ -185,6 +216,16 @@ public class UserManager {
return ps.getString(USER_ID, "");
}
/**
* 单独获取用户PKid
*/
public String getUserPKID() {
if (ps == null) {
return null;
}
return ps.getString(USER_PK_ID, "");
}
public boolean getVipFlag() {
if (ps == null) {
return false;
......@@ -237,7 +278,6 @@ public class UserManager {
return ps.getBoolean(VIP_FOREVER, false);
}
public void setVipFlag(boolean vipFlag) {
if (ps == null) {
return;
......@@ -294,6 +334,10 @@ public class UserManager {
ps.remove(CODE_ID);
ps.remove(VIP_DATE);
ps.remove(NEW_FLAG);
ps.remove(HAS_BASE);
ps.remove(IDCARD_STATUS);
ps.remove(SHARE_CODE);
}
_inst = null;
......
......@@ -12,5 +12,5 @@ data class SeeWechat(
val hasWechat: Boolean,
val online: Boolean,
val surCount: Int,
val wechat: String? = null
val wechat: String = ""
) : java.io.Serializable
\ No newline at end of file
......@@ -15,13 +15,88 @@ public class UserBean implements Serializable {
private String mobile;
private String idcode;
private String head;
private int activiteFlag=0;// 1-匹配用户
private int activiteFlag = 0;// 1-匹配用户
private String openid;
private boolean isForever;//true-永久会员
private long expireTime;// vip到期时间 0-非vip
private long pk_id;// 用户id
private long createTime;// 用户id
private String shareCode;// 用户id
private String shareCode;// 分享码
private boolean hasBase;// 是否填写基础资料
private int idcardStatus;//认证状态,1 已认证
private int beans;//金币,买各种虚拟资产证
private double rewardCash;//奖励金额
private String city;//城市
private String age;//年龄
private String headerUrl;//头像
private boolean alipaySet;//提现支付宝账号 是否设置了,计划采用竞品方案,现在openid 不唯一了,没有uid
public boolean isHasBase() {
return hasBase;
}
public void setHasBase(boolean hasBase) {
this.hasBase = hasBase;
}
public int getIdcardStatus() {
return idcardStatus;
}
public void setIdcardStatus(int idcardStatus) {
this.idcardStatus = idcardStatus;
}
public int getBeans() {
return beans;
}
public void setBeans(int beans) {
this.beans = beans;
}
public double getRewardCash() {
return rewardCash;
}
public void setRewardCash(double rewardCash) {
this.rewardCash = rewardCash;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getAge() {
return age;
}
public void setAge(String age) {
this.age = age;
}
public String getHeaderUrl() {
return headerUrl;
}
public void setHeaderUrl(String headerUrl) {
this.headerUrl = headerUrl;
}
public boolean isAlipaySet() {
return alipaySet;
}
public void setAlipaySet(boolean alipaySet) {
this.alipaySet = alipaySet;
}
public String getShareCode() {
return shareCode;
......
......@@ -9,11 +9,11 @@ data class UserProfileData(
var age: String? = null,
var appearance: String? = null,
var birthday: String? = null,
var black: Int? = null,
var black: Int = 0,
var bodyWeight: String? = null,
var canChat: Boolean,
var canSee: Boolean,
var canSeeSurCount: Int? = null,
var canChat: Boolean = false,
var canSee: Boolean = false,
var canSeeSurCount: Int = 0,
var career: String? = null,
var city: String? = null,
var days: String? = null,
......@@ -29,14 +29,14 @@ data class UserProfileData(
var interest: String? = null,
var introduce: String? = null,
var lastTime: Long? = null,
var likeCount: Int? = null,
var likeStatus: Int? = null,
var likeCount: Int = 0,
var nickName: String? = null,
var online: Boolean,
var sex: Int? = null,
var sex: Int = 1,
var likeStatus: Int = 0,
var tagsCommon: String? = null,
var tagsOther: String? = null,
var uid: Long? = null,
var updateCount: Int? = null,
var uid: Long = 0,
var updateCount: Int = 0,
var userHeight: String? = null
) : java.io.Serializable
\ No newline at end of file
......@@ -9,6 +9,47 @@ import com.google.gson.JsonObject
class UserProfilePresenter : BasePresenter<UserProfileView>() {
fun toLike(toUid: String, status: Int) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
vo["status"] = status
AppHttpManager.getInstance(loanApplication)
.call(loanService.toLike(vo), object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
var toLikeStatus = 0
if (status == 0) {
toLikeStatus = 1
}
view.toLikeSuc(toLikeStatus)
}
else -> {
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
}
})
}
fun getMorePage(toUid: String) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
......@@ -67,7 +108,7 @@ class UserProfilePresenter : BasePresenter<UserProfileView>() {
200 -> view.seeWechatSuc(baseResponse.data)
else -> {
view.showToast(message)
view.getMorePageFail()
view.seeWechatFail()
}
}
}
......@@ -81,6 +122,40 @@ class UserProfilePresenter : BasePresenter<UserProfileView>() {
})
}
fun unlockInfoByCoin(toUid: String) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
AppHttpManager.getInstance(loanApplication)
.call(loanService.seeWechat(vo),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.unlockInfoByCoinSuc()
else -> {
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
}
})
}
fun unlockWechat(toUid: String) {
val vo = hashMapOf<String, Any>()
......
......@@ -11,10 +11,14 @@ interface UserProfileView : BaseView {
fun seeWechatSuc(data: SeeWechat)
fun seeWechatFail()
fun unlockInfoByCoinSuc()
fun unlockWechatSuc()
fun unlockWechatFail()
fun toWhiteSuc()
fun toBlackSuc()
fun toLikeSuc(status: Int)
}
package com.duben.roseplaylet.net;
import com.duben.roseplaylet.MintsApplication;
import com.duben.roseplaylet.utils.ToastUtil;
import com.duben.roseplaylet.manager.UserHelper;
import com.google.gson.Gson;
import com.duben.roseplaylet.common.Constant;
import com.duben.roseplaylet.manager.UserManager;
import com.duben.roseplaylet.mvp.model.BaseResponse;
......@@ -105,14 +103,11 @@ public class GsonConverterFactory extends Converter.Factory {
} catch (Exception e) {
}
} else if (code == 9404) {
// 缺少基础资料
ToastUtil.show(MintsApplication.getContext(), "缺少基础资料");
UserHelper.Companion.getInstance().receiveErrorCode(code);
} else if (code == 9405) {
// 无vip或金币
ToastUtil.show(MintsApplication.getContext(), "无vip或金币");
UserHelper.Companion.getInstance().receiveErrorCode(code);
} else if (code == 9406) {
// 未认证
ToastUtil.show(MintsApplication.getContext(), "未认证");
UserHelper.Companion.getInstance().receiveErrorCode(code);
}
}
......
......@@ -449,7 +449,7 @@ public interface LoanService {
Observable<BaseResponse<JsonObject>> getSeeMeList(@Body Map<String, Object> vo);
/**
* 看过我的
* 用金币解锁用户资料
*/
@POST("roseApi/hall/unlockInfoByCoin")
Observable<BaseResponse<JsonObject>> unlockInfoByCoin(@Body Map<String, Object> vo);
......
......@@ -48,6 +48,7 @@ class IMActivity : TUIBaseChatActivity() {
ToastUtil.show(MintsApplication.getContext(), "init c2c chat failed.")
return
}
TUIChatLog.e(TAG, "init C2C chat failed , chatInfo_id = ${chatInfo.id}")
chatFragment = TUIC2CChatFragment()
chatFragment.chatInfo = chatInfo
supportFragmentManager.beginTransaction()
......@@ -89,6 +90,4 @@ class IMActivity : TUIBaseChatActivity() {
override fun getContentViewLayoutID(): Int {
return R.layout.activity_im
}
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ import androidx.fragment.app.FragmentTransaction
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.AppConfig
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.manager.UserHelper
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.roseplaylet.ui.fragment.*
import com.duben.roseplaylet.ui.widgets.DialogListener
......@@ -115,9 +116,13 @@ class MainActivity : BaseActivity(), View.OnClickListener {
override fun onClick(view: View) {
if (!UserHelper.instance.isUserHaveBasic()) return
when (view.id) {
R.id.tab_rl_video -> clickTab1Layout()
R.id.tab_rl_square -> clickTab2Layout()
R.id.tab_rl_square -> {
clickTab2Layout()
}
R.id.tab_rl_invite -> clickTab3Layout()
R.id.tab_rl_msg -> clickTab4Layout()
R.id.tab_rl_my -> clickTab5Layout()
......
package com.duben.roseplaylet.ui.adapter
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.OrderRecordBean
import com.duben.roseplaylet.ui.adapter.base.OnItemClickListener
import com.duben.roseplaylet.utils.TimeRender
import java.util.*
class OrderRecordAdapter(context: Context, invitedData: MutableList<OrderRecordBean.RecordsBean>) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
......
......@@ -49,10 +49,11 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
)
}
val view = holder.getView<LottieAnimationView>(R.id.iv_heart)
if (item.likeStatus == 0) {
holder.getView<ImageView>(R.id.iv_heart)
playCancelCollectAnim(view)
} else {
holder.getView<ImageView>(R.id.iv_heart)
playCollectAnim(view)
}
holder.getView<ImageView>(R.id.iv_heart).setOnClickListener {
......
package com.duben.roseplaylet.ui.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.adapter.base.OnItemClickListener
import com.duben.roseplaylet.utils.LogUtil
class UserProfileAlbumAdapter :
BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_user_profile_album) {
class UserProfileAlbumAdapter(val context: Context, val images: List<String>) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
const val HOLDER_TYPE_EMPTY = 0
const val HOLDER_TYPE_IMAGE = 1
}
private var isShowAuth = false
private var mOnItemClickListener: OnItemClickListener? = null
fun showAuth(showAuth: Boolean) {
this.isShowAuth = showAuth
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (viewType == OrderRecordAdapter.HOLDER_TYPE_EMPTY) {
val emptyView =
LayoutInflater.from(parent.context).inflate(R.layout.item_empty_cash, parent, false)
return EmptyHolder(emptyView)
}
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.item_user_profile_album, parent, false)
return ViewHolder(view)
}
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val tv_auth: TextView = view.findViewById(R.id.tv_auth)
val iv_photo: ImageView = view.findViewById(R.id.iv_photo)
}
override fun convert(holder: BaseViewHolder, item: String) {
inner class EmptyHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
if (holder is EmptyHolder) {
return
}
val myholder = holder as ViewHolder
if (isShowAuth) {
holder.getView<View>(R.id.tv_auth).visibility = View.VISIBLE
myholder.tv_auth.visibility = View.VISIBLE
} else {
myholder.tv_auth.visibility = View.GONE
}
myholder.iv_photo.setOnClickListener {
mOnItemClickListener?.onItemClick(it, position)
}
LogUtil.d("AAAAAA" + images[position])
GlideUtils.loadImageViewNoAnim2(context, images[position], myholder.iv_photo)
}
override fun getItemCount(): Int {
return if (images.isEmpty()) {
1
} else {
holder.getView<View>(R.id.tv_auth).visibility = View.GONE
images.size
}
}
override fun getItemViewType(position: Int): Int {
if (images.isEmpty()) {
return HOLDER_TYPE_EMPTY
}
GlideUtils.loadImageView(context, item, holder.getView(R.id.iv_photo))
return HOLDER_TYPE_IMAGE
}
}
\ No newline at end of file
......@@ -110,13 +110,13 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
//获取游客登录数据
homePresenter.userLogin()
} else {
// homePresenter.topTabs()
// homePresenter.orders()
// if (userManager.vipFlag) {
// homePresenter.signAfterSeconds()
// }
homePresenter.topTabs()
homePresenter.orders()
if (userManager.vipFlag) {
homePresenter.signAfterSeconds()
}
// IMHelper.instance.getImMsg()
// TrackManager.getInstance().getMyInfo()
TrackManager.getInstance().getMyInfo()
}
AppConfig.showVipAdDialog = false
......
package com.duben.roseplaylet.ui.fragment
import android.content.Intent
import android.text.TextUtils
import android.view.View
import android.widget.FrameLayout
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ad.express.ExpressAdCallback
import com.duben.roseplaylet.ad.express.MyExpressManager
import com.duben.roseplaylet.common.AppConfig
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.manager.IMHelper
import com.duben.roseplaylet.manager.LoginWrapper
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.mvp.model.UserBean
import com.duben.roseplaylet.mvp.presenters.MyPresenter
import com.duben.roseplaylet.mvp.views.MyView
import com.duben.roseplaylet.ui.activitys.*
import com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.SpanUtils
import com.duben.roseplaylet.utils.TimeRender
import com.duben.roseplaylet.utils.UIUtils
import com.tencent.imsdk.v2.V2TIMConversation
import com.tencent.qcloud.tuicore.TUIConstants
import com.tencent.qcloud.tuicore.interfaces.TUICallback
import kotlinx.android.synthetic.main.fragment_main_my.*
/**
......@@ -85,36 +77,6 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
}
private fun startChatActivity() {
val intent = Intent(MintsApplication.getContext(), IMActivity::class.java)
intent.putExtra(TUIConstants.TUIChat.CHAT_TYPE, V2TIMConversation.V2TIM_C2C)
intent.putExtra(TUIConstants.TUIChat.CHAT_ID, userManager.userID)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent)
}
private fun initUserLocalData() {
val instance = UserManager.getInstance()
val tuiLoginConfig = LoginWrapper.getLoginConfig()
tuiLoginConfig.isInitLocalStorageOnly = true
val userID = instance.userID
val userSig = IMHelper.instance.getUserSig()
LogUtil.i("LoginWrapper ", "userSig $userSig")
LoginWrapper.getInstance().loginIMSDK(MintsApplication.getContext(),
IMHelper.IM_SDK_APPID, userID, userSig, tuiLoginConfig, object : TUICallback() {
override fun onSuccess() {
LogUtil.i("LoginWrapper ", "imLogin onSuccess")
startChatActivity()
}
override fun onError(errorCode: Int, errorMessage: String) {
LogUtil.i(
"LoginWrapper ",
"imLogin errorCode = $errorCode, errorInfo = $errorMessage"
)
}
})
}
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
......@@ -140,8 +102,6 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
R.id.ll_my_record -> {
// readyGo(WatchRecordActivity::class.java)
IMHelper.instance.getImMsg()
// readyGo(UserProfileActivity::class.java)
}
R.id.ll_my_feed -> {
......@@ -150,8 +110,6 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
R.id.ll_contactus -> {
// (requireActivity() as MainActivity).backPhoneDialog()
initUserLocalData()
}
R.id.ll_my_payrecord -> {
// readyGo(OrderRecordActivity::class.java)
......
package com.duben.roseplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.duben.roseplaylet.R
import com.duben.roseplaylet.utils.SpanUtils
class ProfileCountDialog(
private val context: Context,
val count: Int = 0,
private val listener: DialogListener?
) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_free_count: TextView
private val tv_vip_btn: TextView
private val tv_vip_coin: TextView
private val iv_close: ImageView
init {
setContentView(R.layout.dialog_profile_count)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimFade
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView
tv_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView
tv_free_count = findViewById<View>(R.id.tv_free_count) as TextView
if (count > 0) {
tv_free_count.text = SpanUtils()
.append("你今天免费的查看次数还剩")
.append("" + count + "次")
.setForegroundColor(context.resources.getColor(R.color.color_E8C46E))
.create()
} else {
tv_free_count.text = "你今天免费的查看次数已用完"
}
iv_close = findViewById<View>(R.id.iv_close) as ImageView
iv_close.setOnClickListener {
dismiss()
}
listener?.setDialog(this)
tv_vip_btn.setOnClickListener(listener)
tv_vip_coin.setOnClickListener(listener)
}
}
\ No newline at end of file
......@@ -5,9 +5,9 @@ import android.content.Context
import android.content.Intent
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.RealAuthActivity
......@@ -16,7 +16,7 @@ class RealAuthDialog(private val context: Context) : Dialog(
) {
private val lp: WindowManager.LayoutParams
private val iv_phone_dialog_quit: ImageView
private val iv_auth: ImageView
private val tv_to_auth: TextView
init {
setContentView(R.layout.dialog_real_auth)
......@@ -30,23 +30,20 @@ class RealAuthDialog(private val context: Context) : Dialog(
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { dialogInterface, i, keyEvent ->
i == KeyEvent.KEYCODE_BACK
}
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
// 查找View
iv_phone_dialog_quit = findViewById<View>(R.id.iv_phone_dialog_quit) as ImageView
iv_auth = findViewById<View>(R.id.iv_auth) as ImageView
iv_phone_dialog_quit = findViewById(R.id.iv_phone_dialog_quit)
tv_to_auth = findViewById(R.id.tv_to_auth)
iv_phone_dialog_quit.setOnClickListener {
dismiss()
}
iv_auth.setOnClickListener {
tv_to_auth.setOnClickListener {
val intent = Intent(context, RealAuthActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(intent)
dismiss()
}
}
......
package com.duben.roseplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
class SeeWechatDialog(
private val context: Context,
private val headUrl: String?,
private val nickname: String?,
private val wechatCode: String?,
private val listener: DialogListener?
) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_wechat_code: TextView
private val tv_nickname: TextView
private val tv_send_btn: TextView
private val tv_copy: TextView
private val iv_close: ImageView
private val iv_avatar: ImageView
init {
setContentView(R.layout.dialog_see_wechat)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimFade
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
tv_send_btn = findViewById<View>(R.id.tv_send_btn) as TextView
tv_nickname = findViewById<View>(R.id.tv_nickname) as TextView
tv_wechat_code = findViewById<View>(R.id.tv_wechat_code) as TextView
tv_copy = findViewById<View>(R.id.tv_copy) as TextView
iv_close = findViewById<View>(R.id.iv_close) as ImageView
iv_avatar = findViewById<View>(R.id.iv_avatar) as ImageView
tv_nickname.text = nickname
tv_wechat_code.text = wechatCode
GlideUtils.loadImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener {
dismiss()
}
listener?.setDialog(this)
tv_send_btn.setOnClickListener(listener)
tv_copy.setOnClickListener(listener)
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
class UnlockChatDialog(
private val context: Context,
private val headUrl: String?,
private val listener: DialogListener?
) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_vip_btn: TextView
private val tv_vip_coin: TextView
private val iv_close: ImageView
private val iv_avatar: ImageView
init {
setContentView(R.layout.dialog_unlock_wechat)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimFade
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView
tv_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView
iv_close = findViewById<View>(R.id.iv_close) as ImageView
iv_avatar = findViewById<View>(R.id.iv_avatar) as ImageView
GlideUtils.loadImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener {
dismiss()
}
listener?.setDialog(this)
tv_vip_btn.setOnClickListener(listener)
tv_vip_coin.setOnClickListener(listener)
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
class UnlockWechatDialog(
private val context: Context,
private val headUrl: String?,
private val listener: DialogListener?
) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_vip_btn: TextView
private val tv_vip_coin: TextView
private val iv_close: ImageView
private val iv_avatar: ImageView
init {
setContentView(R.layout.dialog_unlock_wechat)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimFade
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView
tv_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView
iv_close = findViewById<View>(R.id.iv_close) as ImageView
iv_avatar = findViewById<View>(R.id.iv_avatar) as ImageView
GlideUtils.loadImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener {
dismiss()
}
listener?.setDialog(this)
tv_vip_btn.setOnClickListener(listener)
tv_vip_coin.setOnClickListener(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/color_252429" />
<stroke
android:width="1dp"
android:color="@color/color_615A5A" />
<corners android:radius="10dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_E2EAE0" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="20dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_FDEEC8" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="5dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_FDEEC8" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="20dip" />
</shape>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_232122">
android:background="@color/black">
<LinearLayout
android:layout_width="match_parent"
......@@ -23,12 +23,24 @@
android:gravity="center_horizontal"
android:orientation="vertical">
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="50dp"
android:src="@mipmap/ic_my_avat" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp">
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@mipmap/ic_my_avat" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:src="@mipmap/ic_alipay" />
</FrameLayout>
<TextView
android:id="@+id/tv_avatar_hint"
......@@ -36,12 +48,12 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="上传本人真实清晰近照,能大大提高约会成功率"
android:textColor="@color/color_959595" />
android:textColor="@color/color_61616E" />
<EditText
android:id="@+id/et_nickname"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_height="45dp"
android:layout_marginStart="30dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="30dp"
......@@ -49,24 +61,26 @@
android:gravity="center_vertical"
android:hint="请输入您的昵称"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textColor="@color/white"
android:textColorHint="@color/color_959595"
android:textSize="18sp" />
android:textSize="14sp" />
<TextView
android:id="@+id/tv_age"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_height="45dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="30dp"
android:background="@drawable/shape_bg_hall_btn1"
android:gravity="center_vertical"
android:hint="请选择您的年龄"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textColor="@color/white"
android:textColorHint="@color/color_959595"
android:textSize="18sp" />
android:textSize="14sp" />
<RadioGroup
android:id="@+id/rg_sex"
......@@ -77,7 +91,7 @@
<RadioButton
android:id="@+id/rb_female"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_height="45dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="15dp"
......@@ -87,12 +101,12 @@
android:gravity="center"
android:text="女"
android:textColor="@color/color_959595"
android:textSize="18sp" />
android:textSize="16sp" />
<RadioButton
android:id="@+id/rb_male"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
......@@ -102,7 +116,7 @@
android:gravity="center"
android:text="男"
android:textColor="@color/color_959595"
android:textSize="18sp" />
android:textSize="16sp" />
</RadioGroup>
......@@ -110,9 +124,9 @@
android:id="@+id/tv_sax_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginTop="20dp"
android:text="注册完成后,您的性别将无法更改"
android:textColor="@color/color_959595" />
android:textColor="@color/color_E8CF83" />
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
......@@ -130,7 +144,8 @@
android:background="@drawable/shape_profile_chat"
android:gravity="center"
android:text="保存"
android:textColor="@color/black" />
android:textColor="@color/black"
android:textSize="16sp" />
</FrameLayout>
......
......@@ -12,13 +12,12 @@
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_hall"
android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal"
android:orientation="vertical">
......@@ -38,13 +37,14 @@
android:gravity="center"
android:text="限时特享5折起"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp" />
android:textSize="14sp"
android:visibility="gone" />
<TextView
android:id="@+id/tv_vip_btn"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginTop="40dp"
android:background="@drawable/shape_bg_hall_btn2"
android:gravity="center"
android:text="会员免费"
......@@ -67,8 +67,8 @@
<ImageView
android:id="@+id/iv_avatar"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="-35dp"
android:src="@mipmap/ic_my_avat" />
......
......@@ -21,7 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:src="@mipmap/ic_activity_quit"></ImageView>
android:src="@mipmap/ic_activity_quit" />
<LinearLayout
android:layout_width="wrap_content"
......
<?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="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/tv_free_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:gravity="center"
android:text="你今天免费的查看次数还剩4次"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="非会员用户每天只能免费\n查看15位女士"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_vip_btn"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="40dp"
android:background="@drawable/shape_bg_hall_btn2"
android:gravity="center"
android:text="会员免费"
android:textColor="@color/color_9F6A32"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_vip_coin"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_bg_hall_btn3"
android:gravity="center"
android:text="直接联系(200金币)"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp" />
</LinearLayout>
<ImageView
android:id="@+id/iv_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" />
</RelativeLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_auth"
android:layout_width="300dp"
android:layout_height="300dp"
android:src="@mipmap/ic_my_avat" />
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="真人认证"
android:textColor="@color/white"
android:textSize="20sp" />
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="20dp"
android:src="@mipmap/ic_my_avat" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:paddingStart="30dp"
android:paddingEnd="30dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="10dp"
android:text="认证图标"
android:textColor="@color/white"
android:textSize="16sp"
app:drawableStartCompat="@mipmap/ic_call_wx" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="10dp"
android:text="优先推荐"
android:textColor="@color/white"
android:textSize="16sp"
app:drawableStartCompat="@mipmap/ic_call_wx" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingStart="30dp"
android:paddingEnd="30dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="10dp"
android:text="免费私聊男士"
android:textColor="@color/white"
android:textSize="16sp"
app:drawableStartCompat="@mipmap/ic_call_wx" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="10dp"
android:text="免费发布动态"
android:textColor="@color/white"
android:textSize="16sp"
app:drawableStartCompat="@mipmap/ic_call_wx" />
</LinearLayout>
<TextView
android:id="@+id/tv_to_auth"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_profile_chat"
android:gravity="center"
android:text="真人认证"
android:textColor="@color/black"
android:textSize="18sp" />
</LinearLayout>
<ImageView
android:id="@+id/iv_phone_dialog_quit"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:layout_gravity="center_horizontal"
android:padding="10dp"
android:src="@mipmap/ic_activity_quit" />
</LinearLayout>
android:id="@+id/iv_close"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:padding="6dp"
android:src="@mipmap/ic_quit_white" />
</RelativeLayout>
<?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="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/tv_nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:text=""
android:textColor="@color/white"
android:textSize="20sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_chat_gray"
android:gravity="center_vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:src="@mipmap/ic_call_wx" />
<TextView
android:id="@+id/tv_wechat_code"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_weight="1"
android:text="SSS1313"
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:id="@+id/tv_copy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:background="@drawable/shape_bg_hall_btn2"
android:paddingStart="10dp"
android:paddingTop="4dp"
android:paddingEnd="10dp"
android:paddingBottom="4dp"
android:text="复制"
android:textColor="@color/black"
android:textSize="16sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="社交账号仅保留24小时"
android:textColor="@color/color_E8CF83"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_send_btn"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_bg_hall_btn2"
android:gravity="center"
android:text="发送我的社交账号给TA"
android:textColor="@color/color_9F6A32"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="-40dp"
android:src="@mipmap/ic_my_avat" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" />
</RelativeLayout>
</FrameLayout>
<?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="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:text="解锁私聊"
android:textColor="@color/color_FCE8BA"
android:textSize="20sp" />
<TextView
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_marginTop="30dp"
android:background="@drawable/shape_bg_hall_btn1"
android:gravity="center"
android:text="限时特享5折起"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp"
android:visibility="gone" />
<TextView
android:id="@+id/tv_vip_btn"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="40dp"
android:background="@drawable/shape_bg_hall_btn2"
android:gravity="center"
android:text="会员免费"
android:textColor="@color/color_9F6A32"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_vip_coin"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_bg_hall_btn3"
android:gravity="center"
android:text="直接解锁(200金币)"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp" />
</LinearLayout>
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="-40dp"
android:src="@mipmap/ic_my_avat" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" />
</RelativeLayout>
</FrameLayout>
<?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="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:text="解锁微信号"
android:textColor="@color/color_FCE8BA"
android:textSize="20sp" />
<TextView
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_marginTop="30dp"
android:background="@drawable/shape_bg_hall_btn1"
android:gravity="center"
android:text="限时特享5折起"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp"
android:visibility="gone" />
<TextView
android:id="@+id/tv_vip_btn"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="40dp"
android:background="@drawable/shape_bg_hall_btn2"
android:gravity="center"
android:text="会员免费"
android:textColor="@color/color_9F6A32"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_vip_coin"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_bg_hall_btn3"
android:gravity="center"
android:text="直接解锁(200金币)"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp" />
</LinearLayout>
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="-40dp"
android:src="@mipmap/ic_my_avat" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" />
</RelativeLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginStart="10dp">
<ImageView
android:id="@+id/iv_photo"
......
......@@ -62,25 +62,40 @@
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_label_isvip"
android:id="@+id/tv_label_vip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@drawable/shape_label_white"
android:paddingStart="4dp"
android:background="@drawable/shape_label_vip"
android:paddingStart="10dp"
android:paddingTop="2dp"
android:paddingEnd="4dp"
android:paddingEnd="10dp"
android:paddingBottom="2dp"
android:text="VIP"
android:textColor="@color/black"
android:textStyle="bold" />
android:textColor="@color/color_E5C565"
android:textSize="12sp"
android:visibility="gone" />
<TextView
android:id="@+id/tv_label_auth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@drawable/shape_label_auth"
android:paddingStart="10dp"
android:paddingTop="2dp"
android:paddingEnd="10dp"
android:paddingBottom="2dp"
android:text="真人"
android:textColor="@color/color_159823"
android:textSize="12sp"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="3dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -89,27 +104,28 @@
android:id="@+id/tv_label_age"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_label_white"
android:paddingStart="4dp"
android:background="@drawable/shape_label_male"
android:paddingStart="6dp"
android:paddingTop="2dp"
android:paddingEnd="4dp"
android:paddingEnd="6dp"
android:paddingBottom="2dp"
android:text="44岁"
android:textColor="@color/black" />
android:textColor="@color/color_E5C565"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_label_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@drawable/shape_label_white"
android:paddingStart="4dp"
android:background="@drawable/shape_label_male"
android:paddingStart="6dp"
android:paddingTop="2dp"
android:paddingEnd="4dp"
android:paddingEnd="6dp"
android:paddingBottom="2dp"
android:text="北京北京"
android:textColor="@color/black"
android:textColor="@color/color_E5C565"
android:textSize="12sp"
android:visibility="gone" />
<TextView
......@@ -117,13 +133,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:background="@drawable/shape_label_white"
android:paddingStart="4dp"
android:background="@drawable/shape_label_male"
android:paddingStart="6dp"
android:paddingTop="2dp"
android:paddingEnd="4dp"
android:paddingEnd="6dp"
android:paddingBottom="2dp"
android:text="172cm"
android:textColor="@color/black" />
android:textColor="@color/color_E5C565"
android:textSize="12sp" />
</LinearLayout>
......@@ -131,7 +148,6 @@
android:id="@+id/tv_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="登录IP:12323213"
android:textColor="@color/white"
android:visibility="gone" />
......@@ -144,11 +160,11 @@
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/iv_like"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/djx_like" />
android:layout_width="35dp"
android:layout_height="35dp"
android:src="@mipmap/home_collect_img_0" />
<TextView
android:id="@+id/tv_like_count"
......
......@@ -32,7 +32,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/v_bar">
<ImageView
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_head_avatar"
android:layout_width="40dp"
android:layout_height="40dp"
......
......@@ -71,5 +71,16 @@
<color name="color_EAE3E0">#EAE3E0</color>
<color name="color_DB6572">#DB6572</color>
<color name="color_D2D2D2">#D2D2D2</color>
<color name="color_61616E">#61616E</color>
<color name="color_159823">#159823</color>
<color name="color_E2EAE0">#E2EAE0</color>
<color name="color_E8C46E">#E8C46E</color>
<color name="color_252429">#252429</color>
<color name="color_615A5A">#615A5A</color>
</resources>
\ No newline at end of file
......@@ -77,4 +77,6 @@
<string name="demo_permission_storage_dialog_alert">在设置-应用-%s-权限中开启存储权限,以正常使用保存照片和视频功能</string>
<string name="str_secret">秘密</string>
</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