Commit 5a9bc62f authored by jyx's avatar jyx

优化样式,修复BUG

parent 8dfca98c
{
"agcgw":{
"backurl":"connect-drcn.dbankcloud.cn",
"url":"connect-drcn.hispace.hicloud.com"
},
"client":{
"cp_id":"*********",
"product_id":"********",
"client_id":"********",
"client_secret":"************",
"app_id":"********",
"package_name":"com.duben.loveplayletd",
"api_key":"**********"
},
"service":{
"analytics":{
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"resource_id":"p1",
"channel_id":""
},
"cloudstorage":{
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn"
},
"ml":{
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
}
},
"region":"CN",
"configuration_version":"1.0"
}
\ No newline at end of file
...@@ -5,7 +5,6 @@ apply plugin: 'kotlin-kapt' ...@@ -5,7 +5,6 @@ apply plugin: 'kotlin-kapt'
//sharesdk //sharesdk
apply plugin: 'com.mob.sdk' apply plugin: 'com.mob.sdk'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.huawei.agconnect' apply plugin: 'com.huawei.agconnect'
apply plugin: 'com.hihonor.mcs.asplugin' apply plugin: 'com.hihonor.mcs.asplugin'
...@@ -309,7 +308,6 @@ dependencies { ...@@ -309,7 +308,6 @@ dependencies {
api 'com.tencent.timpush:vivo:8.3.6498' api 'com.tencent.timpush:vivo:8.3.6498'
api 'com.tencent.timpush:huawei:8.3.6498' api 'com.tencent.timpush:huawei:8.3.6498'
api 'com.tencent.timpush:honor:8.3.6498' api 'com.tencent.timpush:honor:8.3.6498'
annotationProcessor 'com.google.auto.service:auto-service-annotations:1.1.1'
// 选择器 // 选择器
implementation 'com.contrarywind:Android-PickerView:4.1.9' implementation 'com.contrarywind:Android-PickerView:4.1.9'
......
{
"project_info": {
"project_number": "******",
"firebase_url": "******",
"project_id": "******",
"storage_bucket": "******.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "******",
"android_client_info": {
"package_name": "com.duben.loveplayletd"
}
},
"oauth_client": [
{
"client_id": "******.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "******"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "******.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
{
"developer_id":"********",
"app_id":"********",
"package_name":"com.duben.loveplayletd",
"version":"1.0"
}
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.duben.loveplayletd"> package="com.duben.loveplayletd">
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
...@@ -266,6 +265,7 @@ ...@@ -266,6 +265,7 @@
<activity <activity
android:name=".ui.preview.ImagePreviewActivity" android:name=".ui.preview.ImagePreviewActivity"
android:exported="false" android:exported="false"
android:launchMode="singleTask"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activitys.ShareActivity" android:name=".ui.activitys.ShareActivity"
......
...@@ -243,10 +243,8 @@ object GlideUtils { ...@@ -243,10 +243,8 @@ object GlideUtils {
defaultImage: Int = R.mipmap.ic_my_avat defaultImage: Int = R.mipmap.ic_my_avat
) { ) {
Glide.with(mContext).load("$path?x-oss-process=image/resize,p_20").apply( Glide.with(mContext).load("$path?x-oss-process=image/resize,p_20").apply(
RequestOptions().transform( RequestOptions()
CenterCrop(), .placeholder(defaultImage)
RoundedCorners(BubbleUtils.dp2px(5))
).placeholder(defaultImage)
.error(defaultImage) .error(defaultImage)
).dontAnimate().into(mImageView) ).dontAnimate().into(mImageView)
} }
...@@ -259,10 +257,9 @@ object GlideUtils { ...@@ -259,10 +257,9 @@ object GlideUtils {
defaultImage: Int = R.mipmap.ic_my_avat defaultImage: Int = R.mipmap.ic_my_avat
) { ) {
Glide.with(mContext).load("$path?x-oss-process=image/resize,p_20").apply( Glide.with(mContext).load("$path?x-oss-process=image/resize,p_20").apply(
RequestOptions().transform( RequestOptions()
CenterCrop(), .transform(CenterCrop(), RoundedCorners(BubbleUtils.dp2px(10)))
RoundedCorners(BubbleUtils.dp2px(10)) .placeholder(defaultImage)
).placeholder(defaultImage)
.error(defaultImage) .error(defaultImage)
).dontAnimate().into(mImageView) ).dontAnimate().into(mImageView)
} }
...@@ -287,4 +284,6 @@ object GlideUtils { ...@@ -287,4 +284,6 @@ object GlideUtils {
fun loadHighRoundImageView(mContext: Context, path: String?, mImageView: ImageView) { fun loadHighRoundImageView(mContext: Context, path: String?, mImageView: ImageView) {
Glide.with(mContext).load(path).dontAnimate().into(mImageView) Glide.with(mContext).load(path).dontAnimate().into(mImageView)
} }
} }
\ No newline at end of file
...@@ -5,7 +5,6 @@ import android.app.Activity ...@@ -5,7 +5,6 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import android.content.pm.ActivityInfo import android.content.pm.ActivityInfo
import android.graphics.Color import android.graphics.Color
import android.media.AudioManager
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import android.text.TextUtils import android.text.TextUtils
...@@ -148,7 +147,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -148,7 +147,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
if (UserHelper.instance.isBpkg() && !isHaveGuid && et_ruid_code.text.toString() if (UserHelper.instance.isBpkg() && !isHaveGuid && et_ruid_code.text.toString()
.isNotEmpty() .isNotEmpty()
) { ) {
basicUserProfilePresenter.updateRuserShareCode(et_ruid_code.text.toString()) basicUserProfilePresenter.updateRuserShareCode(et_ruid_code.text.toString())
} }
...@@ -167,12 +166,12 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -167,12 +166,12 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
private fun showAgePickDialog() { private fun showAgePickDialog() {
mSinglePickDialog = SinglePickDialog( mSinglePickDialog = SinglePickDialog(
this, UserProfile.PROFILE_NL.str, this, UserProfile.PROFILE_NL.str,
getAgePickerData(), getAgePickerData(),
"1990" "1990"
) )
mSinglePickDialog?.setPickResultListener(object : mSinglePickDialog?.setPickResultListener(object :
SinglePickDialog.OnPickResultListener { SinglePickDialog.OnPickResultListener {
override fun onPickResult(result: String) { override fun onPickResult(result: String) {
tv_age.text = result tv_age.text = result
} }
...@@ -197,9 +196,9 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -197,9 +196,9 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
} }
override fun initBasicSuc() { override fun initBasicSuc() {
LogUtil.d("mcg -->>>> initBasicSuc"+true) LogUtil.d("mcg -->>>> initBasicSuc" + true)
AppConfig.basicUserProfileFlag = true AppConfig.basicUserProfileFlag = true
ToastUtil.showLong(context,"填写完成") ToastUtil.showLong(context, "填写完成")
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
finish() finish()
}, 1000) }, 1000)
...@@ -218,42 +217,42 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -218,42 +217,42 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
private fun showAlbum() { private fun showAlbum() {
val windowAnimationStyle = PictureWindowAnimationStyle() val windowAnimationStyle = PictureWindowAnimationStyle()
windowAnimationStyle.ofAllAnimation( windowAnimationStyle.ofAllAnimation(
com.luck.picture.lib.R.anim.picture_anim_up_in, com.luck.picture.lib.R.anim.picture_anim_up_in,
com.luck.picture.lib.R.anim.picture_anim_down_out com.luck.picture.lib.R.anim.picture_anim_down_out
) )
PermissionX.init(this) PermissionX.init(this)
.permissions( .permissions(
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,
// Manifest.permission.WRITE_EXTERNAL_STORAGE, // Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA Manifest.permission.CAMERA
) )
.request { allGranted: Boolean, _: List<String?>?, _: List<String?>? -> .request { allGranted: Boolean, _: List<String?>?, _: List<String?>? ->
if (allGranted) { if (allGranted) {
val isEnableCrop = true val isEnableCrop = true
PictureSelector.create(this) PictureSelector.create(this)
.openGallery(PictureMimeType.ofImage()) .openGallery(PictureMimeType.ofImage())
.theme(R.style.picture_WeChat_style) // 微信主题色 .theme(R.style.picture_WeChat_style) // 微信主题色
.isWeChatStyle(true) // 微信样式 .isWeChatStyle(true) // 微信样式
.isCamera(true) //列表是否显示拍照按钮 .isCamera(true) //列表是否显示拍照按钮
.isZoomAnim(false)//图片选择缩放效果 .isZoomAnim(false)//图片选择缩放效果
.isEnableCrop(isEnableCrop)//是否开启裁剪 .isEnableCrop(isEnableCrop)//是否开启裁剪
.setPictureWindowAnimationStyle(windowAnimationStyle) .setPictureWindowAnimationStyle(windowAnimationStyle)
.withAspectRatio(4, 4) .withAspectRatio(4, 4)
.isCompress(true)//是否压缩 .isCompress(true)//是否压缩
.compressFocusAlpha(false)//压缩后是否保持图片的透明通道 .compressFocusAlpha(false)//压缩后是否保持图片的透明通道
.minimumCompressSize(200)// 小于多少kb的图片不压缩 .minimumCompressSize(200)// 小于多少kb的图片不压缩
.compressQuality(60)//图片压缩后输出质量 .compressQuality(60)//图片压缩后输出质量
.synOrAsy(true)//开启同步or异步压缩 .synOrAsy(true)//开启同步or异步压缩
.maxSelectNum(10) .maxSelectNum(10)
.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)//屏幕旋转方向 .setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)//屏幕旋转方向
.selectionMode(PictureConfig.SINGLE)//单选or多选 .selectionMode(PictureConfig.SINGLE)//单选or多选
.imageEngine(GlideEngine.createGlideEngine())// 图片加载引擎 .imageEngine(GlideEngine.createGlideEngine())// 图片加载引擎
.forResult(PictureConfig.CHOOSE_REQUEST) .forResult(PictureConfig.CHOOSE_REQUEST)
} else { } else {
showMissingPermissionDialog("位置 相机") showMissingPermissionDialog("位置 相机")
}
} }
}
} }
/** /**
...@@ -276,13 +275,13 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -276,13 +275,13 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
@Throws(Exception::class) @Throws(Exception::class)
override fun doInBackground(): List<File> { override fun doInBackground(): List<File> {
return Luban.with(mContext) return Luban.with(mContext)
.loadMediaData<LocalMedia>(arrayListOf(media)) .loadMediaData<LocalMedia>(arrayListOf(media))
.ignoreBy(200) .ignoreBy(200)
.isCamera(false) .isCamera(false)
.setCompressQuality(80) .setCompressQuality(80)
.setTargetDir(null) .setTargetDir(null)
.setFocusAlpha(false) .setFocusAlpha(false)
.setNewCompressFileName(newFileName).get() .setNewCompressFileName(newFileName).get()
} }
override fun onSuccess(files: List<File>) { override fun onSuccess(files: List<File>) {
...@@ -331,7 +330,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser ...@@ -331,7 +330,7 @@ class BasicUserProfileActivity : BaseActivity(), View.OnClickListener, BasicUser
// 相册获取图片 // 相册获取图片
PictureConfig.CHOOSE_REQUEST -> { PictureConfig.CHOOSE_REQUEST -> {
val selectList: List<LocalMedia> = val selectList: List<LocalMedia> =
PictureSelector.obtainMultipleResult(data) PictureSelector.obtainMultipleResult(data)
val img = selectList[0] val img = selectList[0]
uploadOss(img.compressPath, OssType.PHOTO.type) uploadOss(img.compressPath, OssType.PHOTO.type)
} }
......
...@@ -22,7 +22,6 @@ import com.duben.loveplayletd.ui.activitys.base.BaseActivity ...@@ -22,7 +22,6 @@ import com.duben.loveplayletd.ui.activitys.base.BaseActivity
import com.duben.loveplayletd.utils.ToastUtil import com.duben.loveplayletd.utils.ToastUtil
import kotlinx.android.synthetic.main.activity_drawcash.* import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
import okhttp3.internal.notify
/** /**
* @author Assen * @author Assen
...@@ -169,7 +168,7 @@ class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView { ...@@ -169,7 +168,7 @@ class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView {
override fun addCashoutReqSuc() { override fun addCashoutReqSuc() {
// showToast("提现成功!") // showToast("提现成功!")
ToastUtil.showLong(context,"提现已申请,请耐心等待!") ToastUtil.showLong(context, "提现已申请,请耐心等待!")
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
finish() finish()
}, 2500) }, 2500)
......
...@@ -14,6 +14,7 @@ import android.view.View ...@@ -14,6 +14,7 @@ import android.view.View
import android.widget.EditText import android.widget.EditText
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bigkoo.pickerview.builder.OptionsPickerBuilder import com.bigkoo.pickerview.builder.OptionsPickerBuilder
...@@ -385,8 +386,27 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -385,8 +386,27 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
private fun showAddressDialog() { private fun showAddressDialog() {
val provinceIndex = 0 var provinceIndex = 0
val cityIndex = 0 var cityIndex = 0
// 默认选中
if (!userProfileData?.findCity.isNullOrEmpty()) {
val careerArr = userProfileData?.findCity!!.split("-")
addressOptions1Items?.let {
for (i in 0 until it.size) {
if (careerArr[0].isNotEmpty() && it[i].name == careerArr[0]) {
provinceIndex = i
for (j in 0 until it[i].cityList.size) {
if (careerArr[1].isNotEmpty() && it[i].cityList[j].name == careerArr[1]) {
cityIndex = j
break
}
}
break
}
}
}
}
// 弹出选择器 // 弹出选择器
val pvOptions = val pvOptions =
...@@ -403,8 +423,14 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -403,8 +423,14 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
tvJyfw.text = tx tvJyfw.text = tx
} }
.setSelectOptions(provinceIndex, cityIndex) .setSelectOptions(provinceIndex, cityIndex)
.setDividerColor(Color.BLACK) .setTitleText("选择交友范围")
.setTextColorCenter(Color.BLACK) //设置选中项文字颜色 .setTitleColor(Color.WHITE)
.setTitleBgColor(ContextCompat.getColor(this, R.color.color_232122))
.setBgColor(ContextCompat.getColor(this, R.color.color_232122))
.setCancelColor(Color.WHITE)
.setSubmitColor(ContextCompat.getColor(this, R.color.color_E8CF83))
.setDividerColor(Color.LTGRAY)
.setTextColorCenter(Color.WHITE) //设置选中项文字颜色
.setContentTextSize(20) .setContentTextSize(20)
.build<Any>() .build<Any>()
...@@ -416,8 +442,27 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -416,8 +442,27 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
} }
private fun showJobPick() { private fun showJobPick() {
val provinceIndex = 0 var firstIndex = 0
val cityIndex = 0 var secondIndex = 0
// 默认选中
if (!userProfileData?.career.isNullOrEmpty()) {
val careerArr = userProfileData?.career!!.split("-")
jobOptions1Items?.let {
for (i in 0 until it.size) {
if (careerArr[0].isNotEmpty() && it[i].sort == careerArr[0]) {
firstIndex = i
for (j in 0 until it[i].name.size) {
if (careerArr[1].isNotEmpty() && it[i].name[j] == careerArr[1]) {
secondIndex = j
break
}
}
break
}
}
}
}
// 弹出选择器 // 弹出选择器
val pvOptions = OptionsPickerBuilder(this) { options1, options2, _, _ -> val pvOptions = OptionsPickerBuilder(this) { options1, options2, _, _ ->
...@@ -432,9 +477,15 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie ...@@ -432,9 +477,15 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
userProfileData?.career = tx userProfileData?.career = tx
tvJob.text = tx tvJob.text = tx
} }
.setSelectOptions(provinceIndex, cityIndex) .setSelectOptions(firstIndex, secondIndex)
.setDividerColor(Color.BLACK) .setTitleText("选择职业")
.setTextColorCenter(Color.BLACK) //设置选中项文字颜色 .setTitleColor(Color.WHITE)
.setTitleBgColor(ContextCompat.getColor(this, R.color.color_232122))
.setBgColor(ContextCompat.getColor(this, R.color.color_232122))
.setCancelColor(Color.WHITE)
.setSubmitColor(ContextCompat.getColor(this, R.color.color_E8CF83))
.setDividerColor(Color.LTGRAY)
.setTextColorCenter(Color.WHITE) //设置选中项文字颜色
.setContentTextSize(20) .setContentTextSize(20)
.build<Any>() .build<Any>()
......
...@@ -138,6 +138,15 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -138,6 +138,15 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
R.id.iv_head_more -> { R.id.iv_head_more -> {
showToBlackDialog() showToBlackDialog()
} }
R.id.iv_avatar_female -> {
userProfileData?.let {
val bundle = Bundle()
bundle.putStringArrayList(
ImagePreviewActivity.IMAGE_PREVIEW_DATA, arrayListOf(it.headerUrl)
)
readyGo(ImagePreviewActivity::class.java, bundle)
}
}
R.id.iv_like, R.id.tv_like_male -> { R.id.iv_like, R.id.tv_like_male -> {
userProfileData?.let { userProfileData?.let {
if (!UserManager.getInstance().vipFlag && UserManager.getInstance().userSex == 1) { if (!UserManager.getInstance().vipFlag && UserManager.getInstance().userSex == 1) {
...@@ -205,6 +214,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie ...@@ -205,6 +214,7 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserProfileVie
tv_chat.setOnClickListener(this) tv_chat.setOnClickListener(this)
tv_like_male.setOnClickListener(this) tv_like_male.setOnClickListener(this)
iv_like.setOnClickListener(this) iv_like.setOnClickListener(this)
iv_avatar_female.setOnClickListener(this)
} }
override fun getMorePageSuc(data: UserProfileData) { override fun getMorePageSuc(data: UserProfileData) {
......
...@@ -144,7 +144,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener { ...@@ -144,7 +144,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
if (data.expireTime > 0) { if (data.expireTime > 0) {
iv_vip_label.setImageResource(R.mipmap.ic_is_vip) iv_vip_label.setImageResource(R.mipmap.ic_is_vip)
tv_vip_date.text = "限时五折起" tv_vip_btn.text = "限时五折起"
if (data.isForever) { if (data.isForever) {
tv_vip_date.text = "有效期: 永久有效" tv_vip_date.text = "有效期: 永久有效"
} else { } else {
......
...@@ -64,6 +64,13 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -64,6 +64,13 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
squarePresenter.detachView() squarePresenter.detachView()
} }
override fun onFragmentResume() {
super.onFragmentResume()
if (::squareAdapter.isInitialized && !squareAdapter.isBlur() && UserManager.getInstance().vipFlag) {
squareAdapter.setIsBlur(true)
}
}
override fun onFragmentFirstVisible() { override fun onFragmentFirstVisible() {
super.onFragmentFirstVisible() super.onFragmentFirstVisible()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) {
...@@ -80,8 +87,7 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -80,8 +87,7 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
private fun initRecy() { private fun initRecy() {
squareAdapter = SquareAdapter() squareAdapter = SquareAdapter()
if (mType == 3 && !UserManager.getInstance().vipFlag && UserManager.getInstance().userSex == 1 if (mType == 3 && !UserManager.getInstance().vipFlag && UserManager.getInstance().userSex == 1) {
) {
squareAdapter.setIsBlur(true) squareAdapter.setIsBlur(true)
} else { } else {
squareAdapter.setIsBlur(false) squareAdapter.setIsBlur(false)
......
package com.duben.loveplayletd.ui.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import androidx.recyclerview.widget.RecyclerView;
public class CustomRecyclerView extends RecyclerView {
private float startY;
private static final int THRESHOLD = 10;
public CustomRecyclerView(Context context) {
super(context);
}
public CustomRecyclerView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomRecyclerView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN:
startY = ev.getY();
getParent().requestDisallowInterceptTouchEvent(true);
break;
case MotionEvent.ACTION_MOVE:
float currentY = ev.getY();
float dy = currentY - startY;
if (dy < -THRESHOLD) {
getParent().requestDisallowInterceptTouchEvent(false);
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
getParent().requestDisallowInterceptTouchEvent(false);
break;
}
return super.dispatchTouchEvent(ev);
}
}
\ No newline at end of file
...@@ -3,9 +3,10 @@ package com.duben.loveplayletd.ui.widgets; ...@@ -3,9 +3,10 @@ package com.duben.loveplayletd.ui.widgets;
import android.content.Context; import android.content.Context;
import android.util.AttributeSet; import android.util.AttributeSet;
public class SquareImageView extends androidx.appcompat.widget.AppCompatImageView { import com.tencent.qcloud.tuikit.timcommon.component.RoundCornerImageView;
public class SquareImageView extends RoundCornerImageView {
float width, height; float width, height;
private float radius = 5f;
public SquareImageView(Context context) { public SquareImageView(Context context) {
super(context); super(context);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:startColor="#DD6470" /> android:startColor="#DD6470" />
<corners <corners
android:bottomRightRadius="10dp" android:bottomRightRadius="5dp"
android:topLeftRadius="10dp" /> android:topLeftRadius="5dp" />
</shape> </shape>
\ No newline at end of file
<?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:layout_width="match_parent" android:layout_width="match_parent"
...@@ -307,7 +306,7 @@ ...@@ -307,7 +306,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="80dp"
android:lineHeight="20dp" android:lineHeight="20dp"
android:text="1.当月提取总金额小于500元时,手续费2%;\n2.当月提取总金额大于500、小于5000元时,手续费5%;\n3.当月提取总金额大于5000元时,手续费10%" android:text="1.当月提取总金额小于500元时,手续费2%;\n2.当月提取总金额大于500、小于5000元时,手续费5%;\n3.当月提取总金额大于5000元时,手续费10%"
android:textColor="@color/color_A5A5A7" /> android:textColor="@color/color_A5A5A7" />
...@@ -323,7 +322,7 @@ ...@@ -323,7 +322,7 @@
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:layout_marginBottom="30dp" android:layout_marginBottom="20dp"
android:background="@drawable/shape_draw_cash_orange" android:background="@drawable/shape_draw_cash_orange"
android:elevation="2dp" android:elevation="2dp"
android:text="提取奖励" android:text="提取奖励"
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<TextView <TextView
android:id="@+id/tv_share_img" android:id="@+id/tv_share_img"
android:layout_width="320dp" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/shape_share_btn" android:background="@drawable/shape_share_btn"
android:elevation="2dp" android:elevation="2dp"
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
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:background="@color/full_transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
app:layout_behavior=".ui.widgets.AppBarLayoutBehavior">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout" android:id="@+id/toolbar_layout"
...@@ -108,24 +107,26 @@ ...@@ -108,24 +107,26 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_album_title" android:id="@+id/tv_album_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="30dp" android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:text="相册" android:text="相册"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" /> android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView <com.duben.loveplayletd.ui.widgets.CustomRecyclerView
android:id="@+id/rcy_profile_album" android:id="@+id/rcy_profile_album"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="120dp" android:layout_height="120dp"
android:layout_marginTop="10dp" /> android:layout_marginTop="10dp"
android:paddingStart="5dp"
android:paddingEnd="5dp" />
</LinearLayout> </LinearLayout>
...@@ -354,7 +355,6 @@ ...@@ -354,7 +355,6 @@
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_weight="1" android:layout_weight="1"
android:background="@drawable/shape_profile_chat" android:background="@drawable/shape_profile_chat"
android:drawablePadding="-40dp" android:drawablePadding="-40dp"
......
...@@ -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="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"> android:layout_marginStart="5dp">
<ImageView <ImageView
android:id="@+id/iv_photo" android:id="@+id/iv_photo"
......
...@@ -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:id="@+id/head_container" android:id="@+id/head_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp"> android:layout_height="match_parent">
<View <View
android:id="@+id/v_bar" android:id="@+id/v_bar"
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
app:layout_collapseParallaxMultiplier="0.5"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
...@@ -25,7 +25,6 @@ buildscript { ...@@ -25,7 +25,6 @@ buildscript {
classpath "com.mob.sdk:MobSDK:+" classpath "com.mob.sdk:MobSDK:+"
classpath 'com.huawei.agconnect:agcp:1.6.0.300' classpath 'com.huawei.agconnect:agcp:1.6.0.300'
classpath 'com.hihonor.mcs:asplugin:2.0.1.300' classpath 'com.hihonor.mcs:asplugin:2.0.1.300'
classpath 'com.google.gms:google-services:4.3.15'
} }
} }
......
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