[Modify]1.6.0bug修复
This commit is contained in:
@@ -119,9 +119,9 @@ class EditUserLabelActivity : BaseViewBindingActivity<ActivityEditUserLabelBindi
|
||||
dialogManager.dismissDialog()
|
||||
userLabelInfo = data
|
||||
userLabelInfo?.meLabels?.let {
|
||||
mMyLabelAdapter.setNewData(it)
|
||||
if (it.isNotEmpty()) {
|
||||
binding.group.visibility = View.GONE
|
||||
mMyLabelAdapter.setNewData(it)
|
||||
} else {
|
||||
binding.group.visibility = View.VISIBLE
|
||||
}
|
||||
|
@@ -9,9 +9,12 @@ import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.text.TextUtils
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.OnItemTouchListener
|
||||
import com.fourmob.datetimepicker.date.DatePickerDialog
|
||||
import com.google.android.flexbox.AlignItems
|
||||
import com.google.android.flexbox.FlexDirection
|
||||
@@ -63,6 +66,7 @@ import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
/**
|
||||
* @author zhouxiangfeng
|
||||
*/
|
||||
@@ -163,6 +167,7 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
binding.llDesc.setOnClickListener(this)
|
||||
binding.layoutArea.setOnClickListener(this)
|
||||
binding.layoutTag.setOnClickListener(this)
|
||||
binding.tvTag.setOnClickListener(this)
|
||||
val mLayoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true)
|
||||
binding.rvPhotos.layoutManager = mLayoutManager
|
||||
}
|
||||
@@ -197,6 +202,21 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
binding.tvTag.visibility = View.VISIBLE
|
||||
binding.mLabelRecyclerView.visibility = View.GONE
|
||||
}
|
||||
|
||||
binding.mLabelRecyclerView.addOnItemTouchListener(object : OnItemTouchListener{
|
||||
override fun onInterceptTouchEvent(rv: RecyclerView, e: MotionEvent): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onTouchEvent(rv: RecyclerView, e: MotionEvent) {
|
||||
UIHelper.showLabelInfoAct(this@UserInfoModifyActivity, Method.LABEL)
|
||||
}
|
||||
|
||||
override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
override fun onDateSet(datePickerDialog: DatePickerDialog, year: Int, month: Int, day: Int) {
|
||||
@@ -335,7 +355,7 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
|
||||
})
|
||||
}
|
||||
R.id.layout_tag -> {
|
||||
R.id.layout_tag,R.id.tv_tag -> {
|
||||
UIHelper.showLabelInfoAct(this, Method.LABEL)
|
||||
}
|
||||
else -> {}
|
||||
@@ -478,8 +498,8 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
Method.LABEL -> {
|
||||
data?.let {
|
||||
val label = it.getStringExtra(EditUserLabelActivity.KEY_LABEL)
|
||||
val labelList = label?.split(",")
|
||||
if ((labelList?.size ?: 0) > 0) {
|
||||
if (label?.isNotEmpty() == true) {
|
||||
val labelList = label.split(",")
|
||||
binding.tvTag.visibility = View.INVISIBLE
|
||||
binding.mLabelRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@@ -34,13 +33,13 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tip"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_message">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
@@ -50,30 +49,14 @@
|
||||
android:src="@drawable/ic_close_exchange_tip"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_sure_close"
|
||||
android:id="@+id/tv_sure_close_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:text="@string/sure_to_close"
|
||||
android:text="@string/sure_to_close_exchange"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_9168FA"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="PEKO小新" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_sure_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/gold_exchange_power"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@@ -5064,8 +5064,7 @@
|
||||
<string name="open_exchange">開啓兌換</string>
|
||||
<string name="close_exchange">關閉兌換</string>
|
||||
<string name="gold_coin_balance">金幣餘額:%s</string>
|
||||
<string name="sure_to_close">確定關閉</string>
|
||||
<string name="gold_exchange_power">的金幣兌換權限嗎?</string>
|
||||
<string name="sure_to_close_exchange">確定關閉%s的金幣兌換權限嗎?</string>
|
||||
<string name="edit_tag">編輯標簽</string>
|
||||
<string name="edit_your_tags_tip">編輯你的標簽,可以大大提高你的人氣~</string>
|
||||
<string name="my_label">我的標簽</string>
|
||||
|
@@ -2,9 +2,14 @@ package com.yizhuan.erban.module_hall.hall.view.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.widget.dialog.BaseDialog;
|
||||
|
||||
@@ -32,9 +37,16 @@ public class CloseExchangeTipDialog extends BaseDialog {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.layout_close_exchange_dialog);
|
||||
|
||||
TextView name = findViewById(R.id.tv_name);
|
||||
if (name != null) {
|
||||
name.setText(this.name);
|
||||
TextView tvName = findViewById(R.id.tv_sure_close_tip);
|
||||
if (tvName != null) {
|
||||
String tip = getContext().getString(R.string.sure_to_close_exchange, name);
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(tip);
|
||||
builder.setSpan(
|
||||
new ForegroundColorSpan(ContextCompat.getColor(getContext(),R.color.color_9168FA)), 4,
|
||||
4 + name.length(),
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
tvName.setText(builder);
|
||||
}
|
||||
|
||||
ImageView close = findViewById(R.id.iv_close);
|
||||
|
Reference in New Issue
Block a user