Commit 8ca14cf2 authored by jyx's avatar jyx

分享页面

parent bca0c164
...@@ -264,6 +264,10 @@ ...@@ -264,6 +264,10 @@
android:name=".ui.preview.ImagePreviewActivity" android:name=".ui.preview.ImagePreviewActivity"
android:exported="false" android:exported="false"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.ShareActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activitys.IMActivity" android:name=".ui.activitys.IMActivity"
......
...@@ -127,8 +127,8 @@ public class CashException { ...@@ -127,8 +127,8 @@ public class CashException {
ex.setMessage(resultException.message); ex.setMessage(resultException.message);
return ex; return ex;
} else { } else {
LogUtil.d("XXXXXXXXXX"); LogUtil.d("AAAAAAAAAA");
LogUtil.d(e.getMessage()); LogUtil.d("AAAAAAAAAA" + e.getMessage());
ex = new Throwable(e, ERROR.UNKNOWN); ex = new Throwable(e, ERROR.UNKNOWN);
ex.setMessage("系统异常,请退出app重新打开"); ex.setMessage("系统异常,请退出app重新打开");
return ex; return ex;
......
...@@ -3,7 +3,6 @@ package com.duben.roseplaylet.manager ...@@ -3,7 +3,6 @@ package com.duben.roseplaylet.manager
import android.content.Intent import android.content.Intent
import com.duben.roseplaylet.MintsApplication import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.ui.activitys.BasicUserProfileActivity 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.activitys.VipActivity
import com.duben.roseplaylet.ui.widgets.RealAuthDialog import com.duben.roseplaylet.ui.widgets.RealAuthDialog
import com.duben.roseplaylet.utils.ToastUtil import com.duben.roseplaylet.utils.ToastUtil
...@@ -46,8 +45,7 @@ class UserHelper private constructor() { ...@@ -46,8 +45,7 @@ class UserHelper private constructor() {
} }
fun showRealAuthDialog() { fun showRealAuthDialog() {
RealAuthDialog(MintsApplication.getContext()) RealAuthDialog(ActivityPageManager.getInstance().currentActivity).show()
.show()
} }
fun receiveErrorCode(code: Int) { fun receiveErrorCode(code: Int) {
......
...@@ -146,6 +146,7 @@ public class UserManager { ...@@ -146,6 +146,7 @@ public class UserManager {
ps.put(WX_OPENID, openid); ps.put(WX_OPENID, openid);
ps.put(CODE_ID, user.getIdcode()); ps.put(CODE_ID, user.getIdcode());
ps.put(NEW_FLAG, user.getActiviteFlag() == 1); ps.put(NEW_FLAG, user.getActiviteFlag() == 1);
ps.put(USER_SEX, user.getSex());
ps.put(HAS_BASE, user.isHasBase()); ps.put(HAS_BASE, user.isHasBase());
...@@ -306,18 +307,11 @@ public class UserManager { ...@@ -306,18 +307,11 @@ public class UserManager {
return ps.getInt(LAST_IM_LOGIN_CODE, BaseConstants.ERR_SUCC); return ps.getInt(LAST_IM_LOGIN_CODE, BaseConstants.ERR_SUCC);
} }
public void setUserSex(String userSex) { public int getUserSex() {
if (ps == null) { if (ps == null) {
return; return 1;
}
ps.put(USER_SEX, userSex);
}
public String getUserSex() {
if (ps == null) {
return "1";
} }
return ps.getString(USER_SEX, "1"); return ps.getInt(USER_SEX, 1);
} }
public void userLogout() { public void userLogout() {
......
package com.duben.roseplaylet.mvp.model
data class ShareRankList(
val list: ArrayList<ShareRank>
) : java.io.Serializable
data class ShareRank(
val head: String,
val nick: String,
val rewardCash: String,
val share: Int
) : java.io.Serializable
data class ShareInvite(
val nickName: String,
val head: String,
val status: String,
val sex: String,
val cash: Int
) : java.io.Serializable
\ No newline at end of file
...@@ -23,6 +23,7 @@ public class UserBean implements Serializable { ...@@ -23,6 +23,7 @@ public class UserBean implements Serializable {
private long createTime;// 用户id private long createTime;// 用户id
private int sex;// 性别
private String shareCode;// 分享码 private String shareCode;// 分享码
private boolean hasBase;// 是否填写基础资料 private boolean hasBase;// 是否填写基础资料
private int idcardStatus;//认证状态,1 已认证 private int idcardStatus;//认证状态,1 已认证
...@@ -33,6 +34,13 @@ public class UserBean implements Serializable { ...@@ -33,6 +34,13 @@ public class UserBean implements Serializable {
private String headerUrl;//头像 private String headerUrl;//头像
private boolean alipaySet;//提现支付宝账号 是否设置了,计划采用竞品方案,现在openid 不唯一了,没有uid private boolean alipaySet;//提现支付宝账号 是否设置了,计划采用竞品方案,现在openid 不唯一了,没有uid
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public boolean isHasBase() { public boolean isHasBase() {
return hasBase; return hasBase;
......
package com.duben.roseplaylet.mvp.model package com.duben.roseplaylet.mvp.model
/** data class UserProfileDataInfo(
* @author Assen val info: UserProfileData
* @date 2025/1/15 ) : java.io.Serializable
* @desc
*/
data class UserProfileData( data class UserProfileData(
var age: String? = null, var age: String? = null,
var appearance: String? = null, var appearance: String? = null,
......
...@@ -10,7 +10,7 @@ import java.util.HashMap ...@@ -10,7 +10,7 @@ import java.util.HashMap
class BasicUserProfilePresenter : BasePresenter<BasicUserProfileView>() { class BasicUserProfilePresenter : BasePresenter<BasicUserProfileView>() {
fun initBasicInfo(birthday: String, nickName: String, sex: String, headerUrl: String) { fun initBasicInfo(birthday: String, nickName: String, sex: Int, headerUrl: String) {
val vo = HashMap<String, Any>() val vo = HashMap<String, Any>()
vo["birthday"] = birthday vo["birthday"] = birthday
vo["nickName"] = nickName vo["nickName"] = nickName
......
...@@ -5,6 +5,7 @@ import com.duben.library.net.neterror.Throwable ...@@ -5,6 +5,7 @@ import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.UserProfileData import com.duben.roseplaylet.mvp.model.UserProfileData
import com.duben.roseplaylet.mvp.model.UserProfileDataInfo
import com.duben.roseplaylet.mvp.views.EditProfileView import com.duben.roseplaylet.mvp.views.EditProfileView
import java.util.HashMap import java.util.HashMap
...@@ -13,13 +14,13 @@ class EditProfilePresenter : BasePresenter<EditProfileView>() { ...@@ -13,13 +14,13 @@ class EditProfilePresenter : BasePresenter<EditProfileView>() {
fun getUserInfo() { fun getUserInfo() {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.userInfo, .call(loanService.userInfo,
object : BaseSubscriber<BaseResponse<UserProfileData>>() { object : BaseSubscriber<BaseResponse<UserProfileDataInfo>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
} }
override fun onNext(baseResponse: BaseResponse<UserProfileData>) { override fun onNext(baseResponse: BaseResponse<UserProfileDataInfo>) {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
......
package com.duben.roseplaylet.mvp.presenters package com.duben.roseplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.ShareRankList
import com.duben.roseplaylet.mvp.views.InviteView import com.duben.roseplaylet.mvp.views.InviteView
import com.google.gson.JsonObject
class InvitePresenter : BasePresenter<InviteView>() { class InvitePresenter : BasePresenter<InviteView>() {
fun getSharePageMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.sharePageMsg,
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getSharePageMsgFail()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getSharePageMsgSuc(
baseResponse.data.get("shareCode").asString,
baseResponse.data.get("rUserShareCode").asString
)
}
else -> {
view.showToast(message)
view.getSharePageMsgFail()
}
}
}
})
}
fun getShareOrders() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.shareOrders,
object : BaseSubscriber<BaseResponse<ShareRankList>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getShareOrderFail()
}
override fun onNext(baseResponse: BaseResponse<ShareRankList>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getShareOrderSuc(baseResponse.data)
}
else -> {
view.showToast(message)
view.getShareOrderFail()
}
}
}
})
}
fun getShareUrl() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.shareUrl,
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getShareUrlSucFail()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getShareUrlSuc(baseResponse.data.get("url").asString)
}
else -> {
view.showToast(message)
view.getShareUrlSucFail()
}
}
}
})
}
fun getRuserShareCode() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.ruserShareCode,
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getShareUrlSucFail()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
// view.getShareUrlSuc(baseResponse.data)
}
else -> {
view.showToast(message)
view.getShareUrlSucFail()
}
}
}
})
}
} }
\ No newline at end of file
...@@ -126,7 +126,7 @@ class UserProfilePresenter : BasePresenter<UserProfileView>() { ...@@ -126,7 +126,7 @@ class UserProfilePresenter : BasePresenter<UserProfileView>() {
val vo = hashMapOf<String, Any>() val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid vo["toUid"] = toUid
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.seeWechat(vo), .call(loanService.unlockInfoByCoin(vo),
object : BaseSubscriber<BaseResponse<JsonObject>>() { object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
......
package com.duben.roseplaylet.mvp.views package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.UserProfileData import com.duben.roseplaylet.mvp.model.UserProfileDataInfo
interface EditProfileView : BaseView { interface EditProfileView : BaseView {
fun getUserInfoSuc(data: UserProfileData) fun getUserInfoSuc(data: UserProfileDataInfo)
fun getUserInfoFail() fun getUserInfoFail()
fun setUserInfoSuc() fun setUserInfoSuc()
......
package com.duben.roseplaylet.mvp.views package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.ShareRankList
interface InviteView : BaseView { interface InviteView : BaseView {
fun getSharePageMsgSuc(shareCode: String, rUserShareCode: String?)
fun getSharePageMsgFail()
fun getShareOrderSuc(data: ShareRankList)
fun getShareOrderFail()
fun getShareUrlSuc(data: String)
fun getShareUrlSucFail()
fun getRuserShareCodeSuc(data: Any)
fun getRuserShareCodeSucFail()
} }
\ No newline at end of file
...@@ -7,7 +7,9 @@ import com.duben.roseplaylet.mvp.model.FaceParam; ...@@ -7,7 +7,9 @@ import com.duben.roseplaylet.mvp.model.FaceParam;
import com.duben.roseplaylet.mvp.model.HallList; import com.duben.roseplaylet.mvp.model.HallList;
import com.duben.roseplaylet.mvp.model.RecommendBannerList; import com.duben.roseplaylet.mvp.model.RecommendBannerList;
import com.duben.roseplaylet.mvp.model.SeeWechat; import com.duben.roseplaylet.mvp.model.SeeWechat;
import com.duben.roseplaylet.mvp.model.ShareRankList;
import com.duben.roseplaylet.mvp.model.UserProfileData; import com.duben.roseplaylet.mvp.model.UserProfileData;
import com.duben.roseplaylet.mvp.model.UserProfileDataInfo;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.duben.roseplaylet.BuildConfig; import com.duben.roseplaylet.BuildConfig;
import com.duben.roseplaylet.mvp.model.BannerList; import com.duben.roseplaylet.mvp.model.BannerList;
...@@ -422,7 +424,7 @@ public interface LoanService { ...@@ -422,7 +424,7 @@ public interface LoanService {
* 查看资料 * 查看资料
*/ */
@POST("roseApi/user/info") @POST("roseApi/user/info")
Observable<BaseResponse<UserProfileData>> getUserInfo(); Observable<BaseResponse<UserProfileDataInfo>> getUserInfo();
/** /**
* 编辑资料 * 编辑资料
...@@ -484,6 +486,24 @@ public interface LoanService { ...@@ -484,6 +486,24 @@ public interface LoanService {
@POST("roseApi/share/sharePageMsg") @POST("roseApi/share/sharePageMsg")
Observable<BaseResponse<JsonObject>> getSharePageMsg(); Observable<BaseResponse<JsonObject>> getSharePageMsg();
/**
* 邀请页排行榜
*/
@POST("roseApi/share/orders")
Observable<BaseResponse<ShareRankList>> getShareOrders();
/**
* 修改邀请我的分享码
*/
@POST("roseApi/user/updateRuserShareCode")
Observable<BaseResponse<JsonObject>> updateRuserShareCode(@Body Object obj);
/**
* 是否已经绑定分享码
*/
@POST("roseApi/user/getRuserShareCode")
Observable<BaseResponse<JsonObject>> getRuserShareCode();
/** /**
* 查看图片 * 查看图片
*/ */
......
...@@ -20,7 +20,6 @@ import com.duben.roseplaylet.mvp.presenters.BasicUserProfilePresenter ...@@ -20,7 +20,6 @@ import com.duben.roseplaylet.mvp.presenters.BasicUserProfilePresenter
import com.duben.roseplaylet.mvp.views.BasicUserProfileView import com.duben.roseplaylet.mvp.views.BasicUserProfileView
import com.duben.roseplaylet.ui.widgets.pick.SinglePickDialog import com.duben.roseplaylet.ui.widgets.pick.SinglePickDialog
import com.duben.roseplaylet.utils.GlideEngine import com.duben.roseplaylet.utils.GlideEngine
import com.duben.roseplaylet.utils.ToastUtil
import com.duben.roseplaylet.utils.UcropUtils import com.duben.roseplaylet.utils.UcropUtils
import com.luck.picture.lib.PictureSelector import com.luck.picture.lib.PictureSelector
import com.luck.picture.lib.compress.Luban import com.luck.picture.lib.compress.Luban
...@@ -47,7 +46,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -47,7 +46,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
private var avatarUrl: String? = null private var avatarUrl: String? = null
private var sex: String? = null private var sex: Int = -1
private val basicUserProfilePresenter by lazy { BasicUserProfilePresenter() } private val basicUserProfilePresenter by lazy { BasicUserProfilePresenter() }
...@@ -74,9 +73,9 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -74,9 +73,9 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
private fun initView() { private fun initView() {
rg_sex.setOnCheckedChangeListener { _, checkedId -> rg_sex.setOnCheckedChangeListener { _, checkedId ->
sex = if (checkedId == rb_female.id) { sex = if (checkedId == rb_female.id) {
"2" 2
} else { } else {
"1" 1
} }
} }
} }
...@@ -107,12 +106,12 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -107,12 +106,12 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
showToast("请输入年龄!") showToast("请输入年龄!")
return return
} }
if (TextUtils.isEmpty(sex)) { if (sex == 1 || sex == 2) {
showToast("请选择性别!") showToast("请选择性别!")
return return
} }
basicUserProfilePresenter.initBasicInfo("$age-1-1", nickname, sex!!, avatarUrl!!) basicUserProfilePresenter.initBasicInfo("$age-1-1", nickname, sex, avatarUrl!!)
} }
} }
} }
...@@ -156,12 +155,10 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -156,12 +155,10 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
} }
override fun initBasicSuc() { override fun initBasicSuc() {
ToastUtil.show(this, "initBasicSuc") finish()
} }
override fun initBasicFail() { override fun initBasicFail() {}
ToastUtil.show(this, "initBasicFail")
}
private fun showAlbum() { private fun showAlbum() {
val windowAnimationStyle = PictureWindowAnimationStyle() val windowAnimationStyle = PictureWindowAnimationStyle()
......
...@@ -11,24 +11,27 @@ import android.view.View ...@@ -11,24 +11,27 @@ import android.view.View
import android.widget.EditText import android.widget.EditText
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.bigkoo.pickerview.builder.OptionsPickerBuilder import com.bigkoo.pickerview.builder.OptionsPickerBuilder
import com.duben.library.utils.GlideUtils import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.Constant import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.common.OssType import com.duben.roseplaylet.common.OssType
import com.duben.roseplaylet.common.UserProfile import com.duben.roseplaylet.common.UserProfile
import com.duben.roseplaylet.manager.OssManager import com.duben.roseplaylet.manager.OssManager
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.mvp.model.* import com.duben.roseplaylet.mvp.model.*
import com.duben.roseplaylet.mvp.presenters.EditProfilePresenter import com.duben.roseplaylet.mvp.presenters.EditProfilePresenter
import com.duben.roseplaylet.mvp.views.EditProfileView import com.duben.roseplaylet.mvp.views.EditProfileView
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.roseplaylet.ui.adapter.ProfileLabelAdapter
import com.duben.roseplaylet.ui.widgets.pick.SinglePickDialog import com.duben.roseplaylet.ui.widgets.pick.SinglePickDialog
import com.duben.roseplaylet.utils.AddressData import com.duben.roseplaylet.utils.AddressData
import com.duben.roseplaylet.utils.GlideEngine import com.duben.roseplaylet.utils.GlideEngine
import com.duben.roseplaylet.utils.JobData import com.duben.roseplaylet.utils.JobData
import com.duben.roseplaylet.utils.UcropUtils import com.duben.roseplaylet.utils.UcropUtils
import com.google.gson.Gson
import com.luck.picture.lib.PictureSelector import com.luck.picture.lib.PictureSelector
import com.luck.picture.lib.compress.Luban import com.luck.picture.lib.compress.Luban
import com.luck.picture.lib.config.PictureConfig import com.luck.picture.lib.config.PictureConfig
...@@ -47,7 +50,6 @@ import kotlinx.coroutines.MainScope ...@@ -47,7 +50,6 @@ import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import java.io.File import java.io.File
import java.util.ArrayList
class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileView { class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileView {
...@@ -74,14 +76,17 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -74,14 +76,17 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
private var addressOptions1Items: MutableList<JsonBean>? = mutableListOf() private var addressOptions1Items: MutableList<JsonBean>? = mutableListOf()
private var addressOptions2Items: MutableList<ArrayList<String>>? = mutableListOf() private var addressOptions2Items: MutableList<ArrayList<String>>? = mutableListOf()
private var gxbqAdapter: ProfileLabelAdapter? = null
private var xhdnstzAdapter: ProfileLabelAdapter? = null
private var avatarUrl = "" private var avatarUrl = ""
private var toUid = "" private var toUid = ""
private var userProfileData: UserProfileData? = null private var userProfileData: UserProfileData? = null
private val editProfilePresenter by lazy { EditProfilePresenter() } private val gson by lazy { Gson() }
private val userManager by lazy { UserManager.getInstance() } private val editProfilePresenter by lazy { EditProfilePresenter() }
override fun getContentViewLayoutID() = R.layout.activity_edit_profile override fun getContentViewLayoutID() = R.layout.activity_edit_profile
...@@ -120,7 +125,6 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -120,7 +125,6 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
} }
private fun initAddressData() { private fun initAddressData() {
MainScope().launch { MainScope().launch {
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
...@@ -144,21 +148,29 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -144,21 +148,29 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
private fun initData() { private fun initData() {
userProfileData?.let { userProfileData?.let {
if (it.sex == 1) {
initMale()
tvJyjm.text = it.interest
if (!TextUtils.isEmpty(it.tagsCommon)) {
val tagsList = gson.fromJson(it.tagsCommon, Array<String>::class.java)
gxbqAdapter?.setNewInstance(tagsList.toCollection(ArrayList()))
}
} else {
initFemale()
}
if (!TextUtils.isEmpty(it.findDescribe)) {
val tagsList = gson.fromJson(it.findDescribe, Array<String>::class.java)
xhdnstzAdapter?.setNewInstance(tagsList.toCollection(ArrayList()))
}
GlideUtils.loadImageView(this@EditProfileActivity, it.headerUrl, ivAvatar) GlideUtils.loadImageView(this@EditProfileActivity, it.headerUrl, ivAvatar)
tvNickname.setText("" + it.nickName) tvNickname.setText("" + it.nickName)
tvSign.text = it.introduce tvSign.text = it.introduce
tvJyjm.text = it.interest
tvAge.text = it.birthday tvAge.text = it.birthday
tvJob.text = it.career tvJob.text = it.career
tvHeight.text = it.userHeight tvHeight.text = it.userHeight
tvWeight.text = it.bodyWeight tvWeight.text = it.bodyWeight
tvJyfw.text = it.findCity tvJyfw.text = it.findCity
if (userManager.userSex == "1") {
initMale()
} else {
initFemale()
}
} }
} }
...@@ -191,23 +203,36 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -191,23 +203,36 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
layout_jyjm.visibility = View.VISIBLE layout_jyjm.visibility = View.VISIBLE
layout_jyjm.findViewById<TextView>(R.id.label_start).text = UserProfile.PROFILE_JYJM.str layout_jyjm.findViewById<TextView>(R.id.label_start).text = UserProfile.PROFILE_JYJM.str
tvJyjm = layout_jyjm.findViewById(R.id.label_tv) tvJyjm = layout_jyjm.findViewById(R.id.label_tv)
if (!TextUtils.isEmpty("")) {
tvJyjm.text = ""
} else {
tvJyjm.text = "不详"
}
layout_jyjm.setOnClickListener(this) layout_jyjm.setOnClickListener(this)
// 喜欢的女生特质 // 喜欢的女生特质
layout_xhdnstz.visibility = View.VISIBLE layout_xhdnstz.visibility = View.VISIBLE
layout_xhdnstz.findViewById<TextView>(R.id.label_start).text = layout_xhdnstz.findViewById<TextView>(R.id.label_start).text =
UserProfile.SPECIAL_LIKE_FEMALE.str UserProfile.SPECIAL_LIKE_FEMALE.str
tvXhdnstz = layout_xhdnstz.findViewById(R.id.label_tv) tvXhdnstz = layout_xhdnstz.findViewById(R.id.label_tv)
if (!TextUtils.isEmpty("")) {
tvXhdnstz.text = ""
} else {
tvXhdnstz.text = "不详"
}
layout_xhdnstz.setOnClickListener(this) layout_xhdnstz.setOnClickListener(this)
initXhdnstzRcy()
}
private fun initGxbqRcy() {
val recyclerView = layout_gxbq.findViewById<RecyclerView>(R.id.rv_basic)
gxbqAdapter = ProfileLabelAdapter()
val linearLayoutManager = LinearLayoutManager(this)
linearLayoutManager.orientation = RecyclerView.HORIZONTAL
recyclerView.visibility = View.VISIBLE
recyclerView.layoutManager = linearLayoutManager
recyclerView.adapter = gxbqAdapter
}
private fun initXhdnstzRcy() {
val recyclerView = layout_xhdnstz.findViewById<RecyclerView>(R.id.rv_basic)
xhdnstzAdapter = ProfileLabelAdapter()
val linearLayoutManager = LinearLayoutManager(this)
linearLayoutManager.orientation = RecyclerView.HORIZONTAL
recyclerView.visibility = View.VISIBLE
recyclerView.layoutManager = linearLayoutManager
recyclerView.adapter = xhdnstzAdapter
} }
private fun initView() { private fun initView() {
...@@ -289,19 +314,8 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -289,19 +314,8 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
// 个性标签 // 个性标签
layout_gxbq.findViewById<TextView>(R.id.label_start).text = UserProfile.PROFILE_GXBQ.str layout_gxbq.findViewById<TextView>(R.id.label_start).text = UserProfile.PROFILE_GXBQ.str
val gxbqTv = layout_gxbq.findViewById<TextView>(R.id.label_tv)
if (!TextUtils.isEmpty("")) {
gxbqTv.text = ""
} else {
gxbqTv.text = "不详"
}
layout_gxbq.setOnClickListener(this) layout_gxbq.setOnClickListener(this)
initGxbqRcy()
// if (userManager.userSex == "1") {
// initMale()
// } else {
// initFemale()
// }
} }
private fun getPickerData(pickerType: String): MutableList<PickBean> { private fun getPickerData(pickerType: String): MutableList<PickBean> {
...@@ -674,24 +688,32 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -674,24 +688,32 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
Constant.USER_LABEL_REQUEST_CODE -> { Constant.USER_LABEL_REQUEST_CODE -> {
val sbLabel = data?.getStringExtra(Constant.USER_LABEL_DATA) val sbLabel = data?.getStringExtra(Constant.USER_LABEL_DATA)
showToast(sbLabel)
userProfileData?.tagsCommon = sbLabel userProfileData?.tagsCommon = sbLabel
if (!TextUtils.isEmpty(userProfileData?.tagsCommon)) {
val tagsList =
gson.fromJson(userProfileData?.tagsCommon, Array<String>::class.java)
gxbqAdapter?.setNewInstance(tagsList.toCollection(ArrayList()))
}
} }
Constant.LIKE_FEMALE_LABEL_REQUEST_CODE -> { Constant.LIKE_FEMALE_LABEL_REQUEST_CODE -> {
val sbLabel = data?.getStringExtra(Constant.USER_LABEL_DATA) val sbLabel = data?.getStringExtra(Constant.USER_LABEL_DATA)
showToast(sbLabel)
userProfileData?.findDescribe = sbLabel userProfileData?.findDescribe = sbLabel
if (!TextUtils.isEmpty(userProfileData?.findDescribe)) {
val tagsList =
gson.fromJson(userProfileData?.findDescribe, Array<String>::class.java)
xhdnstzAdapter?.setNewInstance(tagsList.toCollection(ArrayList()))
}
} }
Constant.EDIT_PROFILE_CODE -> { Constant.EDIT_PROFILE_CODE -> {
val signature = data?.getStringExtra(Constant.EDIT_PROFILE_SIGNATURE_STR) val signature = data?.getStringExtra(Constant.EDIT_PROFILE_SIGNATURE_STR)
userProfileData?.interest = signature userProfileData?.introduce = signature
tvSign.text = signature tvSign.text = signature
} }
} }
} }
override fun getUserInfoSuc(data: UserProfileData) { override fun getUserInfoSuc(data: UserProfileDataInfo) {
this.userProfileData = data this.userProfileData = data.info
initData() initData()
} }
...@@ -700,6 +722,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -700,6 +722,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
override fun setUserInfoSuc() { override fun setUserInfoSuc() {
showToast("资料保存成功!") showToast("资料保存成功!")
finish()
} }
override fun setUserInfoFail() {} override fun setUserInfoFail() {}
......
...@@ -120,9 +120,7 @@ class MainActivity : BaseActivity(), View.OnClickListener { ...@@ -120,9 +120,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
when (view.id) { when (view.id) {
R.id.tab_rl_video -> clickTab1Layout() R.id.tab_rl_video -> clickTab1Layout()
R.id.tab_rl_square -> { R.id.tab_rl_square -> clickTab2Layout()
clickTab2Layout()
}
R.id.tab_rl_invite -> clickTab3Layout() R.id.tab_rl_invite -> clickTab3Layout()
R.id.tab_rl_msg -> clickTab4Layout() R.id.tab_rl_msg -> clickTab4Layout()
R.id.tab_rl_my -> clickTab5Layout() R.id.tab_rl_my -> clickTab5Layout()
...@@ -175,11 +173,15 @@ class MainActivity : BaseActivity(), View.OnClickListener { ...@@ -175,11 +173,15 @@ class MainActivity : BaseActivity(), View.OnClickListener {
* 点击第三个tab * 点击第三个tab
*/ */
fun clickTab3Layout() { fun clickTab3Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE // AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE
if (inviteFragment == null) { // if (inviteFragment == null) {
inviteFragment = InviteFragment() // inviteFragment = InviteFragment()
} // }
addOrShowFragment(supportFragmentManager.beginTransaction(), inviteFragment!!) // addOrShowFragment(supportFragmentManager.beginTransaction(), inviteFragment!!)
readyGo(ShareActivity::class.java)
tab_iv_video.isSelected = false tab_iv_video.isSelected = false
tab_tv_video.isSelected = false tab_tv_video.isSelected = false
tab_iv_square.isSelected = false tab_iv_square.isSelected = false
......
...@@ -12,6 +12,7 @@ import com.duben.library.utils.GlideUtils ...@@ -12,6 +12,7 @@ import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.common.OssType import com.duben.roseplaylet.common.OssType
import com.duben.roseplaylet.common.UserProfile import com.duben.roseplaylet.common.UserProfile
import com.duben.roseplaylet.manager.FaceVerifyHelper import com.duben.roseplaylet.manager.FaceVerifyHelper
...@@ -24,6 +25,7 @@ import com.duben.roseplaylet.mvp.views.RealAuthView ...@@ -24,6 +25,7 @@ import com.duben.roseplaylet.mvp.views.RealAuthView
import com.duben.roseplaylet.ui.widgets.pick.MultiPickDialog import com.duben.roseplaylet.ui.widgets.pick.MultiPickDialog
import com.duben.roseplaylet.ui.widgets.pick.SinglePickDialog import com.duben.roseplaylet.ui.widgets.pick.SinglePickDialog
import com.duben.roseplaylet.utils.GlideEngine import com.duben.roseplaylet.utils.GlideEngine
import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.UcropUtils import com.duben.roseplaylet.utils.UcropUtils
import com.luck.picture.lib.PictureSelector import com.luck.picture.lib.PictureSelector
import com.luck.picture.lib.compress.Luban import com.luck.picture.lib.compress.Luban
...@@ -42,11 +44,6 @@ import java.io.File ...@@ -42,11 +44,6 @@ import java.io.File
class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
companion object {
const val USER_LABEL_REQUEST_CODE = 0x00003234
const val USER_LABEL_DATA = "USER_LABEL_DATA"
}
private val realAuthPresenter by lazy { RealAuthPresenter() } private val realAuthPresenter by lazy { RealAuthPresenter() }
private var mStep = 1 private var mStep = 1
...@@ -147,7 +144,7 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -147,7 +144,7 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
showPickDialog(UserProfile.PROFILE_ZY.str, "") showPickDialog(UserProfile.PROFILE_ZY.str, "")
} }
R.id.layout_gxbq -> { R.id.layout_gxbq -> {
readyGoForResult(UserLabelActivity::class.java, USER_LABEL_REQUEST_CODE) readyGoForResult(UserLabelActivity::class.java, Constant.USER_LABEL_REQUEST_CODE)
} }
} }
} }
...@@ -160,6 +157,8 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -160,6 +157,8 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
tv_step_2.setBackgroundResource(R.drawable.shape_bg_market) tv_step_2.setBackgroundResource(R.drawable.shape_bg_market)
tv_step_3.setBackgroundResource(R.drawable.shape_bg_market) tv_step_3.setBackgroundResource(R.drawable.shape_bg_market)
tv_step_4.setBackgroundResource(R.drawable.shape_bg_market) tv_step_4.setBackgroundResource(R.drawable.shape_bg_market)
isWechatQrCodeUrl = false
// ll_step1.visibility = View.VISIBLE // ll_step1.visibility = View.VISIBLE
// ll_step3.visibility = View.GONE // ll_step3.visibility = View.GONE
// ll_step4.visibility = View.GONE // ll_step4.visibility = View.GONE
...@@ -210,8 +209,6 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -210,8 +209,6 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
return return
} }
} }
} }
4 -> { 4 -> {
if (TextUtils.isEmpty(wechatQrCodeUrl)) { if (TextUtils.isEmpty(wechatQrCodeUrl)) {
...@@ -464,6 +461,14 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -464,6 +461,14 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
readAuthImageUrl = imgPath!! readAuthImageUrl = imgPath!!
} }
LogUtil.d("AAAAAAA" + readAuthImageUrl)
GlideUtils.loadImageViewNoAnim2(
this@RealAuthActivity,
readAuthImageUrl,
iv_auth
)
} }
} }
}) })
...@@ -523,8 +528,8 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -523,8 +528,8 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
} }
} else if (resultCode == UCrop.RESULT_ERROR) { } else if (resultCode == UCrop.RESULT_ERROR) {
showToast("裁剪失败,请再试一下") showToast("裁剪失败,请再试一下")
} else if (resultCode == USER_LABEL_REQUEST_CODE) { } else if (resultCode == Constant.USER_LABEL_REQUEST_CODE) {
val arrayExtra = data?.getStringArrayExtra(USER_LABEL_DATA) val arrayExtra = data?.getStringArrayExtra(Constant.USER_LABEL_DATA)
} }
} }
......
package com.duben.roseplaylet.ui.activitys
import android.graphics.Color
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.mvp.model.ShareRankList
import com.duben.roseplaylet.mvp.presenters.InvitePresenter
import com.duben.roseplaylet.mvp.views.InviteView
import com.duben.roseplaylet.ui.adapter.ShareInviteAdapter
import com.duben.roseplaylet.ui.adapter.ShareRankAdapter
import com.duben.roseplaylet.ui.widgets.ShareDialog
import com.duben.roseplaylet.utils.SpanUtils
import com.duben.roseplaylet.utils.UcropUtils
import kotlinx.android.synthetic.main.activity_share.*
import kotlinx.android.synthetic.main.header_layout.*
class ShareActivity : BaseActivity(), View.OnClickListener, InviteView {
private var myShareUrl = ""
private val userManager by lazy { UserManager.getInstance() }
private val invitePresenter by lazy { InvitePresenter() }
private lateinit var mShareRankAdapter: ShareRankAdapter
private lateinit var mShareInviteAdapter: ShareInviteAdapter
override fun getContentViewLayoutID() = R.layout.activity_share
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
invitePresenter.attachView(this)
tv_title.text = "分享有奖"
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
line.visibility = View.GONE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
invitePresenter.getSharePageMsg()
invitePresenter.getShareOrders()
invitePresenter.getShareUrl()
invitePresenter.getRuserShareCode()
initView()
initListener()
}
private fun initView() {
tv_my_code.text = userManager.shareCode
// rcy_my_invite.adapter =
// tv_share_cash.text = SpanUtils()
// .append()
// .create()
mShareRankAdapter = ShareRankAdapter()
mShareRankAdapter.animationEnable = false
val emptyView = LayoutInflater.from(this).inflate(R.layout.item_empty_data, null)
mShareRankAdapter.setEmptyView(emptyView)
rcy_invite_top.adapter = mShareRankAdapter
mShareInviteAdapter = ShareInviteAdapter()
mShareInviteAdapter.animationEnable = false
val emptyView2 = LayoutInflater.from(this).inflate(R.layout.item_empty_data, null)
mShareInviteAdapter.setEmptyView(emptyView2)
rcy_my_invite.adapter = mShareInviteAdapter
}
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.tv_copy -> {
showToast("邀请码已复制到剪切板!")
UcropUtils.clipData(userManager.shareCode)
}
}
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
tv_copy.setOnClickListener(this)
}
/**
* 图片分享
*/
private fun shareImgDialog() {
val shareDialog = ShareDialog(this, myShareUrl)
shareDialog.setOnShareOKListener(object : ShareDialog.OnShareOKListener {
override fun onShareOk() {
}
})
val content = "送你一个赚钱的新模式,\r\n快点加入跟我一起赚钱吧"
shareDialog.setShareAvatar("https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_my_coin.png")
shareDialog.setShareTitle("Hi,我是用户" + userManager.name)
shareDialog.setShareContent(content)
shareDialog.show()
}
override fun onDestroy() {
super.onDestroy()
invitePresenter.detachView()
}
override fun getSharePageMsgSuc(
shareCode: String, rUserShareCode: String?,
) {
tv_my_code.text = shareCode
if (TextUtils.isEmpty(rUserShareCode)) {
et_code.isEnabled = true
} else {
et_code.isEnabled = false
et_code.setText(rUserShareCode!!)
}
}
override fun getSharePageMsgFail() {
}
override fun getShareOrderSuc(data: ShareRankList) {
mShareRankAdapter.setNewInstance(data.list)
}
override fun getShareOrderFail() {
}
override fun getShareUrlSuc(url: String) {
myShareUrl = url
}
override fun getShareUrlSucFail() {
}
override fun getRuserShareCodeSuc(data: Any) {
}
override fun getRuserShareCodeSucFail() {
}
}
...@@ -3,7 +3,6 @@ package com.duben.roseplaylet.ui.activitys ...@@ -3,7 +3,6 @@ package com.duben.roseplaylet.ui.activitys
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils
import android.view.View import android.view.View
import com.duben.library.utils.nodoubleclick.AntiShake import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R import com.duben.roseplaylet.R
...@@ -12,11 +11,14 @@ import com.duben.roseplaylet.common.UserProfile ...@@ -12,11 +11,14 @@ import com.duben.roseplaylet.common.UserProfile
import com.duben.roseplaylet.manager.UserManager import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.ui.activitys.base.BaseActivity import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.roseplaylet.ui.adapter.FlowTagAdapter import com.duben.roseplaylet.ui.adapter.FlowTagAdapter
import com.google.gson.Gson
import kotlinx.android.synthetic.main.activity_user_label.* import kotlinx.android.synthetic.main.activity_user_label.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
class UserLabelActivity : BaseActivity(), View.OnClickListener { class UserLabelActivity : BaseActivity(), View.OnClickListener {
private val gson by lazy { Gson() }
private var userSex = UserManager.getInstance().userSex private var userSex = UserManager.getInstance().userSex
companion object { companion object {
...@@ -71,7 +73,7 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener { ...@@ -71,7 +73,7 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
} else { } else {
tv_title.text = "个性标签" tv_title.text = "个性标签"
if (TextUtils.equals(userSex, "1")) { if (userSex == 1) {
initMale() initMale()
} else { } else {
initFeMale() initFeMale()
...@@ -161,30 +163,39 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener { ...@@ -161,30 +163,39 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
R.id.tv_right -> { R.id.tv_right -> {
val labelData = arrayListOf<String>() val labelData = arrayListOf<String>()
for (i in 0 until usualData.size) { if (!isLikeFemale) {
for (j in flowlayout_usual.selectedList) { for (i in 0 until usualData.size) {
if (i == j) { for (j in flowlayout_usual.selectedList) {
labelData.add(usualData[i]) if (i == j) {
labelData.add(usualData[i])
}
} }
} }
} for (i in 0 until specialData.size) {
for (i in 0 until specialData.size) { for (j in flowlayout_special.selectedList) {
for (j in flowlayout_special.selectedList) { if (i == j) {
if (i == j) { labelData.add(specialData[i])
labelData.add(specialData[i]) }
}
}
} else {
for (i in 0 until likeData.size) {
for (j in flowlayout_usual.selectedList) {
if (i == j) {
labelData.add(likeData[i])
}
} }
} }
}
val sb = StringBuilder()
for (label in labelData) {
sb.append("$label,")
} }
val resultIntent = Intent() val resultIntent = Intent()
resultIntent.putExtra(RealAuthActivity.USER_LABEL_DATA, sb.toString()) resultIntent.putExtra(Constant.USER_LABEL_DATA, gson.toJson(labelData))
setResult(RealAuthActivity.USER_LABEL_REQUEST_CODE, resultIntent) if (isLikeFemale) {
onBackPressed() setResult(Constant.LIKE_FEMALE_LABEL_REQUEST_CODE, resultIntent)
} else {
setResult(Constant.USER_LABEL_REQUEST_CODE, resultIntent)
}
finish()
} }
} }
} }
......
...@@ -29,6 +29,7 @@ import com.duben.roseplaylet.ui.adapter.UserProfileAlbumAdapter ...@@ -29,6 +29,7 @@ import com.duben.roseplaylet.ui.adapter.UserProfileAlbumAdapter
import com.duben.roseplaylet.ui.adapter.base.OnItemClickListener import com.duben.roseplaylet.ui.adapter.base.OnItemClickListener
import com.duben.roseplaylet.ui.preview.ImagePreviewActivity import com.duben.roseplaylet.ui.preview.ImagePreviewActivity
import com.duben.roseplaylet.ui.widgets.* import com.duben.roseplaylet.ui.widgets.*
import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.ToastUtil import com.duben.roseplaylet.utils.ToastUtil
import com.duben.roseplaylet.utils.UcropUtils import com.duben.roseplaylet.utils.UcropUtils
import com.google.android.material.appbar.AppBarLayout import com.google.android.material.appbar.AppBarLayout
...@@ -95,8 +96,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -95,8 +96,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} else { } else {
// 女性 // 女性
view_male.visibility = View.GONE view_male.visibility = View.GONE
tv_like_male.visibility = View.VISIBLE tv_like_male.visibility = View.GONE
tv_wechat.visibility = View.GONE tv_wechat.visibility = View.VISIBLE
rl_top_female.visibility = View.VISIBLE rl_top_female.visibility = View.VISIBLE
fl_head_male.visibility = View.GONE fl_head_male.visibility = View.GONE
tv_days.visibility = View.GONE tv_days.visibility = View.GONE
...@@ -132,7 +133,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -132,7 +133,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
IMHelper.instance.startChatActivity("" + it.uid) IMHelper.instance.startChatActivity("" + it.uid)
return return
} }
if (userIsMale) { // 自己是不是男性
if (UserManager.getInstance().userSex == 1) {
// 男性 非VIP 弹解锁聊天弹框 // 男性 非VIP 弹解锁聊天弹框
showUnlockChatDialog() showUnlockChatDialog()
} else { } else {
...@@ -340,7 +342,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -340,7 +342,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
override fun unlockInfoByCoinSuc() { override fun unlockInfoByCoinSuc() {
// 解锁金币资料后刷新页面 // 解锁金币资料后刷新页面
userProfilePresenter.getMorePage(toUid) // userProfilePresenter.getMorePage(toUid)
} }
override fun unlockWechatSuc() { override fun unlockWechatSuc() {
...@@ -385,7 +387,6 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -385,7 +387,6 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
when (v?.id) { when (v?.id) {
R.id.tv_send_btn -> { R.id.tv_send_btn -> {
// //
} }
R.id.tv_copy -> { R.id.tv_copy -> {
ToastUtil.show(MintsApplication.getContext(), "微信已复制到剪切板!") ToastUtil.show(MintsApplication.getContext(), "微信已复制到剪切板!")
...@@ -393,7 +394,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -393,7 +394,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
} }
} }
}) }).show()
} }
} }
...@@ -413,7 +414,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -413,7 +414,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
else -> {} else -> {}
} }
} }
}) }).show()
} }
} }
...@@ -433,7 +434,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -433,7 +434,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
else -> {} else -> {}
} }
} }
}) }).show()
} }
} }
......
...@@ -58,6 +58,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base ...@@ -58,6 +58,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
|| TextUtils.equals(getClass().getSimpleName(), "UserProfileActivity") || TextUtils.equals(getClass().getSimpleName(), "UserProfileActivity")
|| TextUtils.equals(getClass().getSimpleName(), "MainActivity") || TextUtils.equals(getClass().getSimpleName(), "MainActivity")
|| TextUtils.equals(getClass().getSimpleName(), "AlbumActivity") || TextUtils.equals(getClass().getSimpleName(), "AlbumActivity")
|| TextUtils.equals(getClass().getSimpleName(), "ShareActivity")
) { ) {
setDarkStatusBar(); setDarkStatusBar();
} else { } else {
......
package com.duben.roseplaylet.ui.adapter
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.roseplaylet.R
class ProfileLabelAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_profile_label) {
override fun convert(holder: BaseViewHolder, item: String) {
holder.getView<TextView>(R.id.tv_label).text = item
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.adapter
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.*
class ShareInviteAdapter : BaseQuickAdapter<ShareInvite, BaseViewHolder>(R.layout.item_share_invite) {
override fun convert(holder: BaseViewHolder, item: ShareInvite) {
holder.getView<TextView>(R.id.tv_name).text = item.nickName
holder.getView<TextView>(R.id.tv_sex).text = "" + item.sex
holder.getView<TextView>(R.id.tv_status).text = "" + item.status
holder.getView<TextView>(R.id.tv_reward).text = "" + item.cash
GlideUtils.loadImageView(context, item.head, holder.getView(R.id.iv_avatar))
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.adapter
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.*
class ShareRankAdapter : BaseQuickAdapter<ShareRank, BaseViewHolder>(R.layout.item_share_rank) {
override fun convert(holder: BaseViewHolder, item: ShareRank) {
holder.getView<TextView>(R.id.tv_nickname).text = item.nick
holder.getView<TextView>(R.id.tv_invite_count).text = "" + item.share
holder.getView<TextView>(R.id.tv_reward).text = "" + item.rewardCash
holder.getView<TextView>(R.id.tv_rank_count).text = "" + holder.adapterPosition
GlideUtils.loadImageView(context, item.head, holder.getView(R.id.iv_avatar))
}
}
\ No newline at end of file
...@@ -7,8 +7,6 @@ import com.duben.roseplaylet.common.AppConfig ...@@ -7,8 +7,6 @@ import com.duben.roseplaylet.common.AppConfig
import com.duben.roseplaylet.common.Constant import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.manager.UserManager import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.mvp.model.VedioBean import com.duben.roseplaylet.mvp.model.VedioBean
import com.duben.roseplaylet.mvp.presenters.InvitePresenter
import com.duben.roseplaylet.mvp.views.InviteView
import com.duben.roseplaylet.ui.adapter.InviteAdapter import com.duben.roseplaylet.ui.adapter.InviteAdapter
import com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment import com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.duben.roseplaylet.ui.widgets.ShareDialog import com.duben.roseplaylet.ui.widgets.ShareDialog
...@@ -19,9 +17,7 @@ import kotlinx.android.synthetic.main.fragment_main_invite.* ...@@ -19,9 +17,7 @@ import kotlinx.android.synthetic.main.fragment_main_invite.*
* 作者:孟崔广 * 作者:孟崔广
* 时间:2023/12/27 11:30 * 时间:2023/12/27 11:30
*/ */
class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener { class InviteFragment : LazyLoadBaseFragment(), View.OnClickListener {
private val invitePresenter by lazy { InvitePresenter() }
private val userManager by lazy { UserManager.getInstance() } private val userManager by lazy { UserManager.getInstance() }
private var inviteAdapter: InviteAdapter? = null private var inviteAdapter: InviteAdapter? = null
...@@ -30,7 +26,6 @@ class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener ...@@ -30,7 +26,6 @@ class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener
override fun getContentViewLayoutID() = R.layout.fragment_main_invite override fun getContentViewLayoutID() = R.layout.fragment_main_invite
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
invitePresenter.attachView(this)
btn_invite.setOnClickListener(this) btn_invite.setOnClickListener(this)
} }
...@@ -43,7 +38,6 @@ class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener ...@@ -43,7 +38,6 @@ class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
invitePresenter.detachView()
} }
override fun onFragmentResume() { override fun onFragmentResume() {
...@@ -73,15 +67,16 @@ class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener ...@@ -73,15 +67,16 @@ class InviteFragment : LazyLoadBaseFragment(), InviteView, View.OnClickListener
* 图片分享 * 图片分享
*/ */
private fun shareImgDialog() { private fun shareImgDialog() {
val shareDialog = ShareDialog(requireActivity()) // val shareDialog = ShareDialog(requireActivity(),)
shareDialog.setOnShareOKListener(object : ShareDialog.OnShareOKListener { // shareDialog.setOnShareOKListener(object : ShareDialog.OnShareOKListener {
override fun onShareOk() { // override fun onShareOk() {
} // }
}) // })
val content = "送你一个赚钱的新模式,\r\n快点加入跟我一起赚钱吧" // val content = "送你一个赚钱的新模式,\r\n快点加入跟我一起赚钱吧"
shareDialog.setShareAvatar("https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_my_coin.png") // shareDialog.setShareAvatar("https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_my_coin.png")
shareDialog.setShareTitle("Hi,我是用户" + userManager.codeId) // shareDialog.setShareTitle("Hi,我是用户" + userManager.codeId)
shareDialog.setShareContent(content) // shareDialog.setShareContent(content)
shareDialog.show() // shareDialog.show()
} }
} }
\ No newline at end of file
...@@ -91,9 +91,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -91,9 +91,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
} }
R.id.ll_my_setting -> { R.id.ll_my_setting -> {
// readyGo(SettingsActivity::class.java) // readyGo(SettingsActivity::class.java)
// readyGo(RealAuthActivity::class.java) readyGo(RealAuthActivity::class.java)
// readyGo(BasicUserProfileActivity::class.java)
readyGo(AlbumActivity::class.java)
} }
R.id.tv_my_account, R.id.ll_my_login -> { R.id.tv_my_account, R.id.ll_my_login -> {
if (!userManager.userIsLogin()) { if (!userManager.userIsLogin()) {
......
...@@ -15,7 +15,7 @@ class RealAuthDialog(private val context: Context) : Dialog( ...@@ -15,7 +15,7 @@ class RealAuthDialog(private val context: Context) : Dialog(
context, R.style.dialog context, R.style.dialog
) { ) {
private val lp: WindowManager.LayoutParams private val lp: WindowManager.LayoutParams
private val iv_phone_dialog_quit: ImageView private val iv_close: ImageView
private val tv_to_auth: TextView private val tv_to_auth: TextView
init { init {
...@@ -34,9 +34,9 @@ class RealAuthDialog(private val context: Context) : Dialog( ...@@ -34,9 +34,9 @@ class RealAuthDialog(private val context: Context) : Dialog(
// 查找View // 查找View
iv_phone_dialog_quit = findViewById(R.id.iv_phone_dialog_quit) iv_close = findViewById(R.id.iv_close)
tv_to_auth = findViewById(R.id.tv_to_auth) tv_to_auth = findViewById(R.id.tv_to_auth)
iv_phone_dialog_quit.setOnClickListener { iv_close.setOnClickListener {
dismiss() dismiss()
} }
tv_to_auth.setOnClickListener { tv_to_auth.setOnClickListener {
......
...@@ -30,7 +30,10 @@ import com.duben.roseplaylet.utils.ToastUtil ...@@ -30,7 +30,10 @@ import com.duben.roseplaylet.utils.ToastUtil
import java.util.* import java.util.*
import kotlin.concurrent.schedule import kotlin.concurrent.schedule
class ShareDialog(context: Context) : Dialog(context, R.style.dialog) { class ShareDialog(
context: Context,
shareUrl: String
) : Dialog(context, R.style.dialog) {
private val llDialogShareWx: LinearLayout private val llDialogShareWx: LinearLayout
private val llDialogShareQq: LinearLayout private val llDialogShareQq: LinearLayout
...@@ -74,8 +77,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) { ...@@ -74,8 +77,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
viewPager = findViewById(R.id.view_pager) viewPager = findViewById(R.id.view_pager)
viewPager.pageMargin = BubbleUtils.dp2px(30) viewPager.pageMargin = BubbleUtils.dp2px(30)
val SHARE_URL: String = BuildConfig.MainIp + "share/relh.html?rcode=" + UserManager.getInstance().shareCode val QRCode = QRCodeUtil.createQRCode(shareUrl, 50)
val QRCode = QRCodeUtil.createQRCode(SHARE_URL, 50)
val inflater = LayoutInflater.from(context) val inflater = LayoutInflater.from(context)
val view1 = inflater.inflate(R.layout.item_share_view, null) val view1 = inflater.inflate(R.layout.item_share_view, null)
val view2 = inflater.inflate(R.layout.item_share_view, null) val view2 = inflater.inflate(R.layout.item_share_view, null)
...@@ -96,7 +98,11 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) { ...@@ -96,7 +98,11 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
cb1.isChecked = true cb1.isChecked = true
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { override fun onPageScrolled(
position: Int,
positionOffset: Float,
positionOffsetPixels: Int
) {
} }
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
...@@ -192,7 +198,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) { ...@@ -192,7 +198,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
wechatSp.shareType = Platform.SHARE_IMAGE wechatSp.shareType = Platform.SHARE_IMAGE
wechatSp.imageData = bitmap wechatSp.imageData = bitmap
if (ConstantUtil.isInstall(context,"com.tencent.mm")) { if (ConstantUtil.isInstall(context, "com.tencent.mm")) {
wechat.platformActionListener = object : PlatformActionListener { wechat.platformActionListener = object : PlatformActionListener {
override fun onComplete(p0: Platform?, p1: Int, p2: HashMap<String, Any>?) { override fun onComplete(p0: Platform?, p1: Int, p2: HashMap<String, Any>?) {
mOnShareCompleteListener?.onShareComplete() mOnShareCompleteListener?.onShareComplete()
...@@ -228,7 +234,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) { ...@@ -228,7 +234,7 @@ class ShareDialog(context: Context) : Dialog(context, R.style.dialog) {
wechatSp.shareType = Platform.SHARE_IMAGE wechatSp.shareType = Platform.SHARE_IMAGE
wechatSp.imageData = bitmap wechatSp.imageData = bitmap
if (ConstantUtil.isInstall(context,"com.tencent.mm")) { if (ConstantUtil.isInstall(context, "com.tencent.mm")) {
wechatMoments.platformActionListener = object : PlatformActionListener { wechatMoments.platformActionListener = object : PlatformActionListener {
override fun onComplete(p0: Platform?, p1: Int, p2: HashMap<String, Any>?) { override fun onComplete(p0: Platform?, p1: Int, p2: HashMap<String, Any>?) {
mOnShareCompleteListener?.onShareComplete() mOnShareCompleteListener?.onShareComplete()
......
...@@ -19,6 +19,7 @@ class UnlockChatDialog( ...@@ -19,6 +19,7 @@ class UnlockChatDialog(
Dialog(context, R.style.dialog) { Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams private val lp: WindowManager.LayoutParams
private val tv_unlock: TextView
private val tv_vip_btn: TextView private val tv_vip_btn: TextView
private val tv_vip_coin: TextView private val tv_vip_coin: TextView
private val iv_close: ImageView private val iv_close: ImageView
...@@ -38,11 +39,14 @@ class UnlockChatDialog( ...@@ -38,11 +39,14 @@ class UnlockChatDialog(
setCanceledOnTouchOutside(false) setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK } setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
tv_unlock = findViewById<View>(R.id.tv_unlock) as TextView
tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView 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_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView
iv_close = findViewById<View>(R.id.iv_close) as ImageView iv_close = findViewById<View>(R.id.iv_close) as ImageView
iv_avatar = findViewById<View>(R.id.iv_avatar) as ImageView iv_avatar = findViewById<View>(R.id.iv_avatar) as ImageView
tv_unlock.text = "解锁私聊"
GlideUtils.loadImageView(context, headUrl, iv_avatar) GlideUtils.loadImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener { iv_close.setOnClickListener {
......
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
<include <include
android:id="@+id/layout_jyjm" android:id="@+id/layout_jyjm"
layout="@layout/layout_basic_text" /> layout="@layout/layout_basic_text"
android:visibility="gone" />
<include <include
android:id="@+id/layout_gxbq" android:id="@+id/layout_gxbq"
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/ll_step_progress" android:layout_below="@id/ll_step_progress"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"> android:visibility="visible">
<TextView <TextView
android:id="@+id/tv_photo" android:id="@+id/tv_photo"
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
android:id="@+id/iv_auth" android:id="@+id/iv_auth"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="100dp" android:layout_height="100dp"
android:layout_marginStart="30dp" android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:src="@drawable/iv_add_images_add" /> android:src="@drawable/iv_add_images_add" />
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
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="20dp" android:layout_marginTop="50dp"
android:text="头像规范" android:text="头像规范"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" /> android:textSize="16sp" />
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="30dp"
android:src="@mipmap/bg_manage_order_content" /> android:src="@mipmap/bg_manage_order_content" />
</LinearLayout> </LinearLayout>
...@@ -143,7 +144,7 @@ ...@@ -143,7 +144,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/ll_step_progress" android:layout_below="@id/ll_step_progress"
android:orientation="vertical" android:orientation="vertical"
android:visibility="visible"> android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_232122"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/bg_vip_1"
android:visibility="gone" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我的邀请码"
android:textColor="@color/white"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_my_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:textColor="@color/color_DB6572"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_copy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_green"
android:paddingStart="15dp"
android:paddingTop="6dp"
android:paddingEnd="15dp"
android:paddingBottom="6dp"
android:text="复制"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="15dp">
<TextView
android:id="@+id/tv_share_img"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:background="@drawable/shape_profile_chat"
android:gravity="center"
android:text="分享海报"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_share_url"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/shape_profile_chat"
android:gravity="center"
android:text="分享链接"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_bg_write"
android:gravity="center_vertical"
android:paddingStart="15dp"
android:paddingEnd="10dp">
<EditText
android:id="@+id/et_code"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:hint="填写邀请码 (非必填)"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_bind"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="绑定"
android:textColor="@color/color_DB6572"
android:textSize="16sp" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_bg_write"
android:paddingTop="20dp"
android:paddingBottom="30dp">
<TextView
android:id="@+id/tv_reward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我的奖励"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_label_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="分享人数"
android:textColor="@color/gray"
android:textSize="14sp"
app:layout_constraintEnd_toStartOf="@id/tv_label_reward"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_reward" />
<TextView
android:id="@+id/tv_label_reward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="奖励"
android:textColor="@color/gray"
android:textSize="14sp"
app:layout_constraintEnd_toStartOf="@id/tv_label_cash"
app:layout_constraintStart_toEndOf="@id/tv_label_count"
app:layout_constraintTop_toBottomOf="@id/tv_reward" />
<TextView
android:id="@+id/tv_label_cash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="可提取"
android:textColor="@color/gray"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_label_reward"
app:layout_constraintTop_toBottomOf="@id/tv_reward" />
<TextView
android:id="@+id/tv_share_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="1人"
android:textColor="@color/gray"
android:textSize="10sp"
app:layout_constraintEnd_toStartOf="@id/tv_share_reward"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_label_count" />
<TextView
android:id="@+id/tv_share_reward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="0元"
android:textColor="@color/gray"
android:textSize="10sp"
app:layout_constraintEnd_toStartOf="@id/tv_share_cash"
app:layout_constraintStart_toEndOf="@id/tv_share_count"
app:layout_constraintTop_toBottomOf="@id/tv_label_count" />
<TextView
android:id="@+id/tv_share_cash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="0元"
android:textColor="@color/gray"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_share_reward"
app:layout_constraintTop_toBottomOf="@id/tv_label_count" />
<View
android:layout_width="1dp"
android:layout_height="50dp"
android:background="@color/color_F1F2F8"
app:layout_constraintBottom_toBottomOf="@id/tv_share_count"
app:layout_constraintEnd_toStartOf="@id/tv_label_reward"
app:layout_constraintStart_toEndOf="@id/tv_label_count"
app:layout_constraintTop_toTopOf="@id/tv_label_count" />
<View
android:layout_width="1dp"
android:layout_height="50dp"
android:background="@color/color_F1F2F8"
app:layout_constraintBottom_toBottomOf="@id/tv_share_cash"
app:layout_constraintEnd_toStartOf="@id/tv_label_cash"
app:layout_constraintStart_toEndOf="@id/tv_label_reward"
app:layout_constraintTop_toTopOf="@id/tv_label_cash" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_bg_write"
android:orientation="vertical"
android:paddingTop="20dp"
android:paddingBottom="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="我的邀请"
android:textColor="@color/black"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="20dp"
android:background="@color/color_D2D2D2"
android:gravity="center_vertical"
android:paddingStart="10dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:text="已邀请好友"
android:textColor="@color/gray"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="性别"
android:textColor="@color/gray"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="邀请状态"
android:textColor="@color/gray"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="提成(元)"
android:textColor="@color/gray"
android:textSize="14sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcy_my_invite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_bg_write"
android:orientation="vertical"
android:paddingTop="10dp"
android:paddingBottom="30dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="用户"
android:textColor="@color/gray"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="邀请人数(人)"
android:textColor="@color/gray"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="奖励金额(元)"
android:textColor="@color/gray"
android:textSize="14sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcy_invite_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</LinearLayout>
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
android:id="@+id/appbar" android:id="@+id/appbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_behavior=".ui.widgets.AppBarLayoutBehavior">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout" android:id="@+id/toolbar_layout"
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
android:layout_below="@id/ll_content" android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" /> android:src="@mipmap/ic_quit_white" />
</RelativeLayout> </RelativeLayout>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
android:layout_below="@id/ll_content" android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" /> android:src="@mipmap/ic_quit_white" />
</RelativeLayout> </RelativeLayout>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_unlock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="80dp" android:layout_marginTop="80dp"
...@@ -81,7 +82,7 @@ ...@@ -81,7 +82,7 @@
android:layout_below="@id/ll_content" android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" /> android:src="@mipmap/ic_quit_white" />
</RelativeLayout> </RelativeLayout>
......
...@@ -250,11 +250,11 @@ ...@@ -250,11 +250,11 @@
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:layout_marginBottom="120dp" android:layout_marginBottom="120dp"
android:visibility="gone" android:visibility="gone"
app:lottie_fileName="main_alipay.json"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent"
app:lottie_autoPlay="true"
app:lottie_fileName="main_alipay.json"
app:lottie_loop="true" />
<LinearLayout <LinearLayout
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="@color/color_232122">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
android:id="@+id/btn_invite" android:id="@+id/btn_invite"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:text="海报分享"></Button> android:text="海报分享" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -52,21 +53,20 @@ ...@@ -52,21 +53,20 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="邀请人数\n(人)"></TextView> android:text="邀请人数\n(人)" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="奖励金额\n(元)"></TextView> android:text="奖励金额\n(元)" />
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_invite" android:id="@+id/recy_invite"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/color_F1F2F8"
android:overScrollMode="never" android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
......
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:background="@drawable/shape_chat_tips"
android:gravity="center"
android:paddingStart="15dp"
android:paddingTop="2dp"
android:paddingEnd="15dp"
android:paddingBottom="2dp"
android:text="1"
android:textColor="@color/black"
android:textSize="12sp" />
\ 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="40dp"
android:layout_marginBottom="10dp"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1.5"
android:gravity="center_vertical">
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="6dp"
android:src="@mipmap/ic_my_avat" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_sex"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:textColor="@color/black"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:textColor="@color/black"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_reward"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<ImageView
android:id="@+id/iv_rank_count"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="10dp"
android:src="@mipmap/ic_call_wx"
android:visibility="gone" />
<TextView
android:id="@+id/tv_rank_count"
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="center"
android:text="1"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="6dp"
android:src="@mipmap/ic_my_avat" />
<TextView
android:id="@+id/tv_nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:gravity="center"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_invite_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="1000"
android:textColor="@color/black"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_reward"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="1000"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="60dp" android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="15dp" android:paddingStart="15dp"
android:paddingEnd="15dp"> android:paddingEnd="15dp">
<TextView <RelativeLayout
android:id="@+id/label_start" android:layout_width="match_parent"
android:layout_width="100dp" android:layout_height="60dp">
android:layout_height="wrap_content"
android:layout_centerVertical="true" <TextView
android:text="QQ" android:id="@+id/label_start"
android:textColor="@color/gray" android:layout_width="120dp"
android:textSize="18sp" /> android:layout_height="wrap_content"
android:layout_centerVertical="true"
<TextView android:text="QQ"
android:id="@+id/label_start2" android:textColor="@color/gray"
android:layout_width="100dp" android:textSize="18sp" />
android:layout_height="wrap_content"
android:layout_below="@id/label_start" <TextView
android:text="QQ" android:id="@+id/label_start2"
android:textColor="@color/gray" android:layout_width="120dp"
android:textSize="10sp" android:layout_height="wrap_content"
android:visibility="gone" /> android:layout_below="@id/label_start"
android:text="QQ"
android:textColor="@color/gray"
android:textSize="10sp"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/label_tv" android:id="@+id/label_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/label_start"
android:drawableEnd="@mipmap/ic_label_right"
android:gravity="end"
android:textColor="@color/white"
android:textSize="18sp" />
<View
style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_basic"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_marginTop="5dp"
android:layout_toEndOf="@id/label_start" android:visibility="gone" />
android:drawableEnd="@mipmap/ic_label_right"
android:gravity="end" </LinearLayout>
android:textColor="@color/white" \ No newline at end of file
android:textSize="18sp" />
<View
style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true" />
</RelativeLayout>
\ No newline at end of file
...@@ -23,8 +23,8 @@ android.nonTransitiveRClass=true ...@@ -23,8 +23,8 @@ android.nonTransitiveRClass=true
#DEBUG_URL="https://test.mints-id.com/camera-api/" #DEBUG_URL="https://test.mints-id.com/camera-api/"
#DEBUG_URL="http://cui.mints-id.com/" #DEBUG_URL="http://cui.mints-id.com/"
#DEBUG_URL="http://47.95.116.182:9886/" DEBUG_URL="http://47.95.116.182:9886/"
DEBUG_URL="https://api.mints-tech.cn/camera-api/" #DEBUG_URL="https://api.mints-tech.cn/camera-api/"
RELEASE_URL="https://api.mints-tech.cn/camera-api/" RELEASE_URL="https://api.mints-tech.cn/camera-api/"
RELEASE_KEY_PASSWORD=mintsroseplaylet RELEASE_KEY_PASSWORD=mintsroseplaylet
......
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