默认气泡的修改
This commit is contained in:
parent
085f19c3ca
commit
d80bc3bd27
@ -217,6 +217,8 @@ public class CommonHttpUtil {
|
|||||||
}
|
}
|
||||||
if (obj.containsKey("clarity")) {
|
if (obj.containsKey("clarity")) {
|
||||||
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||||
|
} if (obj.containsKey("defaultBubbleUrl")) {
|
||||||
|
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||||
|
@ -42,6 +42,15 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final String SELECT_CLARITY = "selectClarity";
|
private final String SELECT_CLARITY = "selectClarity";
|
||||||
private final String CLARITY = "clarity";
|
private final String CLARITY = "clarity";
|
||||||
private final String xiaJBG = "xiaJBG";
|
private final String xiaJBG = "xiaJBG";
|
||||||
|
private final String keyDefaultBubbleUrl = "defaultBubbleUrl";
|
||||||
|
|
||||||
|
public void setDefaultBubbleUrl(String defaultBubbleUrl) {
|
||||||
|
put(keyDefaultBubbleUrl, defaultBubbleUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeyDefaultBubbleUrl() {
|
||||||
|
return getString(keyDefaultBubbleUrl);
|
||||||
|
}
|
||||||
|
|
||||||
public void setXiaJBG(boolean xjbg) {
|
public void setXiaJBG(boolean xjbg) {
|
||||||
put(xiaJBG, xjbg);
|
put(xiaJBG, xjbg);
|
||||||
|
@ -211,7 +211,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
|
|
||||||
itemView.setTag(bean);
|
itemView.setTag(bean);
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
params.setMargins(0, 0, DpUtil.dp2px(95), 0);
|
params.setMargins(0, 0, DpUtil.dp2px(110), 0);
|
||||||
params.gravity = Gravity.CENTER_VERTICAL;
|
params.gravity = Gravity.CENTER_VERTICAL;
|
||||||
mBg.setLayoutParams(params);
|
mBg.setLayoutParams(params);
|
||||||
if (bean.getType() == 6) {//大作战活动
|
if (bean.getType() == 6) {//大作战活动
|
||||||
@ -364,7 +364,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
|||||||
// }
|
// }
|
||||||
else if (bean.getType() == -2) {//自动消息,点击发言
|
else if (bean.getType() == -2) {//自动消息,点击发言
|
||||||
LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
params3.setMargins(0, 8, DpUtil.dp2px(95), 8);
|
params3.setMargins(0, 8, DpUtil.dp2px(110), 8);
|
||||||
params3.gravity = Gravity.CENTER_VERTICAL;
|
params3.gravity = Gravity.CENTER_VERTICAL;
|
||||||
mBg.setLayoutParams(params3);
|
mBg.setLayoutParams(params3);
|
||||||
mBg.setBackground(null);
|
mBg.setBackground(null);
|
||||||
|
@ -9,6 +9,7 @@ import android.graphics.NinePatch;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.graphics.drawable.NinePatchDrawable;
|
import android.graphics.drawable.NinePatchDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@ -17,6 +18,7 @@ import androidx.annotation.Nullable;
|
|||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.request.target.CustomTarget;
|
import com.bumptech.glide.request.target.CustomTarget;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -65,9 +67,15 @@ public class LoadDian9TuUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadDian9TuAssets(Context context, View imageView, int position) {
|
public void loadDian9TuAssets(Context context, View imageView, int position) {
|
||||||
Bitmap bitmap = getImageFromAssetsFile(context, "chat_message_bg.png");
|
if (TextUtils.isEmpty(IMLoginManager.get(context).getKeyDefaultBubbleUrl())) {
|
||||||
BITMAP_CACHE.add(bitmap);
|
Bitmap bitmap = getImageFromAssetsFile(context, "chat_message_bg.png");
|
||||||
setNinePathImage(context, imageView, bitmap, position);
|
BITMAP_CACHE.add(bitmap);
|
||||||
|
setNinePathImage(context, imageView, bitmap, position);
|
||||||
|
} else {
|
||||||
|
String url = IMLoginManager.get(context).getKeyDefaultBubbleUrl();
|
||||||
|
loadDian9Tu(context, imageView,url, 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadDian9TuAssets2(Context context, View imageView, String fileName, int position) {
|
public void loadDian9TuAssets2(Context context, View imageView, String fileName, int position) {
|
||||||
|
@ -4212,10 +4212,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||||
mChatRecyclerView.getLayoutParams();
|
mChatRecyclerView.getLayoutParams();
|
||||||
if (landscape == 2) {
|
if (landscape == 2) {
|
||||||
params1.height = DpUtil.dp2px(180);
|
params1.height = DpUtil.dp2px(200);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
params1.height = DpUtil.dp2px(300);
|
params1.height = DpUtil.dp2px(310);
|
||||||
}
|
}
|
||||||
mChatRecyclerView.setLayoutParams(params1);
|
mChatRecyclerView.setLayoutParams(params1);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dp" />
|
||||||
<solid android:color="#30000000" />
|
<solid android:color="#40000000" />
|
||||||
</shape>
|
</shape>
|
Loading…
Reference in New Issue
Block a user