打招呼背景 以及消息红点

This commit is contained in:
ningwenqiang 2024-11-06 17:46:36 +08:00
parent 7e5cda6bdd
commit 3878dc3d76
4 changed files with 15 additions and 6 deletions

View File

@ -66,7 +66,7 @@ public class MsgRecommendAdapter extends RecyclerView.Adapter<MsgRecommendAdapte
ImgLoader.display(holder.itemView.getContext(), mList.get(position).getAvatar(), holder.mAvatar);
holder.rc_conversation_title.setText(mList.get(position).getUser_nicename());
holder.sayHi.setText(mList.get(position).isSayHi()? (WordUtil.isNewZh()?"已打招呼":"Said Hallo"):(WordUtil.isNewZh()?"打招呼":"Greet"));
holder.sayHi.setBackground(mList.get(position).isSayHi()? mContext.getDrawable(R.drawable.bg_msg_recommended):mContext.getDrawable(R.drawable.bg_msg_recommend));
holder.sayHi.setBackground(mList.get(position).isSayHi()? mContext.getDrawable(R.drawable.bg_msg_recommended):mContext.getDrawable(R.drawable.bg_msg_yola_recommend));
holder.sayHi.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="15dp"
android:topRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:bottomRightRadius="15dp" />
<solid android:color="#FEE540"/>
</shape>

View File

@ -49,13 +49,13 @@
android:layout_width="51dp"
android:layout_height="26dp"
android:ellipsize="end"
android:background="@drawable/bg_msg_recommend"
android:background="@drawable/bg_msg_yola_recommend"
android:maxWidth="120dp"
android:gravity="center"
android:layout_gravity="center_vertical"
android:maxLines="1"
android:textColor="@color/white"
android:textSize="11dp"
android:textColor="@color/black1"
android:textSize="11sp"
tools:text="打招呼" />
</LinearLayout>

View File

@ -105,8 +105,8 @@
<TextView
android:id="@+id/v_table_redpoint"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/background_ff5075"
android:gravity="center"
android:textColor="@color/white"