Commit d92d3aa7 authored by jyx's avatar jyx

优化样式

parent 8b1b7a54
...@@ -208,9 +208,9 @@ public class ConversationPresenter { ...@@ -208,9 +208,9 @@ public class ConversationPresenter {
} }
protected void onLoadConversationCompleted(List<ConversationInfo> conversationInfoList) { protected void onLoadConversationCompleted(List<ConversationInfo> conversationInfoList) {
for (ConversationInfo conversationInfo : conversationInfoList) { // for (ConversationInfo conversationInfo : conversationInfoList) {
System.out.println("AAAAAAAAAA" + conversationInfo.getConversationId()); // System.out.println("AAAAAAAAAA" + conversationInfo.getConversationId());
} // }
onNewConversation(conversationInfoList, false); onNewConversation(conversationInfoList, false);
if (adapter != null) { if (adapter != null) {
adapter.onLoadingStateChanged(false); adapter.onLoadingStateChanged(false);
......
...@@ -138,6 +138,7 @@ android { ...@@ -138,6 +138,7 @@ android {
huawei {} huawei {}
xiaomi {} xiaomi {}
store360 {} store360 {}
share_mints {}
} }
productFlavors.all { productFlavors.all {
...@@ -323,8 +324,8 @@ dependencies { ...@@ -323,8 +324,8 @@ dependencies {
// 图片选择 // 图片选择
api project(':picture_library') api project(':picture_library')
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
// 权限 // 流式布局
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar' // implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
implementation 'com.hyman:flowlayout-lib:1.1.2' implementation 'com.hyman:flowlayout-lib:1.1.2'
// view模糊 // view模糊
implementation 'com.github.centerzx:ShapeBlurView:1.0.5' implementation 'com.github.centerzx:ShapeBlurView:1.0.5'
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application <application
android:name=".MintsApplication" android:name=".MintsApplication"
......
...@@ -7,10 +7,7 @@ import android.widget.ImageView ...@@ -7,10 +7,7 @@ import android.widget.ImageView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.Priority import com.bumptech.glide.Priority
import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.resource.bitmap.CenterCrop import com.bumptech.glide.load.resource.bitmap.*
import com.bumptech.glide.load.resource.bitmap.CenterInside
import com.bumptech.glide.load.resource.bitmap.FitCenter
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.SimpleTarget import com.bumptech.glide.request.target.SimpleTarget
import com.bumptech.glide.request.transition.Transition import com.bumptech.glide.request.transition.Transition
...@@ -19,6 +16,7 @@ import com.duben.roseplaylet.R ...@@ -19,6 +16,7 @@ import com.duben.roseplaylet.R
import com.duben.roseplaylet.utils.BubbleUtils import com.duben.roseplaylet.utils.BubbleUtils
import jp.wasabeef.glide.transformations.BlurTransformation import jp.wasabeef.glide.transformations.BlurTransformation
/** /**
* 描述:GlideUtils * 描述:GlideUtils
* 作者:孟崔广 * 作者:孟崔广
...@@ -217,7 +215,6 @@ object GlideUtils { ...@@ -217,7 +215,6 @@ object GlideUtils {
.into(imageView) .into(imageView)
} }
//加载毛玻璃图片 //加载毛玻璃图片
fun loadBlurImageView(mContext: Context, url: String, imageView: ImageView) { fun loadBlurImageView(mContext: Context, url: String, imageView: ImageView) {
Glide.with(mContext).load(url) Glide.with(mContext).load(url)
...@@ -238,6 +235,22 @@ object GlideUtils { ...@@ -238,6 +235,22 @@ object GlideUtils {
).into(mImageView) ).into(mImageView)
} }
//默认加载
fun loadThumbRound2ImageView(
mContext: Context,
path: String?,
mImageView: ImageView,
defaultImage: Int = R.mipmap.ic_my_avat
) {
Glide.with(mContext).load("$path?x-oss-process=image/resize,p_20").apply(
RequestOptions().transform(
CenterCrop(),
RoundedCorners(BubbleUtils.dp2px(5))
).placeholder(defaultImage)
.error(defaultImage)
).dontAnimate().into(mImageView)
}
//默认加载 //默认加载
fun loadThumbRoundImageView( fun loadThumbRoundImageView(
mContext: Context, mContext: Context,
...@@ -254,13 +267,38 @@ object GlideUtils { ...@@ -254,13 +267,38 @@ object GlideUtils {
).dontAnimate().into(mImageView) ).dontAnimate().into(mImageView)
} }
//加载毛玻璃图片
fun loadIsThumbBlurImageView(
mContext: Context,
path: String,
imageView: ImageView,
corners: Float = 10f,
isBlur: Boolean = false
) {
if (isBlur) {
// 加载带有毛玻璃效果和圆角的图片
val options = RequestOptions()
.transform(
BlurTransformation(25, 4)
)
Glide.with(mContext)
.load("$path?x-oss-process=image/resize,p_20")
.apply(options)
.into(imageView)
} else {
Glide.with(mContext).load("$path?x-oss-process=image/resize,p_20")
.apply(
RequestOptions().transform(
CenterCrop(),
RoundedCorners(BubbleUtils.dp2px(corners.toInt()))
)
)
.into(imageView)
}
}
//默认加载 //默认加载
fun loadHighRoundImageView(mContext: Context, path: String?, mImageView: ImageView) { fun loadHighRoundImageView(mContext: Context, path: String?, mImageView: ImageView) {
Glide.with(mContext).load(path).apply( Glide.with(mContext).load(path).dontAnimate().into(mImageView)
RequestOptions().transform(
CenterCrop(), RoundedCorners(BubbleUtils.dp2px(10))
).placeholder(R.mipmap.ic_my_avat)
.error(R.mipmap.ic_my_avat)
).dontAnimate().into(mImageView)
} }
} }
\ No newline at end of file
...@@ -12,6 +12,10 @@ object Constant { ...@@ -12,6 +12,10 @@ object Constant {
const val VEDIO_NEXT = "VEDIO_NEXT" const val VEDIO_NEXT = "VEDIO_NEXT"
const val VEDIO_THIRD = "VEDIO_THIRD" const val VEDIO_THIRD = "VEDIO_THIRD"
const val APP_B_PKG = "share_mints"
const val APP_B_PKG_PREFIX = "#ZSSCODE#"
/** /**
* 首次弹出权限声明 * 首次弹出权限声明
*/ */
......
...@@ -100,8 +100,8 @@ class IMHelper private constructor() { ...@@ -100,8 +100,8 @@ class IMHelper private constructor() {
) )
// 用户头像大小、圆角半径 // 用户头像大小、圆角半径
TUIConfigClassic.setMessageListAvatarSize(120) // TUIConfigClassic.setMessageListAvatarSize(120)
TUIConfigClassic.setMessageListAvatarRadius(120) // TUIConfigClassic.setMessageListAvatarRadius(120)
// 聊天界面背景色 // 聊天界面背景色
TUIChatConfigClassic.setBackground(ColorDrawable(appContext.resources.getColor(R.color.color_07060C))) TUIChatConfigClassic.setBackground(ColorDrawable(appContext.resources.getColor(R.color.color_07060C)))
TUIConfigClassic.setSendBubbleBackground( TUIConfigClassic.setSendBubbleBackground(
...@@ -168,8 +168,7 @@ class IMHelper private constructor() { ...@@ -168,8 +168,7 @@ class IMHelper private constructor() {
RxBus.getDefault().post(imMsg) RxBus.getDefault().post(imMsg)
} }
override fun onError(code: Int, desc: String?) { override fun onError(code: Int, desc: String?) {}
}
}) })
} }
......
package com.duben.roseplaylet.manager package com.duben.roseplaylet.manager
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.MintsApplication import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.ui.activitys.BasicUserProfileActivity import com.duben.roseplaylet.ui.activitys.BasicUserProfileActivity
import com.duben.roseplaylet.ui.widgets.RealAuthDialog import com.duben.roseplaylet.ui.widgets.RealAuthDialog
import com.duben.roseplaylet.utils.MateUtils
import com.duben.roseplaylet.utils.ToastUtil import com.duben.roseplaylet.utils.ToastUtil
import com.google.gson.JsonObject
class UserHelper private constructor() { class UserHelper private constructor() {
...@@ -38,7 +47,7 @@ class UserHelper private constructor() { ...@@ -38,7 +47,7 @@ class UserHelper private constructor() {
//用户是否实名 //用户是否实名
fun isUserAuth(): Boolean { fun isUserAuth(): Boolean {
if (userInstance.idcardStatus == 1) { if (userInstance.idcardStatus == 1 || userInstance.userSex == 1) {
return true return true
} }
receiveErrorCode(COMMON_ERROR_CODE_NO_AUTH) receiveErrorCode(COMMON_ERROR_CODE_NO_AUTH)
...@@ -86,4 +95,58 @@ class UserHelper private constructor() { ...@@ -86,4 +95,58 @@ class UserHelper private constructor() {
} }
} }
fun loginAfterDoSomething() {
isBpkg()
IMHelper.instance.getImMsg()
}
private fun isBpkg() {
val application = MintsApplication.getContext() as MintsApplication
if (MateUtils.getAppMetaData(application, "CHANNEL_NAME") != Constant.APP_B_PKG) {
// 如果不是B包 不处理
return
}
var clipboardText = getClipboardText(application)
if (clipboardText.isEmpty()) {
// 如果剪切板没有数据
return
}
if (!clipboardText.contains(Constant.APP_B_PKG_PREFIX)) {
return
}
clipboardText = clipboardText.replace(Constant.APP_B_PKG_PREFIX, "")
val vo = HashMap<String, Any>()
vo["shareCode"] = clipboardText
AppHttpManager.getInstance(application)
.call(application.loanService.updateRuserShareCode(vo),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {}
override fun onError(e: Throwable) {}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (baseResponse.status == 200) {
// TODO
}
}
})
}
fun getClipboardText(context: Context): String {
val clipboard =
context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
if (clipboard.hasPrimaryClip()) {
val clip: ClipData? = clipboard.primaryClip
if (clip != null && clip.itemCount > 0) {
val text: CharSequence? = clip.getItemAt(0).text
if (!text.isNullOrEmpty()) {
return text.toString()
}
ToastUtil.show(MintsApplication.getContext(), text.toString())
}
}
return ""
}
} }
\ No newline at end of file
...@@ -11,6 +11,6 @@ data class SeeWechat( ...@@ -11,6 +11,6 @@ data class SeeWechat(
val errMsg: String? = null, val errMsg: String? = null,
val hasWechat: Boolean, val hasWechat: Boolean,
val online: Boolean, val online: Boolean,
val surCount: Int, val surCount: Int = 0,
val wechat: String = "" val wechat: String = ""
) : java.io.Serializable ) : java.io.Serializable
\ No newline at end of file
...@@ -14,7 +14,7 @@ data class UserData( ...@@ -14,7 +14,7 @@ data class UserData(
val headerUrl: String = "", val headerUrl: String = "",
val idcardStatus: Int = 0, val idcardStatus: Int = 0,
val lastCity: String = "", val lastCity: String = "",
val likeStatus: Int = 0, var likeStatus: Int = 0,
val nickName: String = "", val nickName: String = "",
val online: Boolean = false, val online: Boolean = false,
val rtime: String = "", val rtime: String = "",
......
...@@ -11,7 +11,7 @@ import java.util.HashMap ...@@ -11,7 +11,7 @@ import java.util.HashMap
class CommonPresenter : BasePresenter<CommonView>() { class CommonPresenter : BasePresenter<CommonView>() {
fun toLike(toUid: String, status: Int) { fun toLike(toUid: String, status: Int, position: Int) {
val vo = hashMapOf<String, Any>() val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid vo["toUid"] = toUid
vo["status"] = status vo["status"] = status
...@@ -30,7 +30,7 @@ class CommonPresenter : BasePresenter<CommonView>() { ...@@ -30,7 +30,7 @@ class CommonPresenter : BasePresenter<CommonView>() {
val message = baseResponse.message val message = baseResponse.message
when (code) { when (code) {
200 -> {} 200 -> view.toLikeSuc(position)
else -> { else -> {
view.showToast(message) view.showToast(message)
} }
......
...@@ -13,6 +13,7 @@ import com.duben.library.net.neterror.BaseSubscriber ...@@ -13,6 +13,7 @@ import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.common.AppConfig import com.duben.roseplaylet.common.AppConfig
import com.duben.roseplaylet.manager.IMHelper import com.duben.roseplaylet.manager.IMHelper
import com.duben.roseplaylet.manager.UserHelper
import com.duben.roseplaylet.mvp.views.FirstView import com.duben.roseplaylet.mvp.views.FirstView
import com.google.gson.JsonObject import com.google.gson.JsonObject
import java.util.HashMap import java.util.HashMap
...@@ -46,7 +47,7 @@ class FirstPresenter : BasePresenter<FirstView>() { ...@@ -46,7 +47,7 @@ class FirstPresenter : BasePresenter<FirstView>() {
200 -> if (data != null) { 200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data) UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo() saveTerminalInfo()
IMHelper.instance.getImMsg() UserHelper.instance.loginAfterDoSomething()
} }
else -> { else -> {
view.showToast(message) view.showToast(message)
......
...@@ -10,6 +10,7 @@ import com.duben.roseplaylet.utils.DeviceUuidFactory ...@@ -10,6 +10,7 @@ import com.duben.roseplaylet.utils.DeviceUuidFactory
import com.duben.library.net.neterror.BaseSubscriber import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.IMHelper import com.duben.roseplaylet.manager.IMHelper
import com.duben.roseplaylet.manager.UserHelper
import com.google.gson.JsonObject import com.google.gson.JsonObject
import java.util.HashMap import java.util.HashMap
...@@ -166,7 +167,7 @@ class HomePresenter : BasePresenter<HomeView>() { ...@@ -166,7 +167,7 @@ class HomePresenter : BasePresenter<HomeView>() {
200 -> if (data != null) { 200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data) UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo() saveTerminalInfo()
IMHelper.instance.getImMsg() UserHelper.instance.loginAfterDoSomething()
} }
else -> { else -> {
view.showToast(message) view.showToast(message)
......
...@@ -11,7 +11,7 @@ import com.google.gson.JsonObject ...@@ -11,7 +11,7 @@ import com.google.gson.JsonObject
class SquarePresenter : BasePresenter<SquareView>() { class SquarePresenter : BasePresenter<SquareView>() {
fun toLike(toUid: String, status: Int) { fun toLike(toUid: String, status: Int, position: Int) {
val vo = hashMapOf<String, Any>() val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid vo["toUid"] = toUid
vo["status"] = status vo["status"] = status
...@@ -30,7 +30,7 @@ class SquarePresenter : BasePresenter<SquareView>() { ...@@ -30,7 +30,7 @@ class SquarePresenter : BasePresenter<SquareView>() {
val message = baseResponse.message val message = baseResponse.message
when (code) { when (code) {
200 -> {} 200 -> view.toLikeSuc(position)
else -> { else -> {
view.showToast(message) view.showToast(message)
} }
...@@ -123,33 +123,4 @@ class SquarePresenter : BasePresenter<SquareView>() { ...@@ -123,33 +123,4 @@ class SquarePresenter : BasePresenter<SquareView>() {
}) })
} }
fun topTabs() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.topTabs(),
object : BaseSubscriber<BaseResponse<BannerList>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
}
override fun onNext(baseResponse: BaseResponse<BannerList>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.topTabsSuc(baseResponse.data)
}
else -> {
view.showToast(message)
}
}
}
})
}
} }
\ No newline at end of file
...@@ -10,6 +10,7 @@ import com.duben.roseplaylet.common.AppConfig; ...@@ -10,6 +10,7 @@ import com.duben.roseplaylet.common.AppConfig;
import com.duben.roseplaylet.common.DeviceInfo; import com.duben.roseplaylet.common.DeviceInfo;
import com.duben.roseplaylet.manager.AppHttpManager; import com.duben.roseplaylet.manager.AppHttpManager;
import com.duben.roseplaylet.manager.IMHelper; import com.duben.roseplaylet.manager.IMHelper;
import com.duben.roseplaylet.manager.UserHelper;
import com.duben.roseplaylet.manager.UserManager; import com.duben.roseplaylet.manager.UserManager;
import com.duben.roseplaylet.mvp.model.BaseResponse; import com.duben.roseplaylet.mvp.model.BaseResponse;
import com.duben.roseplaylet.mvp.model.UserBean; import com.duben.roseplaylet.mvp.model.UserBean;
...@@ -69,7 +70,7 @@ public class TrackPresenter extends BaseTrackPresenter { ...@@ -69,7 +70,7 @@ public class TrackPresenter extends BaseTrackPresenter {
switch (baseResponse.getStatus()) { switch (baseResponse.getStatus()) {
case 200: { case 200: {
UserManager.getInstance().saveUserInfo(baseResponse.getData()); UserManager.getInstance().saveUserInfo(baseResponse.getData());
IMHelper.Companion.getInstance().getImMsg(); UserHelper.Companion.getInstance().loginAfterDoSomething();
} }
} }
} }
......
...@@ -6,4 +6,6 @@ interface CommonView : BaseView { ...@@ -6,4 +6,6 @@ interface CommonView : BaseView {
fun getCommonDataSuc(data: UserList) fun getCommonDataSuc(data: UserList)
fun getCommonDataFail() fun getCommonDataFail()
fun toLikeSuc(position: Int)
} }
\ No newline at end of file
package com.duben.roseplaylet.mvp.views package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.BannerList
import com.duben.roseplaylet.mvp.model.HallList import com.duben.roseplaylet.mvp.model.HallList
interface SquareView : BaseView { interface SquareView : BaseView {
fun topTabsSuc(data: BannerList?)
fun getHallListSuc(list: HallList) fun getHallListSuc(list: HallList)
fun getHallListFail() fun getHallListFail()
fun toLikeSuc(position: Int)
} }
\ No newline at end of file
...@@ -24,6 +24,7 @@ import com.duben.roseplaylet.ui.widgets.DialogListener ...@@ -24,6 +24,7 @@ import com.duben.roseplaylet.ui.widgets.DialogListener
import com.duben.roseplaylet.ui.widgets.nineImage.AddImagesInfo import com.duben.roseplaylet.ui.widgets.nineImage.AddImagesInfo
import com.duben.roseplaylet.ui.widgets.nineImage.AddImagesView import com.duben.roseplaylet.ui.widgets.nineImage.AddImagesView
import com.duben.roseplaylet.utils.GlideEngine import com.duben.roseplaylet.utils.GlideEngine
import com.duben.roseplaylet.utils.LogUtil
import com.luck.picture.lib.PictureSelector import com.luck.picture.lib.PictureSelector
import com.luck.picture.lib.compress.Luban import com.luck.picture.lib.compress.Luban
import com.luck.picture.lib.config.PictureConfig import com.luck.picture.lib.config.PictureConfig
...@@ -32,7 +33,7 @@ import com.luck.picture.lib.entity.LocalMedia ...@@ -32,7 +33,7 @@ import com.luck.picture.lib.entity.LocalMedia
import com.luck.picture.lib.style.PictureWindowAnimationStyle import com.luck.picture.lib.style.PictureWindowAnimationStyle
import com.luck.picture.lib.thread.PictureThreadUtils import com.luck.picture.lib.thread.PictureThreadUtils
import com.luck.picture.lib.tools.DateUtils import com.luck.picture.lib.tools.DateUtils
import com.tbruyelle.rxpermissions.RxPermissions import com.permissionx.guolindev.PermissionX
import com.yalantis.ucrop.UCrop import com.yalantis.ucrop.UCrop
import kotlinx.android.synthetic.main.activity_album.* import kotlinx.android.synthetic.main.activity_album.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -123,10 +124,14 @@ class AlbumActivity : BaseActivity(), View.OnClickListener, AlbumView { ...@@ -123,10 +124,14 @@ class AlbumActivity : BaseActivity(), View.OnClickListener, AlbumView {
private fun showAlbum() { private fun showAlbum() {
mCanUploadMax = MAX_ALBUM_SIZE - aiv.getAddImages().size mCanUploadMax = MAX_ALBUM_SIZE - aiv.getAddImages().size
RxPermissions(this) PermissionX.init(this)
.request(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.CAMERA) .permissions(
.subscribe { granted: Boolean -> Manifest.permission.READ_EXTERNAL_STORAGE,
if (granted) { // Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA
)
.request { allGranted: Boolean, grantedList: List<String>, deniedList: List<String> ->
if (allGranted) {
PictureSelector.create(this) PictureSelector.create(this)
.openGallery(PictureMimeType.ofImage()) .openGallery(PictureMimeType.ofImage())
.theme(R.style.picture_WeChat_style) // 微信主题色 .theme(R.style.picture_WeChat_style) // 微信主题色
...@@ -147,7 +152,8 @@ class AlbumActivity : BaseActivity(), View.OnClickListener, AlbumView { ...@@ -147,7 +152,8 @@ class AlbumActivity : BaseActivity(), View.OnClickListener, AlbumView {
.imageEngine(GlideEngine.createGlideEngine())// 图片加载引擎 .imageEngine(GlideEngine.createGlideEngine())// 图片加载引擎
.forResult(PictureConfig.CHOOSE_REQUEST) .forResult(PictureConfig.CHOOSE_REQUEST)
} else { } else {
showMissingPermissionDialog("存储") LogUtil.d("AAAAAAAAA" + deniedList)
showMissingPermissionDialog("存储 相机")
} }
} }
} }
...@@ -265,14 +271,9 @@ class AlbumActivity : BaseActivity(), View.OnClickListener, AlbumView { ...@@ -265,14 +271,9 @@ class AlbumActivity : BaseActivity(), View.OnClickListener, AlbumView {
aiv.addAddImages(imgList) aiv.addAddImages(imgList)
} }
override fun getImagesFail() { override fun getImagesFail() {}
} override fun setImagesSuc() {}
override fun setImagesSuc() {
} override fun setImagesFail() {}
override fun setImagesFail() {
}
} }
\ No newline at end of file
...@@ -32,7 +32,7 @@ import com.luck.picture.lib.style.PictureWindowAnimationStyle ...@@ -32,7 +32,7 @@ import com.luck.picture.lib.style.PictureWindowAnimationStyle
import com.luck.picture.lib.thread.PictureThreadUtils import com.luck.picture.lib.thread.PictureThreadUtils
import com.luck.picture.lib.tools.DateUtils import com.luck.picture.lib.tools.DateUtils
import com.luck.picture.lib.tools.SdkVersionUtils import com.luck.picture.lib.tools.SdkVersionUtils
import com.tbruyelle.rxpermissions.RxPermissions import com.permissionx.guolindev.PermissionX
import com.yalantis.ucrop.UCrop import com.yalantis.ucrop.UCrop
import kotlinx.android.synthetic.main.activity_basic_user_profile.* import kotlinx.android.synthetic.main.activity_basic_user_profile.*
import kotlinx.android.synthetic.main.dialog_nine_continue.* import kotlinx.android.synthetic.main.dialog_nine_continue.*
...@@ -175,10 +175,14 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -175,10 +175,14 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
com.luck.picture.lib.R.anim.picture_anim_down_out com.luck.picture.lib.R.anim.picture_anim_down_out
) )
RxPermissions(this) PermissionX.init(this)
.request(Manifest.permission.READ_EXTERNAL_STORAGE) .permissions(
.subscribe { granted: Boolean -> Manifest.permission.READ_EXTERNAL_STORAGE,
if (granted) { // Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA
)
.request { allGranted: Boolean, _: List<String?>?, _: List<String?>? ->
if (allGranted) {
val isEnableCrop = true val isEnableCrop = true
PictureSelector.create(this) PictureSelector.create(this)
.openGallery(PictureMimeType.ofImage()) .openGallery(PictureMimeType.ofImage())
...@@ -200,7 +204,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -200,7 +204,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
.imageEngine(GlideEngine.createGlideEngine())// 图片加载引擎 .imageEngine(GlideEngine.createGlideEngine())// 图片加载引擎
.forResult(PictureConfig.CHOOSE_REQUEST) .forResult(PictureConfig.CHOOSE_REQUEST)
} else { } else {
showMissingPermissionDialog("存储") showMissingPermissionDialog("位置 相机")
} }
} }
} }
......
...@@ -79,8 +79,8 @@ class C2CIMActivity : TUIBaseChatActivity() { ...@@ -79,8 +79,8 @@ class C2CIMActivity : TUIBaseChatActivity() {
titleBarLayout.setBgColor(resources.getColor(R.color.color_15141A)) titleBarLayout.setBgColor(resources.getColor(R.color.color_15141A))
titleBarLayout.middleTitle.setTextColor(Color.WHITE) titleBarLayout.middleTitle.setTextColor(Color.WHITE)
titleBarLayout.setRightIcon(R.mipmap.ic_profile_more) // titleBarLayout.setRightIcon(R.mipmap.ic_profile_more)
titleBarLayout.rightGroup.setOnClickListener {} // titleBarLayout.rightGroup.setOnClickListener {}
}, 100) }, 100)
} }
...@@ -103,17 +103,17 @@ class C2CIMActivity : TUIBaseChatActivity() { ...@@ -103,17 +103,17 @@ class C2CIMActivity : TUIBaseChatActivity() {
} else { } else {
setCustomTopView(data.wechat) setCustomTopView(data.wechat)
} }
setUserCanChat(data.canSee) setUserCanChat(data.canSee, data.surCount)
} }
else -> { else -> {
setCustomTopView("****") setCustomTopView("****")
setUserCanChat(false) setUserCanChat(false, 0)
} }
} }
} }
override fun onError(e: Throwable?) { override fun onError(e: Throwable?) {
setUserCanChat(false) setUserCanChat(false, 0)
} }
}) })
} else { } else {
...@@ -147,14 +147,14 @@ class C2CIMActivity : TUIBaseChatActivity() { ...@@ -147,14 +147,14 @@ class C2CIMActivity : TUIBaseChatActivity() {
}) })
} }
private fun setUserCanChat(canChat: Boolean) { private fun setUserCanChat(canChat: Boolean, count: Int) {
if (UserManager.getInstance().userSex == 2) return if (UserManager.getInstance().userSex == 2) return
val chatView = chatFragment.chatView val chatView = chatFragment.chatView
if (!canChat) { if (!canChat) {
// 不能聊天 // 不能聊天
chatView.inputView.setInterceptTouchEvent(true) chatView.inputView.setInterceptTouchEvent(true)
chatView.inputView.setOnClickListener { chatView.inputView.setOnClickListener {
showUnlockWechatDialog() showUnlockWechatDialog(count)
} }
} else { } else {
chatView.inputView.setInterceptTouchEvent(false) chatView.inputView.setInterceptTouchEvent(false)
...@@ -210,11 +210,12 @@ class C2CIMActivity : TUIBaseChatActivity() { ...@@ -210,11 +210,12 @@ class C2CIMActivity : TUIBaseChatActivity() {
}).show() }).show()
} }
private fun showUnlockWechatDialog() { private fun showUnlockWechatDialog(count: Int) {
UnlockWechatDialog( UnlockWechatDialog(
this, this,
chatFragment.chatInfo.faceUrl, chatFragment.chatInfo.faceUrl,
UserManager.getInstance().vipFlag, UserManager.getInstance().vipFlag,
count,
object : DialogListener() { object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v) super.onClick(dialog, v)
......
...@@ -115,7 +115,8 @@ class CommonDataActivity : BaseActivity(), View.OnClickListener, OnRefreshListen ...@@ -115,7 +115,8 @@ class CommonDataActivity : BaseActivity(), View.OnClickListener, OnRefreshListen
override fun onClickLike(position: Int) { override fun onClickLike(position: Int) {
commonPresenter.toLike( commonPresenter.toLike(
commonListAdapter.data[position].uid.toString(), commonListAdapter.data[position].uid.toString(),
commonListAdapter.data[position].likeStatus commonListAdapter.data[position].likeStatus,
position
) )
} }
}) })
...@@ -209,4 +210,13 @@ class CommonDataActivity : BaseActivity(), View.OnClickListener, OnRefreshListen ...@@ -209,4 +210,13 @@ class CommonDataActivity : BaseActivity(), View.OnClickListener, OnRefreshListen
override fun getCommonDataFail() {} override fun getCommonDataFail() {}
override fun toLikeSuc(position: Int) {
if (commonListAdapter.data[position].likeStatus == 0) {
commonListAdapter.data[position].likeStatus = 1
} else {
commonListAdapter.data[position].likeStatus = 0
}
commonListAdapter.notifyItemChanged(position)
}
} }
\ No newline at end of file
...@@ -59,10 +59,10 @@ class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView { ...@@ -59,10 +59,10 @@ class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView {
val inputSize = s.toString().length val inputSize = s.toString().length
if (inputSize < minInput) { if (inputSize < minInput) {
// et_draw_cash.setText(minInput) // et_draw_cash.setText(minInput)
showToast("" + minInput + "元起提现!") // showToast("" + minInput + "元起提现!")
} else if (inputSize > maxInput) { } else if (inputSize > maxInput) {
// et_draw_cash.setText(maxInput) // et_draw_cash.setText(maxInput)
showToast("最多可提现" + maxInput + "元!") // showToast("最多可提现" + maxInput + "元!")
} }
} }
}) })
......
...@@ -6,6 +6,8 @@ import android.content.Intent ...@@ -6,6 +6,8 @@ import android.content.Intent
import android.content.pm.ActivityInfo import android.content.pm.ActivityInfo
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.text.InputType import android.text.InputType
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
...@@ -42,7 +44,7 @@ import com.luck.picture.lib.style.PictureWindowAnimationStyle ...@@ -42,7 +44,7 @@ import com.luck.picture.lib.style.PictureWindowAnimationStyle
import com.luck.picture.lib.thread.PictureThreadUtils import com.luck.picture.lib.thread.PictureThreadUtils
import com.luck.picture.lib.tools.DateUtils import com.luck.picture.lib.tools.DateUtils
import com.luck.picture.lib.tools.SdkVersionUtils import com.luck.picture.lib.tools.SdkVersionUtils
import com.tbruyelle.rxpermissions.RxPermissions import com.permissionx.guolindev.PermissionX
import com.yalantis.ucrop.UCrop import com.yalantis.ucrop.UCrop
import kotlinx.android.synthetic.main.activity_edit_profile.* import kotlinx.android.synthetic.main.activity_edit_profile.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -559,9 +561,12 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -559,9 +561,12 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
R.id.tv_save -> { R.id.tv_save -> {
// 保存资料 // 保存资料
userProfileData?.let { userProfileData?.let {
if (etWechat.text.toString().isNotEmpty()) { if (it.sex == 2) {
it.infoWechat = etWechat.text.toString() if (etWechat.text.toString().isNotEmpty()) {
it.infoWechat = etWechat.text.toString()
}
} }
if (etNickname.text.toString().isNotEmpty()) { if (etNickname.text.toString().isNotEmpty()) {
it.nickName = etNickname.text.toString() it.nickName = etNickname.text.toString()
} }
...@@ -639,10 +644,14 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -639,10 +644,14 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
com.luck.picture.lib.R.anim.picture_anim_down_out com.luck.picture.lib.R.anim.picture_anim_down_out
) )
RxPermissions(this) PermissionX.init(this)
.request(Manifest.permission.READ_EXTERNAL_STORAGE) .permissions(
.subscribe { granted: Boolean -> Manifest.permission.READ_EXTERNAL_STORAGE,
if (granted) { // Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA
)
.request { allGranted: Boolean, _: List<String?>?, _: List<String?>? ->
if (allGranted) {
val isEnableCrop = true val isEnableCrop = true
PictureSelector.create(this) PictureSelector.create(this)
.openGallery(PictureMimeType.ofImage()) .openGallery(PictureMimeType.ofImage())
...@@ -797,7 +806,9 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -797,7 +806,9 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
override fun setUserInfoSuc() { override fun setUserInfoSuc() {
showToast("资料保存成功!") showToast("资料保存成功!")
finish() Handler(Looper.getMainLooper()).postDelayed({
finish()
}, 1000)
} }
override fun setUserInfoFail() {} override fun setUserInfoFail() {}
......
...@@ -134,7 +134,9 @@ class MainActivity : BaseActivity(), View.OnClickListener { ...@@ -134,7 +134,9 @@ class MainActivity : BaseActivity(), View.OnClickListener {
override fun onClick(view: View) { override fun onClick(view: View) {
if (!UserHelper.instance.isUserHaveBasic()) return if (!UserHelper.instance.isUserHaveBasic()
|| !UserHelper.instance.isUserAuth()
) return
when (view.id) { when (view.id) {
R.id.tab_rl_video -> clickTab1Layout() R.id.tab_rl_video -> clickTab1Layout()
......
...@@ -39,7 +39,7 @@ import com.luck.picture.lib.style.PictureWindowAnimationStyle ...@@ -39,7 +39,7 @@ import com.luck.picture.lib.style.PictureWindowAnimationStyle
import com.luck.picture.lib.thread.PictureThreadUtils import com.luck.picture.lib.thread.PictureThreadUtils
import com.luck.picture.lib.tools.DateUtils import com.luck.picture.lib.tools.DateUtils
import com.luck.picture.lib.tools.SdkVersionUtils import com.luck.picture.lib.tools.SdkVersionUtils
import com.tbruyelle.rxpermissions.RxPermissions import com.permissionx.guolindev.PermissionX
import com.yalantis.ucrop.UCrop import com.yalantis.ucrop.UCrop
import kotlinx.android.synthetic.main.activity_real_auth.* import kotlinx.android.synthetic.main.activity_real_auth.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -551,10 +551,14 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView { ...@@ -551,10 +551,14 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
com.luck.picture.lib.R.anim.picture_anim_down_out com.luck.picture.lib.R.anim.picture_anim_down_out
) )
RxPermissions(this) PermissionX.init(this)
.request(Manifest.permission.READ_EXTERNAL_STORAGE) .permissions(
.subscribe { granted: Boolean -> Manifest.permission.READ_EXTERNAL_STORAGE,
if (granted) { Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA
)
.request { allGranted: Boolean, _: List<String?>?, _: List<String?>? ->
if (allGranted) {
PictureSelector.create(this) PictureSelector.create(this)
.openGallery(PictureMimeType.ofImage()) .openGallery(PictureMimeType.ofImage())
.theme(R.style.picture_WeChat_style) // 微信主题色 .theme(R.style.picture_WeChat_style) // 微信主题色
......
...@@ -10,10 +10,6 @@ import android.view.LayoutInflater ...@@ -10,10 +10,6 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieComposition
import com.airbnb.lottie.LottieCompositionFactory
import com.airbnb.lottie.LottieDrawable
import com.duben.library.utils.GlideUtils import com.duben.library.utils.GlideUtils
import com.duben.library.utils.nodoubleclick.AntiShake import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.MintsApplication import com.duben.roseplaylet.MintsApplication
...@@ -296,9 +292,9 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -296,9 +292,9 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
GlideUtils.loadThumbImageView(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) iv_like.setImageResource(R.mipmap.ic_like_status_0)
} else { } else {
playCollectAnim(iv_like) iv_like.setImageResource(R.mipmap.ic_like_status_1)
} }
tv_label_name.text = it.nickName tv_label_name.text = it.nickName
...@@ -422,7 +418,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -422,7 +418,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
} }
} else { } else {
// 弹解锁微信 // 弹解锁微信
showUnlockWechatDialog() showUnlockWechatDialog(data.surCount)
} }
} }
...@@ -461,9 +457,9 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -461,9 +457,9 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
override fun toLikeSuc(status: Int) { override fun toLikeSuc(status: Int) {
if (status == 0) { if (status == 0) {
playCancelCollectAnim(iv_like) iv_like.setImageResource(R.mipmap.ic_like_status_0)
} else { } else {
playCollectAnim(iv_like) iv_like.setImageResource(R.mipmap.ic_like_status_1)
} }
} }
...@@ -545,12 +541,13 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -545,12 +541,13 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
// } // }
// } // }
private fun showUnlockWechatDialog() { private fun showUnlockWechatDialog(count: Int) {
userProfileData?.let { userProfileData?.let {
UnlockWechatDialog( UnlockWechatDialog(
this, this,
it.headerUrl, it.headerUrl,
UserManager.getInstance().vipFlag, UserManager.getInstance().vipFlag,
count,
object : DialogListener() { object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) { override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v) super.onClick(dialog, v)
...@@ -655,30 +652,6 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -655,30 +652,6 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
}) })
} }
private fun playCollectAnim(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.loop(false)
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
private fun playCancelCollectAnim(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_cancel_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.loop(false)
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
/** /**
* 根据百分比改变颜色透明度 * 根据百分比改变颜色透明度
*/ */
......
...@@ -58,7 +58,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base ...@@ -58,7 +58,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
} else { } else {
// setDarkStatusBar(); // setDarkStatusBar();
StatusBarUtil.transparencyBar(this); //设置状态栏全透明 StatusBarUtil.transparencyBar(this); //设置状态栏全透明
StatusBarUtil.StatusBarLightMode(this); //设置白底黑字 // StatusBarUtil.StatusBarLightMode(this); //设置白底黑字
} }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
...@@ -117,8 +117,8 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base ...@@ -117,8 +117,8 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
//如果不是落在EditText区域,则需要关闭输入法 //如果不是落在EditText区域,则需要关闭输入法
if (HideKeyboard(v, ev)) { if (HideKeyboard(v, ev)) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); // InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); // imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
// FixUtils.fixInputMethodManagerLeak(this); // FixUtils.fixInputMethodManagerLeak(this);
} }
} }
......
...@@ -2,6 +2,7 @@ package com.duben.roseplaylet.ui.adapter ...@@ -2,6 +2,7 @@ package com.duben.roseplaylet.ui.adapter
import android.view.View import android.view.View
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import com.chad.library.adapter.base.BaseQuickAdapter import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.roseplaylet.R import com.duben.roseplaylet.R
...@@ -25,11 +26,16 @@ class CoinAdapter : BaseQuickAdapter<VipBean.ListBean, BaseViewHolder>(R.layout. ...@@ -25,11 +26,16 @@ class CoinAdapter : BaseQuickAdapter<VipBean.ListBean, BaseViewHolder>(R.layout.
override fun convert(holder: BaseViewHolder, item: VipBean.ListBean) { override fun convert(holder: BaseViewHolder, item: VipBean.ListBean) {
val viewCoin = holder.getView<TextView>(R.id.item_coin) val viewCoin = holder.getView<TextView>(R.id.item_coin)
viewCoin.text = item.title viewCoin.text = item.title
holder.getView<TextView>(R.id.item_cash).text = "¥" + item.firstPayPrice val view = holder.getView<TextView>(R.id.item_cash)
view.text = "¥" + item.firstPayPrice
val itemView = holder.getView<View>(R.id.item_view) val itemView = holder.getView<View>(R.id.item_view)
if (holder.adapterPosition == selectPosition) { if (holder.adapterPosition == selectPosition) {
itemView.setBackgroundResource(R.drawable.shape_coin_orange) itemView.setBackgroundResource(R.mipmap.bg_drawcash_item)
viewCoin.setTextColor(ContextCompat.getColor(context, R.color.color_F6DA8F))
view.setTextColor(ContextCompat.getColor(context, R.color.color_F6DA8F))
} else { } else {
viewCoin.setTextColor(ContextCompat.getColor(context, R.color.color_7E4A17))
view.setTextColor(ContextCompat.getColor(context, R.color.color_7E4A17))
itemView.setBackgroundResource(R.drawable.shape_coin_gray) itemView.setBackgroundResource(R.drawable.shape_coin_gray)
} }
} }
......
...@@ -45,24 +45,18 @@ class CommonListAdapter : BaseQuickAdapter<UserData, BaseViewHolder>(R.layout.it ...@@ -45,24 +45,18 @@ class CommonListAdapter : BaseQuickAdapter<UserData, BaseViewHolder>(R.layout.it
} }
val viewDate = holder.getView<TextView>(R.id.tv_recommend_date) val viewDate = holder.getView<TextView>(R.id.tv_recommend_date)
val viewHeart = holder.getView<LottieAnimationView>(R.id.iv_recommend_heart) val viewHeart = holder.getView<ImageView>(R.id.iv_recommend_heart)
if (isLike) { if (isLike) {
viewHeart.visibility = View.VISIBLE viewHeart.visibility = View.VISIBLE
viewDate.visibility = View.GONE viewDate.visibility = View.GONE
if (item.likeStatus == 0) { if (item.likeStatus == 0) {
playCancelCollectAnim(viewHeart) viewHeart.setImageResource(R.mipmap.ic_like_status_0)
} else { } else {
playCollectAnim(viewHeart) viewHeart.setImageResource(R.mipmap.ic_like_status_1)
} }
holder.getView<ImageView>(R.id.iv_recommend_heart).setOnClickListener { holder.getView<ImageView>(R.id.iv_recommend_heart).setOnClickListener {
mOnClickLikeListener?.onClickLike(holder.adapterPosition) mOnClickLikeListener?.onClickLike(holder.adapterPosition)
if (item.likeStatus == 0) {
playCollectAnim(holder.getView(R.id.iv_recommend_heart))
} else {
playCancelCollectAnim(holder.getView(R.id.iv_recommend_heart))
}
} }
} else { } else {
viewDate.text = item.rtime viewDate.text = item.rtime
...@@ -80,30 +74,6 @@ class CommonListAdapter : BaseQuickAdapter<UserData, BaseViewHolder>(R.layout.it ...@@ -80,30 +74,6 @@ class CommonListAdapter : BaseQuickAdapter<UserData, BaseViewHolder>(R.layout.it
this.isLike = isLike this.isLike = isLike
} }
private fun playCollectAnim(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.repeatCount = 0
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
private fun playCancelCollectAnim(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_cancel_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.repeatCount = 0
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
private var mOnClickLikeListener: OnClickLikeListener? = null private var mOnClickLikeListener: OnClickLikeListener? = null
fun setOnClickLikeListener(onClickLikeListener: OnClickLikeListener) { fun setOnClickLikeListener(onClickLikeListener: OnClickLikeListener) {
......
package com.duben.roseplaylet.ui.adapter package com.duben.roseplaylet.ui.adapter
import android.view.View
import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder import com.chad.library.adapter.base.viewholder.BaseViewHolder
...@@ -13,7 +15,31 @@ class ShareRankAdapter : BaseQuickAdapter<ShareRank, BaseViewHolder>(R.layout.it ...@@ -13,7 +15,31 @@ class ShareRankAdapter : BaseQuickAdapter<ShareRank, BaseViewHolder>(R.layout.it
holder.getView<TextView>(R.id.tv_nickname).text = item.nick holder.getView<TextView>(R.id.tv_nickname).text = item.nick
holder.getView<TextView>(R.id.tv_invite_count).text = "" + item.share holder.getView<TextView>(R.id.tv_invite_count).text = "" + item.share
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
val ivView = holder.getView<ImageView>(R.id.iv_rank_count)
val tvView = holder.getView<TextView>(R.id.tv_rank_count)
when (holder.adapterPosition) {
0 -> {
ivView.visibility = View.VISIBLE
tvView.visibility = View.GONE
ivView.setImageResource(R.mipmap.ic_rank_one)
}
1 -> {
ivView.visibility = View.VISIBLE
tvView.visibility = View.GONE
ivView.setImageResource(R.mipmap.ic_rank_two)
}
2 -> {
ivView.visibility = View.VISIBLE
tvView.visibility = View.GONE
ivView.setImageResource(R.mipmap.ic_rank_three)
}
else -> {
tvView.visibility = View.VISIBLE
ivView.visibility = View.GONE
holder.getView<TextView>(R.id.tv_rank_count).text = "" + holder.adapterPosition + 1
}
}
GlideUtils.loadThumbImageView(context, item.head, holder.getView(R.id.iv_avatar)) GlideUtils.loadThumbImageView(context, item.head, holder.getView(R.id.iv_avatar))
} }
......
...@@ -67,4 +67,7 @@ class CommonListFragment : LazyLoadBaseFragment(), OnRefreshListener, CommonView ...@@ -67,4 +67,7 @@ class CommonListFragment : LazyLoadBaseFragment(), OnRefreshListener, CommonView
override fun getCommonDataSuc(data: UserList) {} override fun getCommonDataSuc(data: UserList) {}
override fun getCommonDataFail() {} override fun getCommonDataFail() {}
override fun toLikeSuc(position: Int) {
}
} }
\ No newline at end of file
...@@ -79,7 +79,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -79,7 +79,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
R.id.ll_edit_profile -> { R.id.ll_edit_profile -> {
readyGo(EditProfileActivity::class.java) readyGo(EditProfileActivity::class.java)
} }
R.id.iv_my_vip -> { R.id.rl_my_vip -> {
if (!userManager.vipFlag) { if (!userManager.vipFlag) {
readyGo(VipActivity::class.java) readyGo(VipActivity::class.java)
} }
...@@ -133,18 +133,18 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -133,18 +133,18 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
toUid = data.idcode toUid = data.idcode
tv_my_nickname.text = data.nickName tv_my_nickname.text = data.nickName
if (!data.age.isNullOrEmpty()) { if (!data.age.isNullOrEmpty()) {
tv_my_label.text = "" + data.age tv_my_label.text = "" + data.age + "岁"
} }
if (!data.city.isNullOrEmpty()) { if (!data.city.isNullOrEmpty()) {
tv_my_label.text = tv_my_label.text.toString() + "" + data.city tv_my_label.text = tv_my_label.text.toString() + " " + data.city
} }
tv_my_id.text = "ID:" + data.idcode tv_my_id.text = "ID:" + data.idcode
GlideUtils.loadThumbImageView(requireContext(), data.headerUrl, civ_my_avatar) GlideUtils.loadThumbImageView(requireContext(), data.headerUrl, civ_my_avatar)
if (data.expireTime > 0) { if (data.expireTime > 0) {
rl_my_vip.visibility = View.VISIBLE iv_vip_label.setImageResource(R.mipmap.ic_is_vip)
iv_my_vip.visibility = View.GONE tv_vip_date.text = "限时五折起"
if (data.isForever) { if (data.isForever) {
tv_vip_date.text = "有效期: 永久有效" tv_vip_date.text = "有效期: 永久有效"
} else { } else {
...@@ -152,8 +152,9 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -152,8 +152,9 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
"到期时间 ${TimeRender.formatDate(data.expireTime, TimeRender.DEFAULT_FORMAT)}" "到期时间 ${TimeRender.formatDate(data.expireTime, TimeRender.DEFAULT_FORMAT)}"
} }
} else { } else {
rl_my_vip.visibility = View.GONE iv_vip_label.setImageResource(R.mipmap.ic_no_vip)
iv_my_vip.visibility = View.VISIBLE tv_vip_date.text = "解锁更多权益"
tv_vip_btn.text = "立即升级"
} }
if (data.sex == 1) { if (data.sex == 1) {
...@@ -165,12 +166,14 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -165,12 +166,14 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
// 女性展示奖励的金币 // 女性展示奖励的金币
tv_my_coin.text = "" + data.rewardCoin tv_my_coin.text = "" + data.rewardCoin
if (data.idcardStatus == 0) { ll_my_auth.visibility = View.VISIBLE
// 女性展示认证页面
ll_my_auth.visibility = View.VISIBLE // if (data.idcardStatus == 0) {
} else { // // 女性展示认证页面
ll_my_auth.visibility = View.GONE // ll_my_auth.visibility = View.VISIBLE
} // } else {
// ll_my_auth.visibility = View.GONE
// }
} }
} }
...@@ -186,7 +189,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -186,7 +189,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
ll_my_ilike.setOnClickListener(this) ll_my_ilike.setOnClickListener(this)
ll_my_likeme.setOnClickListener(this) ll_my_likeme.setOnClickListener(this)
ll_my_seeme.setOnClickListener(this) ll_my_seeme.setOnClickListener(this)
iv_my_vip.setOnClickListener(this) rl_my_vip.setOnClickListener(this)
ll_my_wallet.setOnClickListener(this) ll_my_wallet.setOnClickListener(this)
ll_my_invite.setOnClickListener(this) ll_my_invite.setOnClickListener(this)
ll_my_album.setOnClickListener(this) ll_my_album.setOnClickListener(this)
......
...@@ -99,7 +99,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -99,7 +99,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
} }
private fun initVp() { private fun initVp() {
tabsData.addAll(arrayOf("附近", "推荐", "新人")) tabsData.addAll(arrayOf("附近", "活跃", "新人"))
vpAdapter = SquarePageAdapter(tabsData, this) vpAdapter = SquarePageAdapter(tabsData, this)
vp2.adapter = vpAdapter vp2.adapter = vpAdapter
...@@ -156,9 +156,6 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -156,9 +156,6 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
return view return view
} }
override fun topTabsSuc(data: BannerList?) {
}
private fun initLocation() { private fun initLocation() {
val permissions: List<String> = if (Build.VERSION.SDK_INT >= 29) { val permissions: List<String> = if (Build.VERSION.SDK_INT >= 29) {
listOf( listOf(
...@@ -271,6 +268,9 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -271,6 +268,9 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
// val poiName = loc.poiName // val poiName = loc.poiName
val city = loc.city val city = loc.city
squarePresenter.saveGps(curLatitude.toString(), curLongitude.toString(), city) squarePresenter.saveGps(curLatitude.toString(), curLongitude.toString(), city)
vpAdapter?.let {
(it.getFragments()[0] as SquareListFragment).refresh()
}
mLocationClient?.stopLocation() mLocationClient?.stopLocation()
} }
} }
...@@ -282,6 +282,10 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener ...@@ -282,6 +282,10 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
override fun getHallListFail() { override fun getHallListFail() {
} }
override fun toLikeSuc(position: Int) {
}
fun ViewPager2.desensitization() { fun ViewPager2.desensitization() {
//动态设置ViewPager2 灵敏度 //动态设置ViewPager2 灵敏度
try { try {
......
...@@ -70,7 +70,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -70,7 +70,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
private fun initRecy() { private fun initRecy() {
squareAdapter = SquareAdapter() squareAdapter = SquareAdapter()
if (mType == 3 && !UserManager.getInstance().vipFlag) { if (mType == 3 && !UserManager.getInstance().vipFlag
&& UserManager.getInstance().userSex == 1
) {
squareAdapter.setIsBlur(true) squareAdapter.setIsBlur(true)
} else { } else {
squareAdapter.setIsBlur(false) squareAdapter.setIsBlur(false)
...@@ -89,7 +91,8 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -89,7 +91,8 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
override fun onClickLike(position: Int) { override fun onClickLike(position: Int) {
squarePresenter.toLike( squarePresenter.toLike(
squareAdapter.data[position].uid.toString(), squareAdapter.data[position].uid.toString(),
squareAdapter.data[position].likeStatus squareAdapter.data[position].likeStatus,
position
) )
} }
}) })
...@@ -106,8 +109,6 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -106,8 +109,6 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
MainExpressManager.instance.destroy() MainExpressManager.instance.destroy()
} }
override fun topTabsSuc(data: BannerList?) {}
override fun getHallListSuc(data: HallList) { override fun getHallListSuc(data: HallList) {
if (activity == null || requireActivity().isFinishing) { if (activity == null || requireActivity().isFinishing) {
srl_square?.finishRefresh(true) srl_square?.finishRefresh(true)
...@@ -134,8 +135,23 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -134,8 +135,23 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
override fun getHallListFail() {} override fun getHallListFail() {}
override fun toLikeSuc(position: Int) {
if (::squareAdapter.isInitialized) {
if (squareAdapter.data[position].likeStatus == 0) {
squareAdapter.data[position].likeStatus = 1
} else {
squareAdapter.data[position].likeStatus = 0
}
squareAdapter.notifyItemChanged(position)
}
}
override fun onRefresh(refreshLayout: RefreshLayout) { override fun onRefresh(refreshLayout: RefreshLayout) {
hotPage = 1 hotPage = 1
squarePresenter.getHallList(mType, hotPage, hotPageSize) squarePresenter.getHallList(mType, hotPage, hotPageSize)
} }
fun refresh() {
srl_square.autoRefresh()
}
} }
\ No newline at end of file
package com.duben.roseplaylet.ui.widgets;
import android.content.Context;
import android.graphics.Bitmap;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import java.security.MessageDigest;
public class BlurTransformation extends BitmapTransformation {
private static final String ID = "BlurTransformation";
private static final byte[] ID_BYTES = ID.getBytes();
private final float radius;
private final Context context;
public BlurTransformation(Context context, float radius) {
this.context = context;
this.radius = radius;
}
@Override
protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
Bitmap blurredBitmap = toTransform.copy(Bitmap.Config.ARGB_8888, true);
RenderScript rs = RenderScript.create(context);
Allocation input = Allocation.createFromBitmap(rs, blurredBitmap);
Allocation output = Allocation.createTyped(rs, input.getType());
ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
script.setInput(input);
script.setRadius(radius);
script.forEach(output);
output.copyTo(blurredBitmap);
input.destroy();
output.destroy();
rs.destroy();
return blurredBitmap;
}
@Override
public boolean equals(Object o) {
if (o instanceof BlurTransformation) {
BlurTransformation other = (BlurTransformation) o;
return radius == other.radius;
}
return false;
}
@Override
public int hashCode() {
return (int) (radius * 10);
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
messageDigest.update(ID_BYTES);
byte[] radiusBytes = floatToBytes(radius);
messageDigest.update(radiusBytes);
}
private byte[] floatToBytes(float value) {
int intBits = Float.floatToIntBits(value);
return new byte[]{
(byte) (intBits >> 24),
(byte) (intBits >> 16),
(byte) (intBits >> 8),
(byte) intBits
};
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.widgets;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import java.security.MessageDigest;
public class RoundedCornersTransformation extends BitmapTransformation {
private static final String ID = "RoundedCornersTransformation";
private static final byte[] ID_BYTES = ID.getBytes();
private final int radius;
private final int margin;
public RoundedCornersTransformation(int radius, int margin) {
this.radius = radius;
this.margin = margin;
}
@Override
protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
Bitmap result = pool.get(toTransform.getWidth(), toTransform.getHeight(), Bitmap.Config.ARGB_8888);
if (result == null) {
result = Bitmap.createBitmap(toTransform.getWidth(), toTransform.getHeight(), Bitmap.Config.ARGB_8888);
}
Canvas canvas = new Canvas(result);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setShader(new android.graphics.BitmapShader(toTransform, android.graphics.Shader.TileMode.CLAMP, android.graphics.Shader.TileMode.CLAMP));
RectF rectF = new RectF(margin, margin, toTransform.getWidth() - margin, toTransform.getHeight() - margin);
canvas.drawRoundRect(rectF, radius, radius, paint);
return result;
}
@Override
public boolean equals(Object o) {
if (o instanceof RoundedCornersTransformation) {
RoundedCornersTransformation other = (RoundedCornersTransformation) o;
return radius == other.radius && margin == other.margin;
}
return false;
}
@Override
public int hashCode() {
int result = radius;
result = 31 * result + margin;
return result;
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
messageDigest.update(ID_BYTES);
byte[] radiusBytes = intToBytes(radius);
messageDigest.update(radiusBytes);
byte[] marginBytes = intToBytes(margin);
messageDigest.update(marginBytes);
}
private byte[] intToBytes(int value) {
return new byte[]{
(byte) (value >> 24),
(byte) (value >> 16),
(byte) (value >> 8),
(byte) value
};
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.widgets;
import android.content.Context;
import android.util.AttributeSet;
public class SquareImageView extends androidx.appcompat.widget.AppCompatImageView {
float width, height;
private float radius = 5f;
public SquareImageView(Context context) {
super(context);
}
public SquareImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SquareImageView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
width = getMeasuredWidth();
height = getMeasuredHeight();
setMeasuredDimension((int) height, (int) height);
}
}
\ No newline at end of file
...@@ -15,6 +15,7 @@ class UnlockWechatDialog( ...@@ -15,6 +15,7 @@ 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 isVip: Boolean = false,
private val count: Int = 0,
private val listener: DialogListener? private val listener: DialogListener?
) : ) :
Dialog(context, R.style.dialog) { Dialog(context, R.style.dialog) {
...@@ -22,6 +23,7 @@ class UnlockWechatDialog( ...@@ -22,6 +23,7 @@ class UnlockWechatDialog(
private val tv_vip_btn: TextView private val tv_vip_btn: TextView
private val tv_vip_coin: TextView private val tv_vip_coin: TextView
private val tv_vip_count: TextView
private val iv_close: ImageView private val iv_close: ImageView
private val iv_avatar: ImageView private val iv_avatar: ImageView
...@@ -41,8 +43,10 @@ class UnlockWechatDialog( ...@@ -41,8 +43,10 @@ class UnlockWechatDialog(
tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView
tv_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView tv_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView
tv_vip_count = findViewById<View>(R.id.tv_vip_count) 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.loadThumbImageView(context, headUrl, iv_avatar)
iv_close.setOnClickListener { iv_close.setOnClickListener {
...@@ -54,7 +58,14 @@ class UnlockWechatDialog( ...@@ -54,7 +58,14 @@ class UnlockWechatDialog(
if (isVip) { if (isVip) {
tv_vip_btn.visibility = View.GONE tv_vip_btn.visibility = View.GONE
tv_vip_coin.text = "直接联系" tv_vip_count.visibility = View.VISIBLE
if (count > 0) {
tv_vip_count.text = "你今天还有" + count + "次免费机会"
tv_vip_coin.text = "直接联系"
} else {
tv_vip_count.text = "你今天免费机会已经用尽"
tv_vip_coin.text = "直接联系(200金币)"
}
} }
} }
......
...@@ -52,7 +52,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall ...@@ -52,7 +52,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
vup = new VersionUpdatePresenter(); vup = new VersionUpdatePresenter();
} }
if (app_activity != null) { if (app_activity != null) {
// vup.updateVersion(app_activity.get()); vup.updateVersion(app_activity.get());
} }
} }
} }
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="@color/color_424446" /> <solid android:color="@color/color_424446" />
<corners android:radius="10dip" /> <corners android:radius="15dip" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="20dp" />
<solid android:color="@color/color_FFE9CF" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:endColor="#FEE0BB"
android:startColor="#E4A35E" />
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="10dp" />
<solid android:color="@color/color_1fb89c" />
</shape>
\ No newline at end of file
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<!-- 填充的颜色 --> <!-- 填充的颜色 -->
<solid android:color="@color/color_EAE3E0" /> <solid android:color="@color/color_2e2424" />
<!-- 设置按钮的四个角为弧形 --> <!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 --> <!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" /> <corners android:radius="2dip" />
</shape> </shape>
\ No newline at end of file
...@@ -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/color_232122" android:background="@mipmap/bg_female"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/header_layout" /> <include layout="@layout/header_layout" />
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black"> android:background="@mipmap/bg_female">
<include <include
android:id="@+id/head" android:id="@+id/head"
......
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/color_232122" android:background="@mipmap/bg_female"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/header_layout" /> <include layout="@layout/header_layout" />
<com.duben.roseplaylet.ui.widgets.ElasticScrollView <com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/color_232122"> android:background="@mipmap/bg_female">
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
android:id="@+id/appbar" android:id="@+id/appbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/full_transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_behavior=".ui.widgets.AppBarLayoutBehavior"> app:layout_behavior=".ui.widgets.AppBarLayoutBehavior">
...@@ -86,7 +87,6 @@ ...@@ -86,7 +87,6 @@
android:id="@+id/nsv" android:id="@+id/nsv"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/color_232122"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<FrameLayout <FrameLayout
...@@ -313,16 +313,22 @@ ...@@ -313,16 +313,22 @@
android:paddingStart="20dp" android:paddingStart="20dp"
android:paddingEnd="20dp"> android:paddingEnd="20dp">
<ImageView <TextView
android:id="@+id/tv_wechat" android:id="@+id/tv_wechat"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_profile_chat"
android:drawablePadding="-30dp"
android:elevation="1dp" android:elevation="1dp"
android:scaleType="fitXY" android:gravity="center"
android:src="@mipmap/ic_button_wechat" android:paddingStart="30dp"
android:textSize="16sp" /> android:text="她的微信"
android:textColor="@color/color_0B0907"
android:textSize="14sp"
android:visibility="gone"
app:drawableStartCompat="@mipmap/ic_wechat_black" />
<TextView <TextView
android:id="@+id/tv_like_male" android:id="@+id/tv_like_male"
...@@ -335,19 +341,24 @@ ...@@ -335,19 +341,24 @@
android:gravity="center" android:gravity="center"
android:text="喜欢" android:text="喜欢"
android:textColor="@color/color_0B0907" android:textColor="@color/color_0B0907"
android:textSize="14sp" /> android:textSize="14sp"
android:visibility="gone" />
<ImageView <TextView
android:id="@+id/tv_chat" android:id="@+id/tv_chat"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_profile_chat"
android:drawablePadding="-40dp"
android:elevation="1dp" android:elevation="1dp"
android:scaleType="fitXY" android:gravity="center"
android:src="@mipmap/ic_button_chat" android:paddingStart="40dp"
android:textSize="16sp" /> android:text="私聊"
android:textColor="@color/color_0B0907"
android:textSize="14sp"
app:drawableStartCompat="@mipmap/ic_chat_black" />
</LinearLayout> </LinearLayout>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/color_232122" android:background="@mipmap/bg_female"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/header_layout" /> <include layout="@layout/header_layout" />
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
android:layout_below="@id/iv_avatar" android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_profile_count" android:background="@drawable/shape_bg_profile_count"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical"
android:paddingBottom="20dp">
<TextView <TextView
android:id="@+id/tv_unlock" android:id="@+id/tv_unlock"
...@@ -58,13 +59,23 @@ ...@@ -58,13 +59,23 @@
android:layout_width="260dp" android:layout_width="260dp"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_bg_hall_btn3" android:background="@drawable/shape_bg_hall_btn3"
android:gravity="center" android:gravity="center"
android:text="直接解锁(200金币)" android:text="直接解锁(200金币)"
android:textColor="@color/color_FCE8BA" android:textColor="@color/color_FCE8BA"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView
android:id="@+id/tv_vip_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text=""
android:textColor="@color/color_FCE8BA"
android:textSize="14sp"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
<com.duben.roseplaylet.ui.widgets.CircleImageView <com.duben.roseplaylet.ui.widgets.CircleImageView
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout 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/black"> android:background="@mipmap/bg_female">
<com.duben.roseplaylet.ui.widgets.ElasticScrollView <com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -190,18 +190,20 @@ ...@@ -190,18 +190,20 @@
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/iv_my_vip"
android:layout_width="match_parent"
android:layout_height="80dp"
android:scaleType="fitXY"
android:src="@mipmap/ic_my_vip_label" />
<RelativeLayout <RelativeLayout
android:id="@+id/rl_my_vip" android:id="@+id/rl_my_vip"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="80dp"
android:visibility="gone"> android:background="@drawable/shape_my_vip_label"
android:visibility="visible">
<ImageView
android:id="@+id/iv_vip_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="15dp"
android:src="@mipmap/ic_is_vip" />
<TextView <TextView
android:id="@+id/tv_vip_date" android:id="@+id/tv_vip_date"
...@@ -212,7 +214,24 @@ ...@@ -212,7 +214,24 @@
android:layout_marginBottom="15dp" android:layout_marginBottom="15dp"
android:text="到期时间" android:text="到期时间"
android:textColor="@color/color_31343B" android:textColor="@color/color_31343B"
android:textSize="16sp" /> android:textSize="14sp" />
<TextView
android:id="@+id/tv_vip_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_my_vip_btn"
android:paddingStart="20dp"
android:paddingTop="6dp"
android:paddingEnd="20dp"
android:paddingBottom="6dp"
android:text="限时五折起"
android:textColor="@color/color_31343B"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
...@@ -508,14 +527,18 @@ ...@@ -508,14 +527,18 @@
</LinearLayout> </LinearLayout>
<com.duben.roseplaylet.ui.widgets.RoundRectLayout <LinearLayout
android:id="@+id/fl_ad"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:background="@drawable/shape_bg_write" />
<com.duben.roseplaylet.ui.widgets.RoundRectLayout
android:id="@+id/fl_ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_bg_write" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView> </com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</FrameLayout> </FrameLayout>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<com.youth.banner.Banner <com.youth.banner.Banner
android:id="@+id/banner" android:id="@+id/banner"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="160dp" android:layout_height="140dp"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" /> android:layout_marginRight="16dp" />
......
<?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" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/item_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:id="@+id/item_view"
android:background="@drawable/shape_coin_gray" android:background="@drawable/shape_coin_gray"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<TextView <LinearLayout
android:id="@+id/item_coin"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="10dp">
android:drawablePadding="6dp"
android:gravity="center" <ImageView
android:text="210" android:layout_width="wrap_content"
android:textColor="@color/color_F6DA8F" android:layout_height="wrap_content"
android:textSize="20sp" android:layout_marginTop="3dp"
app:drawableStartCompat="@mipmap/ic_call_wx" /> android:src="@mipmap/ic_coin" />
<TextView
android:id="@+id/item_coin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:gravity="center"
android:text="210"
android:textColor="@color/color_F6DA8F"
android:textSize="20sp" />
</LinearLayout>
<TextView <TextView
android:id="@+id/item_cash" android:id="@+id/item_cash"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="6dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="10dp"
android:text="¥30" android:text="¥30"
android:textColor="@color/color_F6DA8F" /> android:textColor="@color/color_F6DA8F" />
......
...@@ -63,15 +63,15 @@ ...@@ -63,15 +63,15 @@
android:text="2025-1-1" android:text="2025-1-1"
android:textColor="@color/color_929297" /> android:textColor="@color/color_929297" />
<com.airbnb.lottie.LottieAnimationView <ImageView
android:id="@+id/iv_recommend_heart" android:id="@+id/iv_recommend_heart"
android:layout_width="35dp" android:layout_width="30dp"
android:layout_height="35dp" android:layout_height="30dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:src="@mipmap/home_collect_img_0" android:src="@mipmap/ic_like_status_0"
android:visibility="gone" /> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1.5"
android:gravity="center_vertical"> android:gravity="center_vertical">
<ImageView <ImageView
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
android:id="@+id/tv_rank_count" android:id="@+id/tv_rank_count"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginStart="10dp"
android:gravity="center" android:gravity="center"
android:text="1" android:text="1"
android:textColor="@color/black" android:textColor="@color/black"
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
android:gravity="center" android:gravity="center"
android:text="@string/app_name" android:text="@string/app_name"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="14sp" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>
......
...@@ -99,13 +99,13 @@ ...@@ -99,13 +99,13 @@
android:id="@+id/tv_label_age" android:id="@+id/tv_label_age"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shape_label_male" android:background="@drawable/shape_square_label1"
android:paddingStart="6dp" android:paddingStart="6dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:paddingEnd="6dp" android:paddingEnd="6dp"
android:paddingBottom="2dp" android:paddingBottom="2dp"
android:text="44岁" android:text="44岁"
android:textColor="@color/color_E5C565" android:textColor="@color/color_d5bc9a"
android:textSize="12sp" /> android:textSize="12sp" />
<TextView <TextView
...@@ -113,13 +113,13 @@ ...@@ -113,13 +113,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:background="@drawable/shape_label_male" android:background="@drawable/shape_square_label1"
android:paddingStart="6dp" android:paddingStart="6dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:paddingEnd="6dp" android:paddingEnd="6dp"
android:paddingBottom="2dp" android:paddingBottom="2dp"
android:text="北京北京" android:text="北京北京"
android:textColor="@color/color_E5C565" android:textColor="@color/color_d5bc9a"
android:textSize="12sp" android:textSize="12sp"
android:visibility="gone" /> android:visibility="gone" />
...@@ -128,13 +128,13 @@ ...@@ -128,13 +128,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:background="@drawable/shape_label_male" android:background="@drawable/shape_square_label1"
android:paddingStart="6dp" android:paddingStart="6dp"
android:paddingTop="2dp" android:paddingTop="2dp"
android:paddingEnd="6dp" android:paddingEnd="6dp"
android:paddingBottom="2dp" android:paddingBottom="2dp"
android:text="172cm" android:text="172cm"
android:textColor="@color/color_E5C565" android:textColor="@color/color_d5bc9a"
android:textSize="12sp" android:textSize="12sp"
android:visibility="gone" /> android:visibility="gone" />
...@@ -168,11 +168,11 @@ ...@@ -168,11 +168,11 @@
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<com.airbnb.lottie.LottieAnimationView <ImageView
android:id="@+id/iv_like" android:id="@+id/iv_like"
android:layout_width="35dp" android:layout_width="30dp"
android:layout_height="35dp" android:layout_height="30dp"
android:src="@mipmap/home_collect_img_0" /> android:src="@mipmap/ic_like_status_0" />
<TextView <TextView
android:id="@+id/tv_like_count" android:id="@+id/tv_like_count"
......
...@@ -106,6 +106,11 @@ ...@@ -106,6 +106,11 @@
<color name="color_323334">#323334</color> <color name="color_323334">#323334</color>
<color name="color_ebcfad">#ebcfad</color> <color name="color_ebcfad">#ebcfad</color>
<color name="color_2D2D2D">#2D2D2D</color> <color name="color_2D2D2D">#2D2D2D</color>
<color name="color_838087">#838087</color>
<color name="color_2e2424">#2e2424</color>
<color name="color_d5bc9a">#d5bc9a</color>
<color name="color_1fb89c">#1fb89c</color>
<color name="color_7E4A17">#7E4A17</color>
<color name="color_252429">#252429</color> <color name="color_252429">#252429</color>
......
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