|
1 | 1 | package cn.jiguang.imui.messages.viewholder; |
2 | 2 |
|
| 3 | +import android.graphics.Color; |
3 | 4 | import android.support.v7.widget.RecyclerView; |
4 | 5 | import android.util.Log; |
5 | 6 | import android.view.View; |
@@ -28,7 +29,7 @@ public void onBind(final MESSAGE message) { |
28 | 29 | // mMsgTv.setText(message.getText()); |
29 | 30 | String mText = message.getText(); |
30 | 31 |
|
31 | | - mMsgTv.setText(mText); |
| 32 | + mMsgTv.setText("暂不支持该消息类型"); |
32 | 33 |
|
33 | 34 | mMsgTv.setOnClickListener(new View.OnClickListener() { |
34 | 35 | @Override |
@@ -57,39 +58,8 @@ public boolean onLongClick(View view) { |
57 | 58 | @Override |
58 | 59 | public void applyStyle(MessageListStyle style) { |
59 | 60 | mMsgTv.setMaxWidth((int) (style.getWindowWidth() * style.getBubbleMaxWidth())); |
60 | | - if (mIsSender) { |
61 | | - mMsgTv.setBackground(style.getSendBubbleDrawable()); |
62 | | - mMsgTv.setTextColor(style.getSendBubbleTextColor()); |
63 | | - mMsgTv.setTextSize(style.getSendBubbleTextSize()); |
64 | | - mMsgTv.setPadding(style.getSendBubblePaddingLeft(), |
65 | | - style.getSendBubblePaddingTop(), |
66 | | - style.getSendBubblePaddingRight(), |
67 | | - style.getSendBubblePaddingBottom()); |
68 | | - if (style.getSendingProgressDrawable() != null) { |
69 | | - mSendingPb.setProgressDrawable(style.getSendingProgressDrawable()); |
70 | | - } |
71 | | - if (style.getSendingIndeterminateDrawable() != null) { |
72 | | - mSendingPb.setIndeterminateDrawable(style.getSendingIndeterminateDrawable()); |
73 | | - } |
74 | | - } else { |
75 | | - mMsgTv.setBackground(style.getReceiveBubbleDrawable()); |
76 | | - mMsgTv.setTextColor(style.getReceiveBubbleTextColor()); |
77 | | - mMsgTv.setTextSize(style.getReceiveBubbleTextSize()); |
78 | | - mMsgTv.setPadding(style.getReceiveBubblePaddingLeft(), |
79 | | - style.getReceiveBubblePaddingTop(), |
80 | | - style.getReceiveBubblePaddingRight(), |
81 | | - style.getReceiveBubblePaddingBottom()); |
82 | | - if (style.getShowDisplayName() == 1) { |
83 | | - mDisplayNameTv.setVisibility(View.VISIBLE); |
84 | | - } |
85 | | - } |
86 | | - mDateTv.setTextSize(style.getDateTextSize()); |
87 | | - mDateTv.setTextColor(style.getDateTextColor()); |
88 | | - |
89 | | - android.view.ViewGroup.LayoutParams layoutParams = mAvatarIv.getLayoutParams(); |
90 | | - layoutParams.width = style.getAvatarWidth(); |
91 | | - layoutParams.height = style.getAvatarHeight(); |
92 | | - mAvatarIv.setLayoutParams(layoutParams); |
| 61 | + mMsgTv.setTextSize(17); |
| 62 | + mMsgTv.setLinkTextColor(Color.rgb(173,0,151)); |
93 | 63 | } |
94 | 64 |
|
95 | 65 |
|
|
0 commit comments