主播评级:2k屏UI适配
This commit is contained in:
@@ -13,6 +13,7 @@ import com.mango.moshen.base.BaseDialog
|
||||
import com.mango.moshen.databinding.DialogAnchorGradeBinding
|
||||
import com.mango.moshen.home.MeViewModel
|
||||
import com.mango.moshen.home.widget.RoundBackgroundColorSpan
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.netease.nim.uikit.common.util.sys.TimeUtil
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
@@ -101,7 +102,7 @@ class AnchorGradeDialog : BaseDialog<DialogAnchorGradeBinding>() {
|
||||
for (i in nextRemaining.indices) {
|
||||
if (i % 3 != 2) {
|
||||
val span = RoundBackgroundColorSpan(
|
||||
"#E8EAF3".toColorInt(), "#161958".toColorInt(), 8
|
||||
"#E8EAF3".toColorInt(), "#161958".toColorInt(), ScreenUtil.dip2px(4f)
|
||||
)
|
||||
nextRemaining.setSpan(
|
||||
span, i, i + 1, Spannable.SPAN_EXCLUSIVE_INCLUSIVE
|
||||
|
@@ -7,6 +7,8 @@ import android.text.style.ReplacementSpan;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
|
||||
/**
|
||||
* 给每个文字添加方框
|
||||
*/
|
||||
@@ -15,7 +17,7 @@ public class RoundBackgroundColorSpan extends ReplacementSpan {
|
||||
private final int mRadius;
|
||||
private final int bgColor;
|
||||
private final int textColor;
|
||||
private final int horizontalPadding = 4;
|
||||
private final int horizontalPadding = ScreenUtil.dip2px(2);
|
||||
RectF rectF = new RectF();
|
||||
private int mSize;
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/drawable-xxhdpi/anchor_grade_bg_update_text.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/anchor_grade_bg_update_text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
@@ -198,7 +198,6 @@
|
||||
android:id="@+id/iv_update_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:src="@drawable/anchor_grade_bg_update_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@@ -69,7 +69,6 @@
|
||||
android:onClick="@{click}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="100dp"
|
||||
app:layout_constraintTop_toTopOf="@id/me_item_setting">
|
||||
|
||||
<com.mango.moshen.common.widget.CircleImageView
|
||||
@@ -123,6 +122,7 @@
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:maxLength="10"
|
||||
android:text="@{userInfo.nick}"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
|
Reference in New Issue
Block a user