我的铭牌UI修改
This commit is contained in:
@@ -6,6 +6,7 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
|
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
import com.yizhuan.xchat_android_core.decoration.nameplate.bean.NamePlateInfo;
|
import com.yizhuan.xchat_android_core.decoration.nameplate.bean.NamePlateInfo;
|
||||||
@@ -29,14 +30,16 @@ public class MyNamePlateAdapter extends BaseQuickAdapter<NamePlateInfo.Nameplate
|
|||||||
helper.setText(R.id.tv_nameplate_name, item.getNameplateName());
|
helper.setText(R.id.tv_nameplate_name, item.getNameplateName());
|
||||||
//铭牌图标
|
//铭牌图标
|
||||||
ImageView ivCover = helper.getView(R.id.iv_nameplate_cover);
|
ImageView ivCover = helper.getView(R.id.iv_nameplate_cover);
|
||||||
GlideApp.with(mContext).load(item.getNameplateImage()).into(ivCover);
|
GlideApp.with(mContext)
|
||||||
|
.load(item.getNameplateImage())
|
||||||
|
.into(ivCover);
|
||||||
|
|
||||||
|
|
||||||
//使用按钮
|
//使用按钮
|
||||||
TextView tvUsed = helper.getView(R.id.tv_used);
|
TextView tvUsed = helper.getView(R.id.tv_used);
|
||||||
tvUsed.setBackgroundResource(item.isUsing() ? R.drawable.bg_common_cancel : R.drawable.bg_common_confirm);
|
tvUsed.setBackgroundResource(item.isUsing() ? R.drawable.bg_common_cancel : R.drawable.bg_common_confirm);
|
||||||
tvUsed.setTextColor(item.isUsing() ? mContext.getResources().getColor(R.color.color_4C5AF1) :
|
tvUsed.setTextColor(item.isUsing() ? mContext.getResources().getColor(R.color.color_4C5AF1) :
|
||||||
mContext.getResources().getColor(R.color.text_title_white));
|
mContext.getResources().getColor(R.color.white));
|
||||||
tvUsed.setText(item.isUsing() ? R.string.label_used : R.string.label_can_use);
|
tvUsed.setText(item.isUsing() ? R.string.label_used : R.string.label_can_use);
|
||||||
if (item.isIsExpired()) { // 过期
|
if (item.isIsExpired()) { // 过期
|
||||||
// 日期展示
|
// 日期展示
|
||||||
|
@@ -599,7 +599,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
|||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
} else {
|
} else {
|
||||||
isChat = privateChatLimitInfo.isChat();
|
isChat = privateChatLimitInfo.isChat();
|
||||||
hintText = "暂无权利发起私聊";
|
hintText = "暂未达到可发起私聊等级";
|
||||||
inputPanel.setLimitLevel(privateChatLimitInfo.isChat(), privateChatLimitInfo.getMessage());
|
inputPanel.setLimitLevel(privateChatLimitInfo.isChat(), privateChatLimitInfo.getMessage());
|
||||||
|
|
||||||
String experLevel = "财富等级≥" + privateChatLimitInfo.getWealthLevel();
|
String experLevel = "财富等级≥" + privateChatLimitInfo.getWealthLevel();
|
||||||
|
@@ -2,32 +2,34 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="64dp"
|
||||||
android:background="@color/bg_normal_1c1b22"
|
android:layout_marginTop="6dp"
|
||||||
>
|
android:layout_marginBottom="6dp"
|
||||||
|
android:background="@color/bg_normal_1c1b22">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/ll_nameplate_cover"
|
android:id="@+id/ll_nameplate_cover"
|
||||||
android:layout_width="112dp"
|
android:layout_width="136dp"
|
||||||
android:orientation="vertical"
|
android:layout_height="64dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="15dp"
|
||||||
android:padding="5dp"
|
android:background="@drawable/bg_secondary_radius_10"
|
||||||
android:background="@drawable/bg_secondary_radius_15"
|
android:orientation="vertical">
|
||||||
android:layout_height="80dp" >
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_nameplate_cover"
|
android:id="@+id/iv_nameplate_cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="90dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="30dp"
|
||||||
android:scaleType="centerInside"
|
android:layout_gravity="center"
|
||||||
/>
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_tag"
|
android:id="@+id/iv_tag"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
tools:src="@drawable/ic_mark_limit"/>
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
tools:src="@drawable/ic_mark_limit" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
@@ -35,49 +37,45 @@
|
|||||||
android:id="@+id/tv_nameplate_name"
|
android:id="@+id/tv_nameplate_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="left"
|
|
||||||
android:textColor="@color/text_title_white"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_toEndOf="@+id/ll_nameplate_cover"
|
|
||||||
android:layout_marginTop="@dimen/dp_25"
|
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_toEndOf="@+id/ll_nameplate_cover"
|
||||||
|
android:layout_alignTop="@id/ll_nameplate_cover"
|
||||||
android:drawablePadding="5dp"
|
android:drawablePadding="5dp"
|
||||||
android:textSize="15sp"
|
android:gravity="left"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/text_title_white"
|
||||||
|
android:textSize="14sp"
|
||||||
tools:text="神豪座驾" />
|
tools:text="神豪座驾" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_used"
|
android:id="@+id/tv_used"
|
||||||
android:layout_width="85dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="33dp"
|
android:layout_height="20dp"
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"
|
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignTop="@+id/tv_nameplate_name"
|
android:layout_centerVertical="true"
|
||||||
android:textColor="@color/text_title_white"
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:background="@drawable/bg_my_head_buy"
|
||||||
tools:text="@string/label_can_use"
|
tools:text="@string/label_can_use"
|
||||||
tools:background="@drawable/bg_my_head_buy"/>
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_counters"
|
android:id="@+id/tv_counters"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toEndOf="@id/ll_nameplate_cover"
|
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_alignBottom="@+id/ll_nameplate_cover"
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_below="@id/tv_nameplate_name"
|
||||||
|
android:layout_toEndOf="@id/ll_nameplate_cover"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
android:textColor="@color/color_666666"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:text="- 1567天 -" />
|
tools:text="- 1567天 -" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1px"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:background="@color/line_353548"/>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@@ -959,7 +959,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
|||||||
|
|
||||||
private void setEditTextState() {
|
private void setEditTextState() {
|
||||||
if (!isChat) {
|
if (!isChat) {
|
||||||
messageEditText.setHint("暂无权利发起私聊");
|
messageEditText.setHint("暂未达到可发起私聊等级");
|
||||||
messageEditText.setFocusable(false);
|
messageEditText.setFocusable(false);
|
||||||
messageEditText.setFocusableInTouchMode(false);
|
messageEditText.setFocusableInTouchMode(false);
|
||||||
messageEditText.setEnabled(false);
|
messageEditText.setEnabled(false);
|
||||||
|
Reference in New Issue
Block a user