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