酒吧交友房 进出房间不接受Im消息,用户详情 标签显示优化。
This commit is contained in:
@@ -137,7 +137,7 @@ public class CommonAppContext extends MultiDexApplication implements Application
|
||||
@Getter
|
||||
public UnreadCountEvent unreadCountEvent;
|
||||
|
||||
public static int selectRelease = -1;
|
||||
public static int selectRelease = 1;
|
||||
|
||||
public int is_open = 0;//主题的开关
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ public class ImageUtils {
|
||||
// 加载成功!resource 就是最终的 Bitmap 对象
|
||||
int imageWidth = resource.getWidth(); // 图片原始宽度
|
||||
int imageHeight = resource.getHeight(); // 图片原始高度
|
||||
params.width = (int) (imageWidth * 1.3);
|
||||
// params.width = (int) (imageWidth * 1.3);
|
||||
// 这里可以使用宽高(如打印、适配布局等)
|
||||
Log.d("GlideImageSize", "宽度:" + imageWidth + ",高度:" + imageHeight);
|
||||
return false; // 返回 false,Glide 会继续执行默认的图片设置(显示到 mImageView)
|
||||
|
||||
@@ -298,7 +298,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
}
|
||||
|
||||
public void setIsPriRoom(boolean isPriRoom,List<String> userIdList) {
|
||||
public void setIsPriRoom(boolean isPriRoom, List<String> userIdList) {
|
||||
if (easeChatAdapter != null) {
|
||||
easeChatAdapter.isPriRoom = isPriRoom;
|
||||
easeChatAdapter.userIdList = userIdList;
|
||||
@@ -481,9 +481,9 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
|
||||
|
||||
public void sendPriMsg(int status,RoomInputEvent roomInputEvent,EmotionDeatils emotionDeatils,String roomId) {
|
||||
public void sendPriMsg(int status, RoomInputEvent roomInputEvent, EmotionDeatils emotionDeatils, String roomId) {
|
||||
RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
if (status == 2){
|
||||
if (status == 2) {
|
||||
EmotionDeatils event = new EmotionDeatils();
|
||||
if (emotionDeatils != null && emotionDeatils.getChildren() != null && !emotionDeatils.getChildren().isEmpty() && emotionDeatils.getChildren().size() > 0) {
|
||||
int position = new Random().nextInt(emotionDeatils.getChildren().size());
|
||||
@@ -495,7 +495,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
t.setFromUserInfo(SpUtil.getUserInfo());
|
||||
t.setEmoji(event);
|
||||
}else {
|
||||
} else {
|
||||
String message = roomInputEvent.text;
|
||||
t.setText(message);
|
||||
t.setFromUserInfo(SpUtil.getUserInfo());
|
||||
@@ -537,7 +537,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
if (message.getRoomId() == null) {
|
||||
return;
|
||||
}
|
||||
if (!mIsPriRoom){
|
||||
if (!mIsPriRoom) {
|
||||
if (roomId == null || (!message.getRoomId().contains(roomId) && message.getMsgType() != 125)) {
|
||||
return;
|
||||
}
|
||||
@@ -612,13 +612,17 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
// message.getRoomId(), text.getJia_jia(), 2);
|
||||
// EventBus.getDefault().post(roomJoinMountModel);
|
||||
// }
|
||||
postAndAddMessage(message);
|
||||
if (!mIsPriRoom)
|
||||
postAndAddMessage(message);
|
||||
break;
|
||||
case 123:
|
||||
easeChatAdapter.clearData();
|
||||
postAndAddMessage(message);
|
||||
break;
|
||||
case 1002:
|
||||
if (mIsPriRoom){
|
||||
break;
|
||||
}
|
||||
case 1012:
|
||||
case 1011:
|
||||
case 1014:
|
||||
|
||||
@@ -181,6 +181,13 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
|
||||
if (!userInfo.getIcon().isEmpty()) {
|
||||
mBinding.headerInfo.flexEntry.setVisibility(VISIBLE);
|
||||
|
||||
if (mBinding.headerInfo.rlCpAnim.getVisibility() == VISIBLE){
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mBinding.headerInfo.flexEntry.getLayoutParams();
|
||||
params.endToStart = mBinding.headerInfo.rlCpAnim.getId();
|
||||
mBinding.headerInfo.flexEntry.setLayoutParams(params);
|
||||
}
|
||||
|
||||
for (String url : userInfo.getIcon()) {
|
||||
if (url != null && url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(Application.getInstance());
|
||||
@@ -188,7 +195,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
||||
);
|
||||
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10), 0); // 右边距
|
||||
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ import android.widget.TextView;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.google.android.flexbox.FlexDirection;
|
||||
import com.google.android.flexbox.JustifyContent;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.contacts.RoomUserContacts;
|
||||
@@ -579,27 +581,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.imRoomGz.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
if (!userInfo.getIcon().isEmpty()) {
|
||||
mBinding.flexEntry.setVisibility(VISIBLE);
|
||||
for (String url : userInfo.getIcon()) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(Application.getInstance());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
||||
);
|
||||
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1, params);
|
||||
mBinding.flexEntry.addView(imageView1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBinding.flexEntry.setVisibility(GONE);
|
||||
}
|
||||
|
||||
if (userInfo.getProfile().isEmpty()) {
|
||||
mBinding.jianj.setText("");
|
||||
@@ -696,6 +678,34 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
}
|
||||
mBinding.llCpAnimAvatar.setLayoutParams(params);
|
||||
}
|
||||
|
||||
if (!userInfo.getIcon().isEmpty()) {
|
||||
mBinding.flexEntry.setVisibility(VISIBLE);
|
||||
if (mBinding.rlCpAnim.getVisibility() == VISIBLE){
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mBinding.flexEntry.getLayoutParams();
|
||||
params.endToStart = mBinding.rlCpAnim.getId();
|
||||
mBinding.flexEntry.setLayoutParams(params);
|
||||
}
|
||||
|
||||
for (String url : userInfo.getIcon()) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(Application.getInstance());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
||||
);
|
||||
params.setMargins(0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10), Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1, params);
|
||||
mBinding.flexEntry.addView(imageView1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBinding.flexEntry.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void dianj(int type) {
|
||||
|
||||
@@ -116,19 +116,19 @@
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:text="立即加入"
|
||||
android:textColor="#FF52FF96"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_gh"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_gh" />
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/flex_entry"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
app:alignContent="flex_start"
|
||||
app:alignItems="flex_start"
|
||||
app:flexWrap="wrap"
|
||||
app:layout_constraintEnd_toEndOf="@id/rl_cp_anim"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_join_guild" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user