Commit 7ac6ad33 authored by 595163050's avatar 595163050

优化状态栏适配

parent ac61e180
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/android_vediosocial.iml" filepath="$PROJECT_DIR$/.idea/android_vediosocial.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -290,16 +290,16 @@ public abstract class BaseAppCompatActivity extends TransitionActivity { ...@@ -290,16 +290,16 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
* @param tintDrawable * @param tintDrawable
*/ */
protected void setSystemBarTintDrawable(Drawable tintDrawable) { protected void setSystemBarTintDrawable(Drawable tintDrawable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
SystemBarTintManager mTintManager = new SystemBarTintManager(this); // SystemBarTintManager mTintManager = new SystemBarTintManager(this);
if (tintDrawable != null) { // if (tintDrawable != null) {
mTintManager.setStatusBarTintEnabled(true); // mTintManager.setStatusBarTintEnabled(true);
mTintManager.setTintDrawable(tintDrawable); // mTintManager.setTintDrawable(tintDrawable);
} else { // } else {
mTintManager.setStatusBarTintEnabled(false); // mTintManager.setStatusBarTintEnabled(false);
mTintManager.setTintDrawable(null); // mTintManager.setTintDrawable(null);
} // }
} // }
} }
/** /**
...@@ -308,16 +308,16 @@ public abstract class BaseAppCompatActivity extends TransitionActivity { ...@@ -308,16 +308,16 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
* @param on * @param on
*/ */
protected void setTranslucentStatus(boolean on) { protected void setTranslucentStatus(boolean on) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window win = getWindow(); // Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes(); // WindowManager.LayoutParams winParams = win.getAttributes();
final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; // final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
if (on) { // if (on) {
winParams.flags |= bits; // winParams.flags |= bits;
} else { // } else {
winParams.flags &= ~bits; // winParams.flags &= ~bits;
} // }
win.setAttributes(winParams); // win.setAttributes(winParams);
} // }
} }
} }
...@@ -228,4 +228,9 @@ object GlideUtils { ...@@ -228,4 +228,9 @@ object GlideUtils {
.apply(RequestOptions.bitmapTransform(BlurTransformation(25, 4))) .apply(RequestOptions.bitmapTransform(BlurTransformation(25, 4)))
.into(imageView) .into(imageView)
} }
fun loadThumbImageView(context: Context, path: String?, mImageView: ImageView) {
Glide.with(context).load("$path?x-oss-process=image/resize,p_20").into(mImageView)
}
} }
\ No newline at end of file
...@@ -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 android.graphics.Color import android.graphics.Color
import android.graphics.drawable.ColorDrawable import android.graphics.drawable.ColorDrawable
import android.text.method.ScrollingMovementMethod
import android.view.LayoutInflater import android.view.LayoutInflater
import android.widget.TextView import android.widget.TextView
import com.duben.library.net.neterror.BaseSubscriber import com.duben.library.net.neterror.BaseSubscriber
...@@ -11,7 +10,6 @@ import com.duben.library.net.neterror.Throwable ...@@ -11,7 +10,6 @@ import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.MintsApplication import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.R import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.BaseResponse 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.ui.activitys.IMActivity
import com.duben.roseplaylet.utils.LogUtil import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.ToastUtil import com.duben.roseplaylet.utils.ToastUtil
...@@ -37,8 +35,7 @@ class IMHelper private constructor() { ...@@ -37,8 +35,7 @@ class IMHelper private constructor() {
customSet() customSet()
} }
private var SECRET_KEY = private var SECRET_KEY = ""
"eJw1Tl0LgjAU-S97Dru3bW4TegjpQTJMFKnHwlW3sqZJBNF-b2S9HDifnBcr0yKwT0edZZFELQBg9BUftmMRmwTABn6vz1vnqGYRhj4UGgFycKi21572NBQkoEAPXAAqHxT8P0AH7*vZqcwdv2mdqcqslys4lvl812zSZNzGra5iCZesXxQymf6KPTX*HCoeGuRGwfsDyCExtw__"
companion object { companion object {
const val IM_SDK_APPID = 1600069405 const val IM_SDK_APPID = 1600069405
...@@ -48,9 +45,7 @@ class IMHelper private constructor() { ...@@ -48,9 +45,7 @@ class IMHelper private constructor() {
} }
} }
fun getUserSig(): String { fun getUserSig() = SECRET_KEY
return SECRET_KEY
}
fun getImMsg() { fun getImMsg() {
val application = MintsApplication.getContext() as MintsApplication val application = MintsApplication.getContext() as MintsApplication
...@@ -63,14 +58,13 @@ class IMHelper private constructor() { ...@@ -63,14 +58,13 @@ class IMHelper private constructor() {
if (baseResponse.status == 200) { if (baseResponse.status == 200) {
val psw = baseResponse.data["pass"].asString val psw = baseResponse.data["pass"].asString
SECRET_KEY = psw SECRET_KEY = psw
loginIm() loginIm()
} }
} }
}) })
} }
fun customSet() { private fun customSet() {
val appContext = MintsApplication.getContext() val appContext = MintsApplication.getContext()
//隐藏更多菜单中选项(全局) //隐藏更多菜单中选项(全局)
...@@ -86,7 +80,6 @@ class IMHelper private constructor() { ...@@ -86,7 +80,6 @@ class IMHelper private constructor() {
//展示未读红点 //展示未读红点
TUIConversationConfigClassic.setShowCellUnreadCount(true) TUIConversationConfigClassic.setShowCellUnreadCount(true)
//开启消息已读回执 -旗舰版能用 //开启消息已读回执 -旗舰版能用
// TUIChatConfigClassic.setMessageReadReceiptNeeded(true) // TUIChatConfigClassic.setMessageReadReceiptNeeded(true)
//设置系统通知消息文字的字体、颜色和背景色,针对所有系统通知消息生效 //设置系统通知消息文字的字体、颜色和背景色,针对所有系统通知消息生效
...@@ -104,29 +97,23 @@ class IMHelper private constructor() { ...@@ -104,29 +97,23 @@ class IMHelper private constructor() {
TUIChatConfigClassic.setReceiveTextMessageColor(Color.BLACK) TUIChatConfigClassic.setReceiveTextMessageColor(Color.BLACK)
} }
fun setCustomTopView(wxInfo: WXInfo?) { private fun setCustomTopView(wxCode: String) {
val tipsView = LayoutInflater.from(MintsApplication.getContext()) val tipsView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.custom_tips_view, null) .inflate(R.layout.custom_tips_view, null)
// val marqueeView = tipsView.findViewById<MarqueeView<*>>(R.id.marqueeView)
// val message = "请勿轻易通过第三方账户进行红包、转账、借"
// marqueeView.startWithText(message)
// marqueeView.startWithText(
// message,
// com.sunfusheng.marqueeview.R.anim.anim_bottom_in,
// com.sunfusheng.marqueeview.R.anim.anim_top_out
// )
val tvTips = tipsView.findViewById<TextView>(R.id.tv_tips) val tvTips = tipsView.findViewById<TextView>(R.id.tv_tips)
tvTips.text = "请勿轻易通过第三方账户进行红包、转账、借款等金钱往来以免上当受骗" tvTips.text = "请勿轻易通过第三方账户进行红包、转账、借款等金钱往来以免上当受骗"
tvTips.movementMethod = ScrollingMovementMethod() tvTips.isSelected = true
val tvWxNo = tipsView.findViewById<TextView>(R.id.tv_wx_no) val tvWxNo = tipsView.findViewById<TextView>(R.id.tv_wx_no)
val tvCopy = tipsView.findViewById<TextView>(R.id.tv_copy) val tvCopy = tipsView.findViewById<TextView>(R.id.tv_copy)
val tvSend = tipsView.findViewById<TextView>(R.id.tv_send) val tvSend = tipsView.findViewById<TextView>(R.id.tv_send)
tvWxNo.text = wxCode
tvCopy.setOnClickListener { tvCopy.setOnClickListener {
ToastUtil.show(MintsApplication.getContext(), "微信已复制到剪切板!") ToastUtil.show(MintsApplication.getContext(), "微信已复制到剪切板!")
UcropUtils.clipData(tvWxNo.text.toString()) UcropUtils.clipData(tvWxNo.text.toString())
} }
tvSend.setOnClickListener { tvSend.setOnClickListener {
// TODO
} }
TUIChatConfigClassic.setCustomTopView(tipsView) TUIChatConfigClassic.setCustomTopView(tipsView)
...@@ -139,8 +126,13 @@ class IMHelper private constructor() { ...@@ -139,8 +126,13 @@ class IMHelper private constructor() {
val userID = instance.userPKID val userID = instance.userPKID
val userSig = IMHelper.instance.getUserSig() val userSig = IMHelper.instance.getUserSig()
LogUtil.i("LoginWrapper ", "userSig $userSig") LogUtil.i("LoginWrapper ", "userSig $userSig")
LoginWrapper.getInstance().loginIMSDK(MintsApplication.getContext(), IMHelper.IM_SDK_APPID, LoginWrapper.getInstance().loginIMSDK(
userID, userSig, tuiLoginConfig, object : TUICallback() { MintsApplication.getContext(),
IM_SDK_APPID,
userID,
userSig,
tuiLoginConfig,
object : TUICallback() {
override fun onSuccess() { override fun onSuccess() {
LogUtil.i("LoginWrapper ", "imLogin onSuccess") LogUtil.i("LoginWrapper ", "imLogin onSuccess")
} }
...@@ -155,7 +147,11 @@ class IMHelper private constructor() { ...@@ -155,7 +147,11 @@ class IMHelper private constructor() {
} }
fun startChatActivity(chatId: String) { fun startChatActivity(chatId: String, wechatCode: String?) {
if (!wechatCode.isNullOrEmpty()){
setCustomTopView(wechatCode)
}
val intent = Intent(MintsApplication.getContext(), IMActivity::class.java) val intent = Intent(MintsApplication.getContext(), IMActivity::class.java)
intent.putExtra(TUIConstants.TUIChat.CHAT_TYPE, V2TIMConversation.V2TIM_C2C) intent.putExtra(TUIConstants.TUIChat.CHAT_TYPE, V2TIMConversation.V2TIM_C2C)
intent.putExtra(TUIConstants.TUIChat.CHAT_ID, chatId) intent.putExtra(TUIConstants.TUIChat.CHAT_ID, chatId)
......
...@@ -136,10 +136,6 @@ public class LoginWrapper { ...@@ -136,10 +136,6 @@ public class LoginWrapper {
if (config == null || false == config.isInitLocalStorageOnly()) { if (config == null || false == config.isInitLocalStorageOnly()) {
UserManager.getInstance().setLastImLoginCode(BaseConstants.ERR_SUCC); UserManager.getInstance().setLastImLoginCode(BaseConstants.ERR_SUCC);
} }
setIMSetting();
if (tuiCallback != null) { if (tuiCallback != null) {
tuiCallback.onSuccess(); tuiCallback.onSuccess();
} }
...@@ -201,10 +197,6 @@ public class LoginWrapper { ...@@ -201,10 +197,6 @@ public class LoginWrapper {
} }
} }
private void setIMSetting() {
IMHelper.Companion.getInstance().setCustomTopView(null);
}
public static TUILoginConfig getLoginConfig() { public static TUILoginConfig getLoginConfig() {
TUILoginConfig config = new TUILoginConfig(); TUILoginConfig config = new TUILoginConfig();
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
......
...@@ -63,10 +63,10 @@ class UserHelper private constructor() { ...@@ -63,10 +63,10 @@ class UserHelper private constructor() {
COMMON_ERROR_CODE_NO_VIP -> { COMMON_ERROR_CODE_NO_VIP -> {
// 无vip或金币 // 无vip或金币
ToastUtil.show(MintsApplication.getContext(), "余额不足,请充值") ToastUtil.show(MintsApplication.getContext(), "余额不足,请充值")
//
intent = Intent(appContext, VipActivity::class.java) // intent = Intent(appContext, VipActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) // intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
appContext.startActivity(intent) // appContext.startActivity(intent)
} }
COMMON_ERROR_CODE_NO_AUTH -> { COMMON_ERROR_CODE_NO_AUTH -> {
// 未认证 // 未认证
......
...@@ -22,36 +22,36 @@ class FirstPresenter : BasePresenter<FirstView>() { ...@@ -22,36 +22,36 @@ class FirstPresenter : BasePresenter<FirstView>() {
* 游客登录 * 游客登录
*/ */
fun userLogin() { fun userLogin() {
val vo = HashMap<String, Any>() // val vo = HashMap<String, Any>()
vo["device"] = DeviceUuidFactory().deviceUuid.toString() // vo["device"] = DeviceUuidFactory().deviceUuid.toString()
AppHttpManager.getInstance(loanApplication) // AppHttpManager.getInstance(loanApplication)
.call(loanService.visitorlogin(vo), // .call(loanService.visitorlogin(vo),
object : BaseSubscriber<BaseResponse<UserBean>>() { // object : BaseSubscriber<BaseResponse<UserBean>>() {
override fun onCompleted() { // override fun onCompleted() {
if (isLinkView) return // if (isLinkView) return
} // }
//
override fun onError(e: Throwable) { // override fun onError(e: Throwable) {
if (isLinkView) return // if (isLinkView) return
} // }
//
override fun onNext(baseResponse: BaseResponse<UserBean>) { // override fun onNext(baseResponse: BaseResponse<UserBean>) {
if (isLinkView) return // if (isLinkView) return
view.hideLoading() // view.hideLoading()
val code = baseResponse.getStatus() // val code = baseResponse.getStatus()
val message = baseResponse.getMessage() // val message = baseResponse.getMessage()
val data: UserBean? = baseResponse.getData() // val data: UserBean? = baseResponse.getData()
when (code) { // when (code) {
200 -> if (data != null) { // 200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data) // UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo() // saveTerminalInfo()
} // }
else -> { // else -> {
view.showToast(message) // view.showToast(message)
} // }
} // }
} // }
}) // })
} }
/** /**
...@@ -60,40 +60,40 @@ class FirstPresenter : BasePresenter<FirstView>() { ...@@ -60,40 +60,40 @@ class FirstPresenter : BasePresenter<FirstView>() {
* @param context * @param context
*/ */
fun saveTerminalInfo() { fun saveTerminalInfo() {
val vo = HashMap<String, Any>() // val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance // val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress() // val macAddress: String = deviceInfo.getMacAddress()
val mac = macAddress.replace(":", "") // val mac = macAddress.replace(":", "")
vo["mac"] = mac // vo["mac"] = mac
vo["mac1"] = macAddress // vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null) // vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI // vo["imei"] = deviceInfo.iMEI
vo["oaid"] = MintsApplication.OAID // vo["oaid"] = MintsApplication.OAID
vo["os"] = if (deviceInfo.isHarmonyOS()) "android-HarmonyOS" else "android" // vo["os"] = if (deviceInfo.isHarmonyOS()) "android-HarmonyOS" else "android"
vo["model"] = deviceInfo.newModel // vo["model"] = deviceInfo.newModel
vo["uuid"] = DeviceUuidFactory().deviceUuid // vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion // vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName // vo["appversion"] = deviceInfo.versionName
AppHttpManager.getInstance(loanApplication) // AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo), // .call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() { // object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() { // override fun onCompleted() {
if (isLinkView) return // if (isLinkView) return
} // }
//
override fun onError(e: Throwable) { // override fun onError(e: Throwable) {
if (isLinkView) return // if (isLinkView) return
} // }
//
override fun onNext(baseResponse: BaseResponse<Any>) { // override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return // if (isLinkView) return
val code = baseResponse.status // val code = baseResponse.status
when (code) { // when (code) {
200 -> { // 200 -> {
} // }
} // }
} // }
}) // })
} }
} }
\ No newline at end of file
package com.duben.roseplaylet.mvp.presenters package com.duben.roseplaylet.mvp.presenters
import android.text.TextUtils
import com.duben.roseplaylet.MintsApplication import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.manager.AppHttpManager import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.views.VipView import com.duben.roseplaylet.mvp.views.VipView
...@@ -42,6 +43,7 @@ class VipPresenter : BasePresenter<VipView>() { ...@@ -42,6 +43,7 @@ class VipPresenter : BasePresenter<VipView>() {
view.getUserSuc(baseResponse.data) view.getUserSuc(baseResponse.data)
} }
else -> { else -> {
view.showToast(message) view.showToast(message)
} }
...@@ -78,6 +80,7 @@ class VipPresenter : BasePresenter<VipView>() { ...@@ -78,6 +80,7 @@ class VipPresenter : BasePresenter<VipView>() {
UserManager.getInstance().saveUserInfo(data) UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo() saveTerminalInfo()
} }
else -> view.showToast(message) else -> view.showToast(message)
} }
} }
...@@ -171,6 +174,7 @@ class VipPresenter : BasePresenter<VipView>() { ...@@ -171,6 +174,7 @@ class VipPresenter : BasePresenter<VipView>() {
200 -> { 200 -> {
view.getVipProductSuc(baseResponse.data) view.getVipProductSuc(baseResponse.data)
} }
else -> { else -> {
view.showToast(baseResponse.getMessage()) view.showToast(baseResponse.getMessage())
} }
...@@ -179,8 +183,11 @@ class VipPresenter : BasePresenter<VipView>() { ...@@ -179,8 +183,11 @@ class VipPresenter : BasePresenter<VipView>() {
}) })
} }
fun getVipPayParams(payChannel: String, pid: String, enter: String) { fun getVipPayParams(payChannel: String, pid: String, otherUserId: String = "", enter: String) {
val vo = HashMap<String, Any>() val vo = HashMap<String, Any>()
if (!TextUtils.isEmpty(otherUserId)) {
vo["ruid"] = otherUserId
}
vo["payChannel"] = payChannel vo["payChannel"] = payChannel
vo["pid"] = pid vo["pid"] = pid
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
...@@ -204,6 +211,7 @@ class VipPresenter : BasePresenter<VipView>() { ...@@ -204,6 +211,7 @@ class VipPresenter : BasePresenter<VipView>() {
200 -> { 200 -> {
view.getVipPayParamsSuc("ALIPAY", baseResponse.data, enter) view.getVipPayParamsSuc("ALIPAY", baseResponse.data, enter)
} }
else -> { else -> {
view.showToast(baseResponse.getMessage()) view.showToast(baseResponse.getMessage())
} }
...@@ -262,6 +270,7 @@ class VipPresenter : BasePresenter<VipView>() { ...@@ -262,6 +270,7 @@ class VipPresenter : BasePresenter<VipView>() {
200 -> { 200 -> {
view.ordersSuc(baseResponse.data) view.ordersSuc(baseResponse.data)
} }
else -> { else -> {
view.showToast(message) view.showToast(message)
} }
......
...@@ -88,9 +88,11 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -88,9 +88,11 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
R.id.iv_avatar -> { R.id.iv_avatar -> {
showAlbum() showAlbum()
} }
R.id.tv_age -> { R.id.tv_age -> {
showAgePickDialog() showAgePickDialog()
} }
R.id.tv_save -> { R.id.tv_save -> {
val nickname = et_nickname.text.toString() val nickname = et_nickname.text.toString()
val age = tv_age.text.toString() val age = tv_age.text.toString()
...@@ -257,11 +259,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -257,11 +259,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
return@runOnUiThread return@runOnUiThread
} }
avatarUrl = imgPath!! avatarUrl = imgPath!!
GlideUtils.loadImageView( GlideUtils.loadThumbImageView(mContext, avatarUrl, iv_avatar)
this@BasicUserProfileActivity,
avatarUrl,
iv_avatar
)
} }
} }
}) })
...@@ -289,6 +287,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -289,6 +287,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
} }
} }
} }
UCrop.RESULT_ERROR -> { UCrop.RESULT_ERROR -> {
showToast("裁剪失败,请再试一下") showToast("裁剪失败,请再试一下")
} }
......
...@@ -104,6 +104,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener { ...@@ -104,6 +104,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
finish() finish()
} }
} }
R.id.tvLoginSendcode -> { R.id.tvLoginSendcode -> {
var mobile = etLoginMobile.text.toString().trim() var mobile = etLoginMobile.text.toString().trim()
if (mobile.length < 13) { if (mobile.length < 13) {
...@@ -116,6 +117,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener { ...@@ -116,6 +117,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
mobile = mobile.replace(" ".toRegex(), "") mobile = mobile.replace(" ".toRegex(), "")
loginPresenter.sendMobileCode(mobile) loginPresenter.sendMobileCode(mobile)
} }
R.id.tvLoginNext -> { R.id.tvLoginNext -> {
var mobile = etLoginMobile.text.toString().trim() var mobile = etLoginMobile.text.toString().trim()
if (mobile.length < 13) { if (mobile.length < 13) {
...@@ -175,7 +177,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener { ...@@ -175,7 +177,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
tv_title.text = "绑定手机号" tv_title.text = "绑定手机号"
tvLoginNext.text = "确认绑定" tvLoginNext.text = "确认绑定"
iv_left_icon.visibility = View.VISIBLE iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back) iv_left_icon.setImageResource(R.mipmap.ic_arrow_bottom)
BackInputUtil.phoneNumAddSpace(etLoginMobile) BackInputUtil.phoneNumAddSpace(etLoginMobile)
mobile = UserManager.getInstance().mobile mobile = UserManager.getInstance().mobile
...@@ -230,7 +232,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener { ...@@ -230,7 +232,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
var num = 0 var num = 0
var run: Runnable? = null var run: Runnable? = null
fun sendCodeThread() { private fun sendCodeThread() {
num = 60 num = 60
tvLoginSendcode?.let { tvLoginSendcode?.let {
it.isEnabled = false it.isEnabled = false
...@@ -266,6 +268,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener { ...@@ -266,6 +268,7 @@ class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
activity.clickTab4Layout() activity.clickTab4Layout()
} }
} }
R.id.dialog_btn_right -> { R.id.dialog_btn_right -> {
} }
......
...@@ -163,7 +163,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -163,7 +163,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
val tagsList = gson.fromJson(it.findDescribe, Array<String>::class.java) val tagsList = gson.fromJson(it.findDescribe, Array<String>::class.java)
xhdnstzAdapter?.setNewInstance(tagsList.toCollection(ArrayList())) xhdnstzAdapter?.setNewInstance(tagsList.toCollection(ArrayList()))
} }
GlideUtils.loadImageView(this@EditProfileActivity, it.headerUrl, ivAvatar) GlideUtils.loadThumbImageView(this@EditProfileActivity, it.headerUrl, ivAvatar)
tvNickname.setText("" + it.nickName) tvNickname.setText("" + it.nickName)
tvSign.text = it.introduce tvSign.text = it.introduce
tvAge.text = it.birthday tvAge.text = it.birthday
...@@ -333,24 +333,31 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -333,24 +333,31 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
UserProfile.PROFILE_SG.str -> { UserProfile.PROFILE_SG.str -> {
UserProfile.PROFILE_SG.arr UserProfile.PROFILE_SG.arr
} }
UserProfile.PROFILE_TZ.str -> { UserProfile.PROFILE_TZ.str -> {
UserProfile.PROFILE_TZ.arr UserProfile.PROFILE_TZ.arr
} }
UserProfile.PROFILE_NL.str -> { UserProfile.PROFILE_NL.str -> {
UserProfile.PROFILE_NL.arr UserProfile.PROFILE_NL.arr
} }
UserProfile.PROFILE_SX.str -> { UserProfile.PROFILE_SX.str -> {
UserProfile.PROFILE_SX.arr UserProfile.PROFILE_SX.arr
} }
UserProfile.PROFILE_JYFW.str -> { UserProfile.PROFILE_JYFW.str -> {
UserProfile.PROFILE_JYFW.arr UserProfile.PROFILE_JYFW.arr
} }
UserProfile.PROFILE_ZY.str -> { UserProfile.PROFILE_ZY.str -> {
UserProfile.PROFILE_ZY.arr UserProfile.PROFILE_ZY.arr
} }
UserProfile.PROFILE_JYJM.str -> { UserProfile.PROFILE_JYJM.str -> {
UserProfile.PROFILE_JYJM.arr UserProfile.PROFILE_JYJM.arr
} }
else -> { else -> {
UserProfile.UNKNOWN.arr UserProfile.UNKNOWN.arr
} }
...@@ -444,6 +451,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -444,6 +451,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
}) })
mSinglePickDialog?.show() mSinglePickDialog?.show()
} }
UserProfile.PROFILE_TZ.str -> { UserProfile.PROFILE_TZ.str -> {
mSinglePickDialog = SinglePickDialog( mSinglePickDialog = SinglePickDialog(
this, this,
...@@ -460,6 +468,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -460,6 +468,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
}) })
mSinglePickDialog?.show() mSinglePickDialog?.show()
} }
UserProfile.PROFILE_NL.str -> { UserProfile.PROFILE_NL.str -> {
mSinglePickDialog = SinglePickDialog( mSinglePickDialog = SinglePickDialog(
this, this,
...@@ -476,6 +485,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -476,6 +485,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
}) })
mSinglePickDialog?.show() mSinglePickDialog?.show()
} }
UserProfile.PROFILE_SX.str -> { UserProfile.PROFILE_SX.str -> {
mSinglePickDialog = SinglePickDialog( mSinglePickDialog = SinglePickDialog(
this, this,
...@@ -492,6 +502,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -492,6 +502,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
}) })
mSinglePickDialog?.show() mSinglePickDialog?.show()
} }
UserProfile.PROFILE_JYJM.str -> { UserProfile.PROFILE_JYJM.str -> {
mSinglePickDialog = SinglePickDialog( mSinglePickDialog = SinglePickDialog(
this, this,
...@@ -508,6 +519,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -508,6 +519,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
}) })
mSinglePickDialog?.show() mSinglePickDialog?.show()
} }
UserProfile.PROFILE_ZY.str -> { UserProfile.PROFILE_ZY.str -> {
mSinglePickDialog = SinglePickDialog( mSinglePickDialog = SinglePickDialog(
this, this,
...@@ -524,6 +536,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -524,6 +536,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
}) })
mSinglePickDialog?.show() mSinglePickDialog?.show()
} }
else -> {} else -> {}
} }
} }
...@@ -537,6 +550,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -537,6 +550,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
// 保存资料 // 保存资料
userProfileData?.let { editProfilePresenter.setUserInfo(it) } userProfileData?.let { editProfilePresenter.setUserInfo(it) }
} }
R.id.layout_xhdnstz -> { R.id.layout_xhdnstz -> {
val bundle = Bundle() val bundle = Bundle()
bundle.putBoolean(Constant.IS_LIKE_FEMALE_LABEL, true) bundle.putBoolean(Constant.IS_LIKE_FEMALE_LABEL, true)
...@@ -546,13 +560,16 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -546,13 +560,16 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
bundle bundle
) )
} }
R.id.layout_avatar -> { R.id.layout_avatar -> {
showAlbum() showAlbum()
} }
R.id.layout_gxqm -> { R.id.layout_gxqm -> {
// 个性签名 // 个性签名
readyGoForResult(WriteSignatureActivity::class.java, Constant.EDIT_PROFILE_CODE) readyGoForResult(WriteSignatureActivity::class.java, Constant.EDIT_PROFILE_CODE)
} }
R.id.layout_nl -> { R.id.layout_nl -> {
val defaultValue = if (TextUtils.isEmpty(userProfileData?.age)) { val defaultValue = if (TextUtils.isEmpty(userProfileData?.age)) {
"2000" "2000"
...@@ -561,9 +578,11 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -561,9 +578,11 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
showPickDialog(UserProfile.PROFILE_NL.str, defaultValue) showPickDialog(UserProfile.PROFILE_NL.str, defaultValue)
} }
R.id.layout_zy -> { R.id.layout_zy -> {
showJobPick() showJobPick()
} }
R.id.layout_sg -> { R.id.layout_sg -> {
val defaultValue = if (TextUtils.isEmpty(userProfileData?.userHeight)) { val defaultValue = if (TextUtils.isEmpty(userProfileData?.userHeight)) {
"165CM" "165CM"
...@@ -572,6 +591,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -572,6 +591,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
showPickDialog(UserProfile.PROFILE_SG.str, defaultValue) showPickDialog(UserProfile.PROFILE_SG.str, defaultValue)
} }
R.id.layout_tz -> { R.id.layout_tz -> {
val defaultValue = if (TextUtils.isEmpty(userProfileData?.bodyWeight)) { val defaultValue = if (TextUtils.isEmpty(userProfileData?.bodyWeight)) {
"50KG" "50KG"
...@@ -580,15 +600,19 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -580,15 +600,19 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
showPickDialog(UserProfile.PROFILE_TZ.str, defaultValue) showPickDialog(UserProfile.PROFILE_TZ.str, defaultValue)
} }
R.id.layout_sx -> { R.id.layout_sx -> {
showPickDialog(UserProfile.PROFILE_SX.str, userProfileData?.appearance) showPickDialog(UserProfile.PROFILE_SX.str, userProfileData?.appearance)
} }
R.id.layout_jyfw -> { R.id.layout_jyfw -> {
showAddressDialog() showAddressDialog()
} }
R.id.layout_jyjm -> { R.id.layout_jyjm -> {
showPickDialog(UserProfile.PROFILE_JYJM.str, userProfileData?.findCity) showPickDialog(UserProfile.PROFILE_JYJM.str, userProfileData?.findCity)
} }
R.id.layout_gxbq -> { R.id.layout_gxbq -> {
readyGoForResult(UserLabelActivity::class.java, Constant.USER_LABEL_REQUEST_CODE) readyGoForResult(UserLabelActivity::class.java, Constant.USER_LABEL_REQUEST_CODE)
} }
...@@ -697,7 +721,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -697,7 +721,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
return@runOnUiThread return@runOnUiThread
} }
avatarUrl = imgPath!! avatarUrl = imgPath!!
GlideUtils.loadImageView(this@EditProfileActivity, avatarUrl, ivAvatar) GlideUtils.loadThumbImageView(mContext, avatarUrl, ivAvatar)
} }
} }
}) })
...@@ -725,9 +749,11 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -725,9 +749,11 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
} }
} }
UCrop.RESULT_ERROR -> { UCrop.RESULT_ERROR -> {
showToast("裁剪失败,请再试一下") showToast("裁剪失败,请再试一下")
} }
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)
userProfileData?.tagsCommon = sbLabel userProfileData?.tagsCommon = sbLabel
...@@ -737,6 +763,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -737,6 +763,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
gxbqAdapter?.setNewInstance(tagsList.toCollection(ArrayList())) 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)
userProfileData?.findDescribe = sbLabel userProfileData?.findDescribe = sbLabel
...@@ -746,6 +773,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -746,6 +773,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
xhdnstzAdapter?.setNewInstance(tagsList.toCollection(ArrayList())) 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?.introduce = signature userProfileData?.introduce = signature
......
package com.duben.roseplaylet.ui.activitys package com.duben.roseplaylet.ui.activitys
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.graphics.Color
import android.text.Editable import android.text.Editable
import android.text.TextUtils import android.text.TextUtils
import android.text.TextWatcher import android.text.TextWatcher
...@@ -26,15 +27,16 @@ class FeedbackActivity : BaseActivity(), View.OnClickListener, FeedbackView { ...@@ -26,15 +27,16 @@ class FeedbackActivity : BaseActivity(), View.OnClickListener, FeedbackView {
private val maxLength = 150 private val maxLength = 150
private val minLength = 5 private val minLength = 5
override fun getContentViewLayoutID() = R.layout.activity_feekback override fun getContentViewLayoutID() = R.layout.activity_feekback
override fun isApplyKitKatTranslucency() = false override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
tv_title.text = "意见反馈" tv_title.text = "意见反馈"
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back) iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
line.visibility = View.GONE
etFeedbackContent.isFocusable = true etFeedbackContent.isFocusable = true
etFeedbackContent.isFocusableInTouchMode = true etFeedbackContent.isFocusableInTouchMode = true
......
...@@ -34,8 +34,8 @@ class IMActivity : TUIBaseChatActivity() { ...@@ -34,8 +34,8 @@ class IMActivity : TUIBaseChatActivity() {
// 状态栏黑底白字 // 状态栏黑底白字
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION) window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.statusBarColor = resources.getColor(R.color.color_171619) window.statusBarColor = resources.getColor(R.color.color_15141A)
window.navigationBarColor = resources.getColor(R.color.color_171619) window.navigationBarColor = resources.getColor(R.color.color_15141A)
var vis = window.decorView.systemUiVisibility var vis = window.decorView.systemUiVisibility
vis = vis or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR vis = vis or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
window.decorView.systemUiVisibility = vis window.decorView.systemUiVisibility = vis
......
...@@ -16,6 +16,7 @@ import com.duben.roseplaylet.mvp.views.InviteView ...@@ -16,6 +16,7 @@ import com.duben.roseplaylet.mvp.views.InviteView
import com.duben.roseplaylet.ui.adapter.ShareInviteAdapter import com.duben.roseplaylet.ui.adapter.ShareInviteAdapter
import com.duben.roseplaylet.ui.adapter.ShareRankAdapter import com.duben.roseplaylet.ui.adapter.ShareRankAdapter
import com.duben.roseplaylet.ui.widgets.ShareDialog import com.duben.roseplaylet.ui.widgets.ShareDialog
import com.duben.roseplaylet.ui.widgets.ShareImageDialog
import com.duben.roseplaylet.utils.SpanUtils import com.duben.roseplaylet.utils.SpanUtils
import com.duben.roseplaylet.utils.UcropUtils import com.duben.roseplaylet.utils.UcropUtils
import kotlinx.android.synthetic.main.activity_share.* import kotlinx.android.synthetic.main.activity_share.*
...@@ -99,7 +100,7 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView { ...@@ -99,7 +100,7 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView {
shareImgDialog() shareImgDialog()
} }
R.id.tv_share_url -> { R.id.tv_share_url -> {
shareWx() shareDialog()
} }
R.id.tv_copy -> { R.id.tv_copy -> {
showToast("邀请码已复制到剪切板!") showToast("邀请码已复制到剪切板!")
...@@ -108,10 +109,6 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView { ...@@ -108,10 +109,6 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView {
} }
} }
private fun shareWx() {
}
private fun initListener() { private fun initListener() {
iv_left_icon.setOnClickListener(this) iv_left_icon.setOnClickListener(this)
tv_copy.setOnClickListener(this) tv_copy.setOnClickListener(this)
...@@ -120,14 +117,26 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView { ...@@ -120,14 +117,26 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView {
} }
/** /**
* 图片分享 * 链接分享
*/ */
private fun shareImgDialog() { private fun shareDialog() {
val shareDialog = ShareDialog(this, myShareUrl) val shareDialog = ShareDialog(this, myShareUrl)
shareDialog.setOnShareOKListener(object : ShareDialog.OnShareOKListener { shareDialog.setOnShareOKListener(object : ShareDialog.OnShareOKListener {
override fun onShareOk() {} override fun onShareOk() {}
}) })
val content = "送你一个赚钱的新模式,\r\n快点加入跟我一起赚钱吧" shareDialog.show()
}
/**
* 图片分享
*/
private fun shareImgDialog() {
val shareDialog = ShareImageDialog(this, myShareUrl)
shareDialog.setOnShareOKListener(object : ShareImageDialog.OnShareOKListener {
override fun onShareOk() {}
})
val content = ""
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.name) shareDialog.setShareTitle("Hi,我是用户" + userManager.name)
shareDialog.setShareContent(content) shareDialog.setShareContent(content)
...@@ -189,7 +198,6 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView { ...@@ -189,7 +198,6 @@ class ShareActivity : BaseActivity(), View.OnClickListener, InviteView {
} }
override fun getRuserShareCodeSuc(data: Any) { override fun getRuserShareCodeSuc(data: Any) {
} }
override fun getRuserShareCodeSucFail() { override fun getRuserShareCodeSucFail() {
......
...@@ -177,17 +177,20 @@ class SplashActivity : BaseActivity() { ...@@ -177,17 +177,20 @@ class SplashActivity : BaseActivity() {
bundle.putString(WebActivity.WEB_URL, REGISTER_URL) bundle.putString(WebActivity.WEB_URL, REGISTER_URL)
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.tv_dialogper_policy -> { R.id.tv_dialogper_policy -> {
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name)) bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name))
bundle.putString(WebActivity.WEB_URL, PRIVACY_URL) bundle.putString(WebActivity.WEB_URL, PRIVACY_URL)
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.btn_dialogper_back -> { R.id.btn_dialogper_back -> {
if (powerDialog != null && powerDialog!!.isShowing) { if (powerDialog != null && powerDialog!!.isShowing) {
powerDialog!!.dismiss() powerDialog!!.dismiss()
} }
powerDialog2() powerDialog2()
} }
R.id.btn_dialogper_next -> { R.id.btn_dialogper_next -> {
if (powerDialog != null && powerDialog!!.isShowing) { if (powerDialog != null && powerDialog!!.isShowing) {
powerDialog!!.dismiss() powerDialog!!.dismiss()
...@@ -217,17 +220,20 @@ class SplashActivity : BaseActivity() { ...@@ -217,17 +220,20 @@ class SplashActivity : BaseActivity() {
bundle.putString(WebActivity.WEB_URL, REGISTER_URL) bundle.putString(WebActivity.WEB_URL, REGISTER_URL)
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.tv_dialogper_policy -> { R.id.tv_dialogper_policy -> {
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name)) bundle.putString(WebActivity.WEB_TITLE, getString(R.string.privacy_name))
bundle.putString(WebActivity.WEB_URL, PRIVACY_URL) bundle.putString(WebActivity.WEB_URL, PRIVACY_URL)
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.btn_dialogper_back -> { R.id.btn_dialogper_back -> {
if (powerDialog2 != null && powerDialog2!!.isShowing) { if (powerDialog2 != null && powerDialog2!!.isShowing) {
powerDialog2!!.dismiss() powerDialog2!!.dismiss()
} }
baseApplication.exitApp() baseApplication.exitApp()
} }
R.id.btn_dialogper_next -> { R.id.btn_dialogper_next -> {
if (powerDialog2 != null && powerDialog2!!.isShowing) { if (powerDialog2 != null && powerDialog2!!.isShowing) {
powerDialog2!!.dismiss() powerDialog2!!.dismiss()
......
...@@ -29,7 +29,6 @@ import com.duben.roseplaylet.ui.adapter.UserProfileAlbumAdapter ...@@ -29,7 +29,6 @@ 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
...@@ -114,11 +113,20 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -114,11 +113,20 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
R.id.iv_head_share -> { R.id.iv_head_share -> {
} }
R.id.iv_head_more -> { R.id.iv_head_more -> {
showToBlackDialog() showToBlackDialog()
} }
R.id.iv_like, R.id.tv_like_male -> { R.id.iv_like, R.id.tv_like_male -> {
userProfileData?.let { userProfileData?.let {
if (UserManager.getInstance().vipFlag && UserManager.getInstance().userSex == 1) {
// 是男性且未开通VIP
val bundle = Bundle()
bundle.putString(VipActivity.OTHER_USER_ID, "" + it.uid)
readyGo(VipActivity::class.java, bundle)
}
var toLikeStatus = 0 var toLikeStatus = 0
if (it.likeStatus == 0) { if (it.likeStatus == 0) {
toLikeStatus = 1 toLikeStatus = 1
...@@ -126,23 +134,25 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -126,23 +134,25 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
userProfilePresenter.toLike("" + it.uid, toLikeStatus) userProfilePresenter.toLike("" + it.uid, toLikeStatus)
} }
} }
R.id.tv_chat -> { R.id.tv_chat -> {
userProfileData?.let { userProfileData?.let {
if (it.canChat) { if (it.canChat) {
// 直接聊 // 直接聊
IMHelper.instance.startChatActivity("" + it.uid) IMHelper.instance.startChatActivity("" + it.uid, it.infoWechat)
return return
} }
// 自己是不是男性 // 自己是不是男性
if (UserManager.getInstance().userSex == 1) { if (UserManager.getInstance().userSex == 1) {
// 男性 非VIP 弹解锁聊天弹框 // 男性 非VIP 弹解锁聊天弹框
showUnlockChatDialog() showUnlockWechatDialog()
} else { } else {
// 女性 弹出认证弹框 // 女性 弹出认证弹框
UserHelper.instance.showRealAuthDialog() UserHelper.instance.showRealAuthDialog()
} }
} }
} }
R.id.tv_wechat -> { R.id.tv_wechat -> {
userProfilePresenter.seeWechat(toUid) userProfilePresenter.seeWechat(toUid)
} }
...@@ -192,7 +202,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -192,7 +202,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
if (userIsMale) { if (userIsMale) {
// 男性 // 男性
tv_days.text = "已注册" + it.days tv_days.text = "已注册" + it.days
GlideUtils.loadImageView(this, it.headerUrl, iv_avatar_male) GlideUtils.loadThumbImageView(this, it.headerUrl, iv_avatar_male)
if (TextUtils.isEmpty(it.introduce)) { if (TextUtils.isEmpty(it.introduce)) {
tv_introduce_text.text = "小姐姐你好呀!" tv_introduce_text.text = "小姐姐你好呀!"
} else { } else {
...@@ -212,7 +222,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -212,7 +222,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
} else { } else {
GlideUtils.loadImageView(this, it.headerUrl, iv_avatar_female) GlideUtils.loadThumbImageView(this, it.headerUrl, iv_avatar_female)
if (TextUtils.isEmpty(it.introduce)) { if (TextUtils.isEmpty(it.introduce)) {
tv_introduce_text.text = "不知道写什么耶,哥哥帮我想想~" tv_introduce_text.text = "不知道写什么耶,哥哥帮我想想~"
} else { } else {
...@@ -233,7 +243,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -233,7 +243,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
tv_head_title.text = it.nickName tv_head_title.text = it.nickName
GlideUtils.loadImageView(this, it.headerUrl, iv_head_avatar) GlideUtils.loadThumbImageView(this, it.headerUrl, iv_head_avatar)
if (it.likeStatus == 0) { if (it.likeStatus == 0) {
playCancelCollectAnim(iv_like) playCancelCollectAnim(iv_like)
...@@ -320,6 +330,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -320,6 +330,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
override fun getMorePageFail() { override fun getMorePageFail() {
// 不能看隐藏
setViewBlur()
} }
override fun seeWechatSuc(data: SeeWechat) { override fun seeWechatSuc(data: SeeWechat) {
...@@ -337,12 +349,11 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -337,12 +349,11 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
} }
override fun seeWechatFail() { override fun seeWechatFail() {}
}
override fun unlockInfoByCoinSuc() { override fun unlockInfoByCoinSuc() {
// 解锁金币资料后刷新页面 // 解锁金币资料后刷新页面
// userProfilePresenter.getMorePage(toUid) userProfilePresenter.getMorePage(toUid)
} }
override fun unlockWechatSuc() { override fun unlockWechatSuc() {
...@@ -388,6 +399,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -388,6 +399,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
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(), "微信已复制到剪切板!")
UcropUtils.clipData(wechatCode) UcropUtils.clipData(wechatCode)
...@@ -398,43 +410,53 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -398,43 +410,53 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
} }
private fun showUnlockChatDialog() { // private fun showUnlockChatDialog() {
userProfileData?.let { // userProfileData?.let {
UnlockChatDialog(this, it.headerUrl, object : DialogListener() { // UnlockChatDialog(this, it.headerUrl, object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { // override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v) // super.onClick(dialog, v)
// dialog?.dismiss() // // dialog?.dismiss()
when (v?.id) { // when (v?.id) {
R.id.tv_vip_btn -> { // R.id.tv_vip_btn -> {
readyGo(VipActivity::class.java) // readyGo(VipActivity::class.java)
} // }
R.id.tv_vip_coin -> { //
userProfilePresenter.unlockInfoByCoin(toUid) // R.id.tv_vip_coin -> {
} // userProfilePresenter.unlockInfoByCoin(toUid)
else -> {} // }
} //
} // else -> {}
}).show() // }
} // }
} // }).show()
// }
// }
private fun showUnlockWechatDialog() { private fun showUnlockWechatDialog() {
userProfileData?.let { userProfileData?.let {
UnlockWechatDialog(this, it.headerUrl, object : DialogListener() { UnlockWechatDialog(
override fun onClick(dialog: Dialog?, v: View?) { this,
super.onClick(dialog, v) it.headerUrl,
dialog?.dismiss() UserManager.getInstance().vipFlag,
when (v?.id) { object : DialogListener() {
R.id.tv_vip_btn -> { override fun onClick(dialog: Dialog?, v: View?) {
readyGo(VipActivity::class.java) super.onClick(dialog, v)
} dialog?.dismiss()
R.id.tv_vip_coin -> { when (v?.id) {
userProfilePresenter.unlockWechat(toUid) R.id.tv_vip_btn -> {
val bundle = Bundle()
bundle.putString(VipActivity.OTHER_USER_ID, "" + it.uid)
readyGo(VipActivity::class.java, bundle)
}
R.id.tv_vip_coin -> {
userProfilePresenter.unlockWechat(toUid)
}
else -> {}
} }
else -> {}
} }
} }).show()
}).show()
} }
} }
...@@ -445,11 +467,15 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -445,11 +467,15 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
dialog?.dismiss() dialog?.dismiss()
when (v?.id) { when (v?.id) {
R.id.tv_vip_btn -> { R.id.tv_vip_btn -> {
readyGo(VipActivity::class.java) val bundle = Bundle()
bundle.putString(VipActivity.OTHER_USER_ID, "" + userProfileData?.uid)
readyGo(VipActivity::class.java, bundle)
} }
R.id.tv_vip_coin -> { R.id.tv_vip_coin -> {
userProfilePresenter.unlockInfoByCoin(toUid) userProfilePresenter.unlockInfoByCoin(toUid)
} }
else -> {} else -> {}
} }
} }
...@@ -546,7 +572,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -546,7 +572,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
/** /**
* 根据百分比改变颜色透明度 * 根据百分比改变颜色透明度
*/ */
fun changeAlpha(color: Int, fraction: Float): Int { private fun changeAlpha(color: Int, fraction: Float): Int {
val alpha = (Color.alpha(color) * fraction).toInt() val alpha = (Color.alpha(color) * fraction).toInt()
return Color.argb(alpha, 35, 33, 34) return Color.argb(alpha, 35, 33, 34)
} }
......
...@@ -67,7 +67,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -67,7 +67,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
const val ALIPAY = "ALIPAY" const val ALIPAY = "ALIPAY"
const val THIRD_ID = "THIRD_ID" const val THIRD_ID = "THIRD_ID"
const val VEDIO_ID = "VEDIO_ID" const val VEDIO_ID = "VEDIO_ID"
const val USER_ID = "USER_ID" const val OTHER_USER_ID = "OTHER_USER_ID"
const val ENTER_TYPE_DIALOG = "ENTER_TYPE_DIALOG" const val ENTER_TYPE_DIALOG = "ENTER_TYPE_DIALOG"
const val ENTER_TYPE_ACTIVITY = "ENTER_TYPE_ACTIVITY" const val ENTER_TYPE_ACTIVITY = "ENTER_TYPE_ACTIVITY"
} }
...@@ -88,7 +88,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -88,7 +88,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
private var isRecommend: Boolean = false private var isRecommend: Boolean = false
private var payType = WEIXIN_PAY// 支付类型 private var payType = WEIXIN_PAY// 支付类型
private var vedioId = "" private var vedioId = ""
private var userId = "" private var otherUserId = ""
private var thirdId = "" private var thirdId = ""
private val mainHandler = Handler(Looper.getMainLooper()) private val mainHandler = Handler(Looper.getMainLooper())
...@@ -109,7 +109,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -109,7 +109,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
isRecommend = it.getBoolean(IS_RECOMMEND, false) isRecommend = it.getBoolean(IS_RECOMMEND, false)
thirdId = it.getString(THIRD_ID, "") thirdId = it.getString(THIRD_ID, "")
vedioId = it.getString(VEDIO_ID, "") vedioId = it.getString(VEDIO_ID, "")
userId = it.getString(USER_ID, "") otherUserId = it.getString(OTHER_USER_ID, "")
} }
} }
...@@ -256,9 +256,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -256,9 +256,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
0 -> { 0 -> {
alipay(paramsBean) alipay(paramsBean)
} }
1 -> { 1 -> {
openAutoAlipay(paramsBean.params.params) openAutoAlipay(paramsBean.params.params)
} }
2 -> { 2 -> {
if (TextUtils.equals(ENTER_TYPE_ACTIVITY, enter)) { if (TextUtils.equals(ENTER_TYPE_ACTIVITY, enter)) {
openAlipayApp(vipBean.payToModel2FirstAlipayAppid) openAlipayApp(vipBean.payToModel2FirstAlipayAppid)
...@@ -266,6 +268,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -266,6 +268,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
openAlipayApp(vipBean.payToModel2SecondAlipayAppid) openAlipayApp(vipBean.payToModel2SecondAlipayAppid)
} }
} }
4 -> { 4 -> {
goAlipaySignExecute(paramsBean.params.params) goAlipaySignExecute(paramsBean.params.params)
} }
...@@ -359,6 +362,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -359,6 +362,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
finish() finish()
} }
} }
R.id.tvVipPay -> { R.id.tvVipPay -> {
if (vipList != null && vipList!!.size > 0) { if (vipList != null && vipList!!.size > 0) {
val vipBean = vipList!![vipAdapter.getPosition()] val vipBean = vipList!![vipAdapter.getPosition()]
...@@ -371,28 +375,37 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -371,28 +375,37 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
if (vipBean.isShowCycTips) { if (vipBean.isShowCycTips) {
agreementPayDialog() agreementPayDialog()
} else { } else {
vipPresenter.getVipPayParams(payType, vipBean.pid, ENTER_TYPE_ACTIVITY) vipPresenter.getVipPayParams(
payType,
vipBean.pid,
otherUserId,
ENTER_TYPE_ACTIVITY
)
} }
} else { } else {
showToast("产品未配置") showToast("产品未配置")
} }
} }
R.id.tvVipAgreement -> { R.id.tvVipAgreement -> {
val bundle = Bundle() val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, getString(R.string.members_name)) bundle.putString(WebActivity.WEB_TITLE, getString(R.string.members_name))
bundle.putString(WebActivity.WEB_URL, Constant.MEMBERS_URL) bundle.putString(WebActivity.WEB_URL, Constant.MEMBERS_URL)
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.ll_vip_alipay -> { R.id.ll_vip_alipay -> {
payType = ALIPAY payType = ALIPAY
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue) iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none) iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
} }
R.id.ll_vip_wx -> { R.id.ll_vip_wx -> {
payType = WEIXIN_PAY payType = WEIXIN_PAY
iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue) iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none) iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
} }
R.id.tv_vip_back -> { R.id.tv_vip_back -> {
VipBackDialog(this).show() VipBackDialog(this).show()
} }
...@@ -546,6 +559,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -546,6 +559,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
finish() finish()
// payYesDialog!!.dismiss() // payYesDialog!!.dismiss()
} }
R.id.tv_dialog_vip_next -> { R.id.tv_dialog_vip_next -> {
cbVipAgreement.isChecked = true cbVipAgreement.isChecked = true
...@@ -554,6 +568,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -554,6 +568,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipPresenter.getVipPayParams( vipPresenter.getVipPayParams(
payType, payType,
vipBean.pid, vipBean.pid,
otherUserId,
ENTER_TYPE_DIALOG ENTER_TYPE_DIALOG
) )
...@@ -602,6 +617,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -602,6 +617,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipPresenter.getVipPayParams( vipPresenter.getVipPayParams(
payType, payType,
vipBean.pid, vipBean.pid,
otherUserId,
ENTER_TYPE_ACTIVITY ENTER_TYPE_ACTIVITY
) )
} }
...@@ -635,7 +651,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -635,7 +651,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
R.id.dialog_btn_right -> { R.id.dialog_btn_right -> {
cbVipAgreement.isChecked = true cbVipAgreement.isChecked = true
if (vipList != null && vipList!!.size > 0) { if (vipList != null && vipList!!.size > 0) {
val vipBean = vipList!![vipAdapter.getPosition()] val vipBean = vipList!![vipAdapter.getPosition()]
if (vipBean.isShowCycTips) { if (vipBean.isShowCycTips) {
...@@ -644,6 +659,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On ...@@ -644,6 +659,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipPresenter.getVipPayParams( vipPresenter.getVipPayParams(
payType, payType,
vipBean.pid, vipBean.pid,
otherUserId,
ENTER_TYPE_ACTIVITY ENTER_TYPE_ACTIVITY
) )
} }
......
...@@ -16,11 +16,11 @@ import android.text.TextUtils; ...@@ -16,11 +16,11 @@ import android.text.TextUtils;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import com.duben.roseplaylet.utils.StatusBarUtil;
import com.gyf.barlibrary.ImmersionBar; import com.gyf.barlibrary.ImmersionBar;
import com.duben.roseplaylet.MintsApplication; import com.duben.roseplaylet.MintsApplication;
import com.duben.roseplaylet.R; import com.duben.roseplaylet.R;
...@@ -48,18 +48,17 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base ...@@ -48,18 +48,17 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
if (TextUtils.equals(getClass().getSimpleName(), "SplashActivity") if (TextUtils.equals(getClass().getSimpleName(), "SplashActivity")
|| TextUtils.equals(getClass().getSimpleName(), "GuideActivity") || TextUtils.equals(getClass().getSimpleName(), "GuideActivity")
) { ) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else if ( } else if (
TextUtils.equals(getClass().getSimpleName(), "VideoActivity") TextUtils.equals(getClass().getSimpleName(), "VideoActivity")
) { ) {
setLightStatusBar(); setLightStatusBar();
} else { } else {
setDarkStatusBar(); // setDarkStatusBar();
} }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
getWindow().setNavigationBarColor(Color.BLACK); getWindow().setNavigationBarColor(Color.TRANSPARENT);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -87,15 +86,16 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base ...@@ -87,15 +86,16 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
private void setDarkStatusBar() { private void setDarkStatusBar() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().setStatusBarColor(getResources().getColor(R.color.full_transparent)); getWindow().setStatusBarColor(getResources().getColor(R.color.red));
getWindow().setNavigationBarColor(getResources().getColor(R.color.full_transparent)); getWindow().setNavigationBarColor(getResources().getColor(R.color.red));
int vis = getWindow().getDecorView().getSystemUiVisibility(); int vis = getWindow().getDecorView().getSystemUiVisibility();
vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR; vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
getWindow().getDecorView().setSystemUiVisibility(vis); getWindow().getDecorView().setSystemUiVisibility(vis);
} }
public void statusBarDark(boolean isDark) { public void statusBarDark(boolean isDark) {
ImmersionBar.with(this).statusBarDarkFont(isDark, 0.5f).init(); ImmersionBar.with(this).transparentStatusBar();
// ImmersionBar.with(this).statusBarDarkFont(isDark, 0.5f).init();
} }
@Override @Override
......
...@@ -7,13 +7,14 @@ import com.duben.library.utils.GlideUtils ...@@ -7,13 +7,14 @@ import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.* import com.duben.roseplaylet.mvp.model.*
class ShareInviteAdapter : BaseQuickAdapter<ShareUserMsg, BaseViewHolder>(R.layout.item_share_invite) { class ShareInviteAdapter :
BaseQuickAdapter<ShareUserMsg, BaseViewHolder>(R.layout.item_share_invite) {
override fun convert(holder: BaseViewHolder, item: ShareUserMsg) { override fun convert(holder: BaseViewHolder, item: ShareUserMsg) {
holder.getView<TextView>(R.id.tv_name).text = item.nickName 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_sex).text = "" + item.sex
holder.getView<TextView>(R.id.tv_status).text = "" + item.status holder.getView<TextView>(R.id.tv_status).text = "" + item.status
holder.getView<TextView>(R.id.tv_reward).text = "" + item.cash holder.getView<TextView>(R.id.tv_reward).text = "" + item.cash
GlideUtils.loadImageView(context, item.head, holder.getView(R.id.iv_avatar)) GlideUtils.loadThumbImageView(context, item.head, holder.getView(R.id.iv_avatar))
} }
} }
\ No newline at end of file
...@@ -15,6 +15,6 @@ class ShareRankAdapter : BaseQuickAdapter<ShareRank, BaseViewHolder>(R.layout.it ...@@ -15,6 +15,6 @@ class ShareRankAdapter : BaseQuickAdapter<ShareRank, BaseViewHolder>(R.layout.it
holder.getView<TextView>(R.id.tv_reward).text = "" + item.rewardCash holder.getView<TextView>(R.id.tv_reward).text = "" + item.rewardCash
holder.getView<TextView>(R.id.tv_rank_count).text = "" + holder.adapterPosition holder.getView<TextView>(R.id.tv_rank_count).text = "" + holder.adapterPosition
GlideUtils.loadImageView(context, item.head, holder.getView(R.id.iv_avatar)) GlideUtils.loadThumbImageView(context, item.head, holder.getView(R.id.iv_avatar))
} }
} }
\ No newline at end of file
...@@ -52,10 +52,9 @@ class FirstFragment : LazyLoadBaseFragment(), FirstView { ...@@ -52,10 +52,9 @@ class FirstFragment : LazyLoadBaseFragment(), FirstView {
override fun onFragmentResume() { override fun onFragmentResume() {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_ONE) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_ONE) {
// if (TextUtils.isEmpty(userManager?.userID)) {
if (TextUtils.isEmpty(userManager?.userID)) { // firstPresenter.userLogin()
firstPresenter.userLogin() // }
}
} }
} }
......
...@@ -133,7 +133,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -133,7 +133,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
tv_my_nickname.text = data.nickName tv_my_nickname.text = data.nickName
tv_my_label.text = "" + data.age + " " + data.city tv_my_label.text = "" + data.age + " " + data.city
tv_my_id.text = "ID:" + data.idcode tv_my_id.text = "ID:" + data.idcode
GlideUtils.loadImageView(requireContext(), data.headerUrl, civ_my_avatar) GlideUtils.loadThumbImageView(requireContext(), data.headerUrl, civ_my_avatar)
if (data.sex == 1) { if (data.sex == 1) {
// 男性无认证页面 // 男性无认证页面
......
...@@ -54,7 +54,7 @@ class SeeWechatDialog( ...@@ -54,7 +54,7 @@ class SeeWechatDialog(
tv_nickname.text = nickname tv_nickname.text = nickname
tv_wechat_code.text = wechatCode tv_wechat_code.text = wechatCode
GlideUtils.loadImageView(context, headUrl, iv_avatar) GlideUtils.loadThumbImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener { iv_close.setOnClickListener {
dismiss() dismiss()
......
...@@ -2,15 +2,10 @@ package com.duben.roseplaylet.ui.widgets ...@@ -2,15 +2,10 @@ package com.duben.roseplaylet.ui.widgets
import android.app.Dialog import android.app.Dialog
import android.content.Context import android.content.Context
import android.graphics.Bitmap
import android.text.Spanned
import android.text.TextUtils
import android.view.* import android.view.*
import android.widget.CheckBox
import android.widget.ImageView import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.viewpager.widget.ViewPager
import cn.sharesdk.framework.Platform import cn.sharesdk.framework.Platform
import cn.sharesdk.framework.Platform.ShareParams import cn.sharesdk.framework.Platform.ShareParams
import cn.sharesdk.framework.PlatformActionListener import cn.sharesdk.framework.PlatformActionListener
...@@ -18,21 +13,16 @@ import cn.sharesdk.framework.ShareSDK ...@@ -18,21 +13,16 @@ import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat import cn.sharesdk.wechat.friends.Wechat
import cn.sharesdk.wechat.moments.WechatMoments import cn.sharesdk.wechat.moments.WechatMoments
import com.duben.library.utils.ConstantUtil import com.duben.library.utils.ConstantUtil
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.BuildConfig
import com.duben.roseplaylet.MintsApplication import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.R import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.adapter.SharePagerAdapter import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.utils.BubbleUtils
import com.duben.roseplaylet.utils.QRCodeUtil import com.duben.roseplaylet.utils.QRCodeUtil
import com.duben.roseplaylet.utils.ToastUtil import com.duben.roseplaylet.utils.ToastUtil
import java.util.* import java.util.*
import kotlin.concurrent.schedule import kotlin.concurrent.schedule
class ShareDialog( class ShareDialog(context: Context, private val shareUrl: String) :
context: Context, Dialog(context, R.style.dialog) {
shareUrl: String
) : Dialog(context, R.style.dialog) {
private val llDialogShareWx: LinearLayout private val llDialogShareWx: LinearLayout
private val llDialogShareQq: LinearLayout private val llDialogShareQq: LinearLayout
...@@ -42,10 +32,6 @@ class ShareDialog( ...@@ -42,10 +32,6 @@ class ShareDialog(
private var mOnShareOKListener: OnShareOKListener? = null private var mOnShareOKListener: OnShareOKListener? = null
private var mOnShareCompleteListener: OnShareCompleteListener? = null private var mOnShareCompleteListener: OnShareCompleteListener? = null
private val viewPager: ViewPager
private val pagerAdapter: SharePagerAdapter
private val mViews: ArrayList<View>
private val wechat by lazy { ShareSDK.getPlatform(Wechat.NAME) } private val wechat by lazy { ShareSDK.getPlatform(Wechat.NAME) }
private val wechatMoments by lazy { ShareSDK.getPlatform(WechatMoments.NAME) } private val wechatMoments by lazy { ShareSDK.getPlatform(WechatMoments.NAME) }
...@@ -73,8 +59,6 @@ class ShareDialog( ...@@ -73,8 +59,6 @@ class ShareDialog(
tvDialogShareNext = findViewById<View>(R.id.tvDialogShareNext) as TextView tvDialogShareNext = findViewById<View>(R.id.tvDialogShareNext) as TextView
tvDialogShareTips = findViewById<View>(R.id.tvDialogShareTips) as TextView tvDialogShareTips = findViewById<View>(R.id.tvDialogShareTips) as TextView
viewPager = findViewById(R.id.view_pager)
viewPager.pageMargin = BubbleUtils.dp2px(30)
val QRCode = QRCodeUtil.createQRCode(shareUrl, 50) val QRCode = QRCodeUtil.createQRCode(shareUrl, 50)
val inflater = LayoutInflater.from(context) val inflater = LayoutInflater.from(context)
...@@ -85,39 +69,6 @@ class ShareDialog( ...@@ -85,39 +69,6 @@ class ShareDialog(
view1.findViewById<ImageView>(R.id.item_iv_qrcode).setImageBitmap(QRCode) view1.findViewById<ImageView>(R.id.item_iv_qrcode).setImageBitmap(QRCode)
view2.findViewById<ImageView>(R.id.item_iv_qrcode).setImageBitmap(QRCode) view2.findViewById<ImageView>(R.id.item_iv_qrcode).setImageBitmap(QRCode)
mViews = arrayListOf()
mViews.add(view1)
mViews.add(view2)
pagerAdapter = SharePagerAdapter(mViews)
viewPager.adapter = pagerAdapter
val cb2 = view2.findViewById<CheckBox>(R.id.item_cb_check)
val cb1 = view1.findViewById<CheckBox>(R.id.item_cb_check)
cb1.isChecked = true
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrolled(
position: Int,
positionOffset: Float,
positionOffsetPixels: Int
) {
}
override fun onPageSelected(position: Int) {
if (position == 0) {
cb1.isChecked = true
cb2.isChecked = false
} else {
cb1.isChecked = false
cb2.isChecked = true
}
}
override fun onPageScrollStateChanged(state: Int) {}
})
llDialogShareWx.setOnClickListener { llDialogShareWx.setOnClickListener {
shareWechat() shareWechat()
} }
...@@ -147,56 +98,11 @@ class ShareDialog( ...@@ -147,56 +98,11 @@ class ShareDialog(
fun onShareComplete() fun onShareComplete()
} }
fun setShareAvatar(imgSrc: String) {
mViews.forEach {
val avatar = it.findViewById<ImageView>(R.id.item_iv_avatar)
GlideUtils.loadImageViewLoding(context, imgSrc, avatar, R.mipmap.ic_my, R.mipmap.ic_my)
}
}
fun setShareTitle(title: String) {
mViews.forEach {
it.findViewById<TextView>(R.id.item_tv_name).text = title
}
}
fun setShareContent(content: String) {
mViews.forEach {
it.findViewById<TextView>(R.id.item_tv_info).text = content
}
}
fun setShareContent(content: Spanned) {
mViews.forEach {
it.findViewById<TextView>(R.id.item_tv_info).text = content
}
}
fun setShareWithNoWechatFavoiter(flag: Boolean) {
if (flag) {
llDialogShareWx.visibility = View.GONE
}
}
fun setShareTips(tips: String) {
if (!TextUtils.isEmpty(tips)) {
tvDialogShareTips.visibility = View.VISIBLE
tvDialogShareTips.text = tips
}
}
private fun shareWechat() { private fun shareWechat() {
val currentItem = viewPager.currentItem
val child = mViews[currentItem].findViewById<View>(R.id.item_iv_bg)
child.isDrawingCacheEnabled = true
child.drawingCacheQuality = View.DRAWING_CACHE_QUALITY_HIGH
child.buildDrawingCache()
val bitmap: Bitmap = child.drawingCache
val wechatSp = ShareParams() val wechatSp = ShareParams()
wechatSp.shareType = Platform.SHARE_IMAGE wechatSp.shareType = Platform.SHARE_WEBPAGE
wechatSp.imageData = bitmap wechatSp.text = Constant.MINTS_APP_NAME
wechatSp.url = shareUrl
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>?) {
...@@ -222,17 +128,10 @@ class ShareDialog( ...@@ -222,17 +128,10 @@ class ShareDialog(
} }
private fun shareWechatFavoite() { private fun shareWechatFavoite() {
val currentItem = viewPager.currentItem
val child = mViews[currentItem].findViewById<View>(R.id.item_iv_bg)
child.isDrawingCacheEnabled = true
child.drawingCacheQuality = View.DRAWING_CACHE_QUALITY_HIGH
child.buildDrawingCache()
val bitmap: Bitmap = child.drawingCache
val wechatSp = ShareParams() val wechatSp = ShareParams()
wechatSp.shareType = Platform.SHARE_IMAGE wechatSp.shareType = Platform.SHARE_WEBPAGE
wechatSp.imageData = bitmap wechatSp.text = Constant.MINTS_APP_NAME
wechatSp.url = shareUrl
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>?) {
......
package com.duben.roseplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.graphics.Bitmap
import android.text.Spanned
import android.text.TextUtils
import android.view.*
import android.widget.CheckBox
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.viewpager.widget.ViewPager
import cn.sharesdk.framework.Platform
import cn.sharesdk.framework.Platform.ShareParams
import cn.sharesdk.framework.PlatformActionListener
import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import cn.sharesdk.wechat.moments.WechatMoments
import com.duben.library.utils.ConstantUtil
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.BuildConfig
import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.adapter.SharePagerAdapter
import com.duben.roseplaylet.utils.BubbleUtils
import com.duben.roseplaylet.utils.QRCodeUtil
import com.duben.roseplaylet.utils.ToastUtil
import java.util.*
import kotlin.concurrent.schedule
class ShareImageDialog(
context: Context,
shareUrl: String
) : Dialog(context, R.style.dialog) {
private val llDialogShareWx: LinearLayout
private val llDialogShareQq: LinearLayout
private val tvDialogShareNext: TextView
private val tvDialogShareTips: TextView
private var mOnShareOKListener: OnShareOKListener? = null
private var mOnShareCompleteListener: OnShareCompleteListener? = null
private val viewPager: ViewPager
private val pagerAdapter: SharePagerAdapter
private val mViews: ArrayList<View>
private val wechat by lazy { ShareSDK.getPlatform(Wechat.NAME) }
private val wechatMoments by lazy { ShareSDK.getPlatform(WechatMoments.NAME) }
init {
setContentView(R.layout.dialog_share)
// 设置window属性
window?.let {
val lp = it.attributes
lp.gravity = Gravity.BOTTOM
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.height = WindowManager.LayoutParams.WRAP_CONTENT
lp.windowAnimations = R.style.DialogAnimBottom
it.attributes = lp
}
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ ->
i == KeyEvent.KEYCODE_BACK
}
llDialogShareWx = findViewById<View>(R.id.llDialogShareWx) as LinearLayout
llDialogShareQq = findViewById<View>(R.id.llDialogShareQq) as LinearLayout
tvDialogShareNext = findViewById<View>(R.id.tvDialogShareNext) as TextView
tvDialogShareTips = findViewById<View>(R.id.tvDialogShareTips) as TextView
viewPager = findViewById(R.id.view_pager)
viewPager.pageMargin = BubbleUtils.dp2px(30)
val QRCode = QRCodeUtil.createQRCode(shareUrl, 50)
val inflater = LayoutInflater.from(context)
val view1 = inflater.inflate(R.layout.item_share_view, null)
val view2 = inflater.inflate(R.layout.item_share_view, null)
view1.findViewById<View>(R.id.item_iv_bg).setBackgroundResource(R.mipmap.bg_share_1)
view2.findViewById<View>(R.id.item_iv_bg).setBackgroundResource(R.mipmap.bg_share_2)
view1.findViewById<ImageView>(R.id.item_iv_qrcode).setImageBitmap(QRCode)
view2.findViewById<ImageView>(R.id.item_iv_qrcode).setImageBitmap(QRCode)
mViews = arrayListOf()
mViews.add(view1)
mViews.add(view2)
pagerAdapter = SharePagerAdapter(mViews)
viewPager.adapter = pagerAdapter
val cb2 = view2.findViewById<CheckBox>(R.id.item_cb_check)
val cb1 = view1.findViewById<CheckBox>(R.id.item_cb_check)
cb1.isChecked = true
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrolled(
position: Int,
positionOffset: Float,
positionOffsetPixels: Int
) {
}
override fun onPageSelected(position: Int) {
if (position == 0) {
cb1.isChecked = true
cb2.isChecked = false
} else {
cb1.isChecked = false
cb2.isChecked = true
}
}
override fun onPageScrollStateChanged(state: Int) {}
})
llDialogShareWx.setOnClickListener {
shareWechat()
}
llDialogShareQq.setOnClickListener {
shareWechatFavoite()
}
tvDialogShareNext.setOnClickListener {
dismiss()
}
}
fun setOnShareOKListener(onShareOKListener: OnShareOKListener) {
mOnShareOKListener = onShareOKListener
}
interface OnShareOKListener {
fun onShareOk()
}
fun setOnShareCompleteListener(onShareCompleteListener: OnShareCompleteListener) {
mOnShareCompleteListener = onShareCompleteListener
}
interface OnShareCompleteListener {
fun onShareComplete()
}
fun setShareAvatar(imgSrc: String) {
mViews.forEach {
val avatar = it.findViewById<ImageView>(R.id.item_iv_avatar)
GlideUtils.loadImageViewLoding(context, imgSrc, avatar, R.mipmap.ic_my, R.mipmap.ic_my)
}
}
fun setShareTitle(title: String) {
mViews.forEach {
it.findViewById<TextView>(R.id.item_tv_name).text = title
}
}
fun setShareContent(content: String) {
mViews.forEach {
it.findViewById<TextView>(R.id.item_tv_info).text = content
}
}
fun setShareContent(content: Spanned) {
mViews.forEach {
it.findViewById<TextView>(R.id.item_tv_info).text = content
}
}
fun setShareWithNoWechatFavoiter(flag: Boolean) {
if (flag) {
llDialogShareWx.visibility = View.GONE
}
}
fun setShareTips(tips: String) {
if (!TextUtils.isEmpty(tips)) {
tvDialogShareTips.visibility = View.VISIBLE
tvDialogShareTips.text = tips
}
}
private fun shareWechat() {
val currentItem = viewPager.currentItem
val child = mViews[currentItem].findViewById<View>(R.id.item_iv_bg)
child.isDrawingCacheEnabled = true
child.drawingCacheQuality = View.DRAWING_CACHE_QUALITY_HIGH
child.buildDrawingCache()
val bitmap: Bitmap = child.drawingCache
val wechatSp = ShareParams()
wechatSp.shareType = Platform.SHARE_IMAGE
wechatSp.imageData = bitmap
if (ConstantUtil.isInstall(context, "com.tencent.mm")) {
wechat.platformActionListener = object : PlatformActionListener {
override fun onComplete(p0: Platform?, p1: Int, p2: HashMap<String, Any>?) {
mOnShareCompleteListener?.onShareComplete()
}
override fun onError(p0: Platform?, p1: Int, p2: Throwable?) {
}
override fun onCancel(p0: Platform?, p1: Int) {
}
}
mOnShareOKListener?.onShareOk()
wechat.share(wechatSp)
} else {
ToastUtil.show(MintsApplication.getContext(), "请先安装微信")
}
Timer().schedule(1000) {
dismiss()
}
}
private fun shareWechatFavoite() {
val currentItem = viewPager.currentItem
val child = mViews[currentItem].findViewById<View>(R.id.item_iv_bg)
child.isDrawingCacheEnabled = true
child.drawingCacheQuality = View.DRAWING_CACHE_QUALITY_HIGH
child.buildDrawingCache()
val bitmap: Bitmap = child.drawingCache
val wechatSp = ShareParams()
wechatSp.shareType = Platform.SHARE_IMAGE
wechatSp.imageData = bitmap
if (ConstantUtil.isInstall(context, "com.tencent.mm")) {
wechatMoments.platformActionListener = object : PlatformActionListener {
override fun onComplete(p0: Platform?, p1: Int, p2: HashMap<String, Any>?) {
mOnShareCompleteListener?.onShareComplete()
}
override fun onError(p0: Platform?, p1: Int, p2: Throwable?) {
}
override fun onCancel(p0: Platform?, p1: Int) {
}
}
mOnShareOKListener?.onShareOk()
wechatMoments.share(wechatSp)
} else {
ToastUtil.show(MintsApplication.getContext(), "请先安装微信")
}
Timer().schedule(1000) {
dismiss()
}
}
}
\ No newline at end of file
...@@ -47,7 +47,7 @@ class UnlockChatDialog( ...@@ -47,7 +47,7 @@ class UnlockChatDialog(
tv_unlock.text = "解锁私聊" tv_unlock.text = "解锁私聊"
GlideUtils.loadImageView(context, headUrl, iv_avatar) GlideUtils.loadThumbImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener { iv_close.setOnClickListener {
dismiss() dismiss()
......
...@@ -14,6 +14,7 @@ import com.duben.roseplaylet.R ...@@ -14,6 +14,7 @@ import com.duben.roseplaylet.R
class UnlockWechatDialog( class UnlockWechatDialog(
private val context: Context, private val context: Context,
private val headUrl: String?, private val headUrl: String?,
private val isVip: Boolean = false,
private val listener: DialogListener? private val listener: DialogListener?
) : ) :
Dialog(context, R.style.dialog) { Dialog(context, R.style.dialog) {
...@@ -42,8 +43,7 @@ class UnlockWechatDialog( ...@@ -42,8 +43,7 @@ class UnlockWechatDialog(
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
GlideUtils.loadThumbImageView(context, headUrl, iv_avatar)
GlideUtils.loadImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener { iv_close.setOnClickListener {
dismiss() dismiss()
...@@ -51,5 +51,11 @@ class UnlockWechatDialog( ...@@ -51,5 +51,11 @@ class UnlockWechatDialog(
listener?.setDialog(this) listener?.setDialog(this)
tv_vip_btn.setOnClickListener(listener) tv_vip_btn.setOnClickListener(listener)
tv_vip_coin.setOnClickListener(listener) tv_vip_coin.setOnClickListener(listener)
if (isVip) {
tv_vip_btn.visibility = View.GONE
tv_vip_coin.text = "直接联系"
}
} }
} }
\ 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/black" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/black"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/header_layout" /> <include layout="@layout/header_layout" />
...@@ -147,10 +147,10 @@ ...@@ -147,10 +147,10 @@
android:layout_marginLeft="40dp" android:layout_marginLeft="40dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginRight="40dp" android:layout_marginRight="40dp"
android:background="@drawable/shape_red" android:background="@drawable/shape_vip_btn"
android:gravity="center" android:gravity="center"
android:text="绑定手机号" android:text="绑定手机号"
android:textColor="@color/white" android:textColor="@color/black"
android:textSize="20sp" /> android:textSize="20sp" />
<LinearLayout <LinearLayout
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/black"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/header_layout" /> <include layout="@layout/header_layout" />
...@@ -10,14 +10,13 @@ ...@@ -10,14 +10,13 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#F9F9F9"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:background="@color/white" android:background="@color/color_6F6F71"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
...@@ -91,7 +90,7 @@ ...@@ -91,7 +90,7 @@
android:layout_height="235dp" android:layout_height="235dp"
android:layout_marginTop="13dp" android:layout_marginTop="13dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@color/white" android:background="@color/black"
android:padding="15dp"> android:padding="15dp">
<EditText <EditText
...@@ -101,6 +100,8 @@ ...@@ -101,6 +100,8 @@
android:background="@color/full_transparent" android:background="@color/full_transparent"
android:gravity="top" android:gravity="top"
android:hint="请留下您的批评、表扬或者建议,我们会虚心听取, 认真改正。(请保持在5-150字内)" android:hint="请留下您的批评、表扬或者建议,我们会虚心听取, 认真改正。(请保持在5-150字内)"
android:textColor="@color/white"
android:textColorHint="@color/color_6F6F71"
android:textSize="13sp" /> android:textSize="13sp" />
<TextView <TextView
...@@ -110,21 +111,22 @@ ...@@ -110,21 +111,22 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:text="0/150" android:text="0/150"
android:textColor="@color/white"
android:textSize="12sp" /> android:textSize="12sp" />
</RelativeLayout> </RelativeLayout>
<Button <Button
android:id="@+id/btn_feedback_next" android:id="@+id/btn_feedback_next"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="45dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginLeft="40dp" android:layout_marginLeft="40dp"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:layout_marginRight="40dp" android:layout_marginRight="40dp"
android:background="@drawable/shape_red" android:background="@drawable/shape_vip_btn"
android:gravity="center" android:gravity="center"
android:text="提交" android:text="提交"
android:textColor="@color/white" android:textColor="@color/black"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_margin="10dp" android:layout_margin="10dp"
android:background="@drawable/shape_main_black" android:background="@drawable/shape_bg_black"
android:elevation="2dp" android:elevation="2dp"
android:text="发布心情" android:text="发布心情"
android:textColor="@color/white" android:textColor="@color/white"
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<TextView <TextView
android:layout_width="45dp" android:layout_width="45dp"
android:layout_height="45dp" android:layout_height="45dp"
android:background="@drawable/shape_rule_gary" android:background="@drawable/shape_green"
android:gravity="center" android:gravity="center"
android:text="禁" android:text="禁"
android:textColor="@color/color_FF9837" android:textColor="@color/color_FF9837"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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:orientation="vertical"> android:orientation="vertical">
<!-- <com.sunfusheng.marqueeview.MarqueeView-->
<!-- android:id="@+id/marqueeView"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="30dp"-->
<!-- android:background="@color/color_48484C"-->
<!-- app:mvAnimDuration="1000"-->
<!-- app:mvDirection="bottom_to_top"-->
<!-- app:mvInterval="3000"-->
<!-- app:mvSingleLine="true"-->
<!-- app:mvTextColor="@color/color_F9F9F9"-->
<!-- app:mvTextSize="14sp" />-->
<TextView <TextView
android:id="@+id/tv_tips" android:id="@+id/tv_tips"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="25dp" android:layout_height="25dp"
android:background="@color/color_48484C" android:background="@color/color_48484C"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center" android:gravity="center"
android:lines="1" android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:textColor="@color/color_8F8E94" android:textColor="@color/color_8F8E94"
...@@ -92,7 +81,8 @@ ...@@ -92,7 +81,8 @@
android:background="@drawable/shape_chat_black" android:background="@drawable/shape_chat_black"
android:gravity="center" android:gravity="center"
android:text="发送微信给TA" android:text="发送微信给TA"
android:textColor="@color/color_FDEEC8" /> android:textColor="@color/color_FDEEC8"
android:visibility="invisible" />
</RelativeLayout> </RelativeLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/linearLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="30dp" android:layout_gravity="bottom"
android:background="@color/full_transparent"> android:background="@drawable/shape_share"
android:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="450dp"
android:layout_marginBottom="30dp"
android:clipToPadding="false"
android:paddingStart="60dp"
android:paddingEnd="60dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="110dp"
android:background="@drawable/shape_tab_friends" android:gravity="center_vertical"
android:orientation="vertical" android:orientation="horizontal">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:id="@+id/llDialogShareWx"
android:layout_height="110dp" android:layout_width="0dp"
android:gravity="center_vertical" android:layout_height="wrap_content"
android:orientation="horizontal"> android:layout_weight="1.0"
android:gravity="center"
<LinearLayout android:orientation="vertical">
android:id="@+id/llDialogShareWx"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/ic_share_wx" />
<TextView <ImageView
android:layout_width="wrap_content" android:layout_width="50dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_marginTop="6dp" android:src="@mipmap/ic_share_wx" />
android:text="微信"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout <TextView
android:id="@+id/llDialogShareQq" android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_marginTop="6dp"
android:gravity="center" android:text="微信"
android:orientation="vertical"> android:textColor="@color/white"
android:textSize="14sp" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_wx_friends" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="朋友圈"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<TextView <LinearLayout
android:id="@+id/tvDialogShareTips" android:id="@+id/llDialogShareQq"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_weight="1.0"
android:gravity="center" android:gravity="center"
android:text="取消" android:orientation="vertical">
android:textSize="12sp"
android:visibility="gone" />
<View style="@style/line_3" /> <ImageView
android:layout_width="50dp"
<TextView android:layout_height="50dp"
android:id="@+id/tvDialogShareNext" android:layout_gravity="center_horizontal"
android:layout_width="match_parent" android:src="@mipmap/ic_wx_friends" />
android:layout_height="40dp"
android:gravity="center"
android:text="取消"
android:textColor="@color/black"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="朋友圈"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> <TextView
\ No newline at end of file android:id="@+id/tvDialogShareTips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="取消"
android:textSize="12sp"
android:visibility="gone" />
<View style="@style/view_line_808080" />
<TextView
android:id="@+id/tvDialogShareNext"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="取消"
android:textColor="@color/white"
android:textSize="18sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="30dp"
android:background="@color/full_transparent">
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="450dp"
android:layout_marginBottom="30dp"
android:clipToPadding="false"
android:paddingStart="60dp"
android:paddingEnd="60dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_tab_friends"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="110dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/llDialogShareWx"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/ic_share_wx" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="微信"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/llDialogShareQq"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_wx_friends" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="朋友圈"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tvDialogShareTips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="取消"
android:textSize="12sp"
android:visibility="gone" />
<View style="@style/line_3" />
<TextView
android:id="@+id/tvDialogShareNext"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="取消"
android:textColor="@color/black"
android:textSize="18sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
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"
android:text="解锁微信号" android:text="解锁私聊,同时解锁联系方式"
android:textColor="@color/color_FCE8BA" android:textColor="@color/color_FCE8BA"
android:textSize="20sp" /> android:textSize="20sp" />
......
...@@ -376,11 +376,11 @@ ...@@ -376,11 +376,11 @@
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone"> android:visibility="gone">
<ImageView <!-- <ImageView-->
android:layout_width="25dp" <!-- android:layout_width="25dp"-->
android:layout_height="25dp" <!-- android:layout_height="25dp"-->
android:layout_marginEnd="10dp" <!-- android:layout_marginEnd="10dp"-->
android:src="@mipmap/ic_my_wechat" /> <!-- android:src="@mipmap/ic_my_wechat" />-->
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:padding="10dp" android:padding="10dp"
android:visibility="gone" android:src="@mipmap/ic_arrow_white"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:id="@+id/tv_title" android:id="@+id/tv_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/product_net_text" android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/my_color_gray" android:background="@color/my_color_gray"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/iv_right_icon" /> app:layout_constraintEnd_toEndOf="@+id/iv_right_icon" />
......
...@@ -57,5 +57,5 @@ ext { ...@@ -57,5 +57,5 @@ ext {
androidCompileSdkVersion = 31 androidCompileSdkVersion = 31
androidBuildToolsVersion = '31.0.0' androidBuildToolsVersion = '31.0.0'
androidMinSdkVersion = 21 androidMinSdkVersion = 21
androidTargetSdkVersion = 31 androidTargetSdkVersion = 35
} }
\ 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