|
|
@@ -22,12 +22,10 @@ import android.widget.FrameLayout;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
|
import android.widget.TextView;
|
|
|
-
|
|
|
import androidx.annotation.NonNull;
|
|
|
import androidx.annotation.Nullable;
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
-
|
|
|
import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
import com.google.gson.Gson;
|
|
|
@@ -75,8 +73,6 @@ import com.tencent.qcloud.tuikit.tuichat.presenter.GroupChatPresenter;
|
|
|
import com.tencent.qcloud.tuikit.tuichat.util.ChatMessageBuilder;
|
|
|
import com.tencent.qcloud.tuikit.tuichat.util.TUIChatLog;
|
|
|
import com.tencent.qcloud.tuikit.tuichat.util.TUIChatUtils;
|
|
|
-import com.tencent.qcloud.tuikit.tuichat.util.ViewTool;
|
|
|
-
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
|
import java.util.Comparator;
|
|
|
@@ -145,8 +141,7 @@ public class ChatView extends LinearLayout implements IChatLayout {
|
|
|
}
|
|
|
|
|
|
private void initViews() {
|
|
|
- ViewTool.inflateFragmentPixelsById(getContext(), R.layout.chat_minimalist_layout, this, 1194, 834);
|
|
|
-// inflate(getContext(), R.layout.chat_minimalist_layout, this);
|
|
|
+ inflate(getContext(), R.layout.chat_minimalist_layout, this);
|
|
|
mMessageRecyclerView = findViewById(R.id.chat_message_layout);
|
|
|
mInputView = findViewById(R.id.chat_input_layout);
|
|
|
mInputView.setChatLayout(this);
|
|
|
@@ -467,8 +462,11 @@ public class ChatView extends LinearLayout implements IChatLayout {
|
|
|
|
|
|
private void loadFace(String faceUrl) {
|
|
|
Glide.with(this)
|
|
|
- .load(faceUrl)
|
|
|
- .into(chatAvatar);
|
|
|
+ .load(faceUrl)
|
|
|
+ .apply(new RequestOptions()
|
|
|
+ .error(com.tencent.qcloud.tuikit.timcommon.R.drawable.core_default_user_icon_light)
|
|
|
+ .placeholder(com.tencent.qcloud.tuikit.timcommon.R.drawable.core_default_user_icon_light))
|
|
|
+ .into(chatAvatar);
|
|
|
}
|
|
|
|
|
|
private void onHeaderUserClick(View v) {
|
|
|
@@ -608,8 +606,11 @@ public class ChatView extends LinearLayout implements IChatLayout {
|
|
|
return;
|
|
|
}
|
|
|
Glide.with(getContext())
|
|
|
- .load(faceUrl)
|
|
|
- .into(chatAvatar);
|
|
|
+ .load(faceUrl)
|
|
|
+ .apply(new RequestOptions()
|
|
|
+ .error(com.tencent.qcloud.tuikit.timcommon.R.drawable.core_default_user_icon_light)
|
|
|
+ .placeholder(com.tencent.qcloud.tuikit.timcommon.R.drawable.core_default_user_icon_light))
|
|
|
+ .into(chatAvatar);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -643,8 +644,11 @@ public class ChatView extends LinearLayout implements IChatLayout {
|
|
|
return;
|
|
|
}
|
|
|
Glide.with(getContext())
|
|
|
- .load(faceUrl)
|
|
|
- .into(chatAvatar);
|
|
|
+ .load(faceUrl)
|
|
|
+ .apply(new RequestOptions()
|
|
|
+ .error(com.tencent.qcloud.tuikit.timcommon.R.drawable.core_default_user_icon_light)
|
|
|
+ .placeholder(com.tencent.qcloud.tuikit.timcommon.R.drawable.core_default_user_icon_light))
|
|
|
+ .into(chatAvatar);
|
|
|
}
|
|
|
});
|
|
|
}
|