fix [上滑无法关闭名片]

This commit is contained in:
zlzw 2024-03-28 13:48:20 +08:00
parent 72a18a0500
commit 6e6acd8871
2 changed files with 20 additions and 7 deletions

View File

@ -34,6 +34,7 @@ import io.rong.imkit.conversation.MessageListAdapter;
import io.rong.imkit.conversation.extension.InputMode;
import io.rong.imkit.conversation.extension.RongExtensionViewModel;
import io.rong.imkit.conversation.extension.component.inputpanel.InputPanel;
import io.rong.imkit.widget.refresh.api.RefreshLayout;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
@ -52,6 +53,12 @@ public class PDLiveConversationFragment extends ConversationFragment {
public PDLiveConversationFragment() {
}
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
super.onLoadMore(refreshLayout);
EventBus.getDefault().post(new PDChatInputModeEvent(InputMode.TextInput));
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
mList.addOnScrollListener(new RecyclerView.OnScrollListener() {
@ -63,7 +70,9 @@ public class PDLiveConversationFragment extends ConversationFragment {
@Override
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
EventBus.getDefault().post(new PDChatInputModeEvent(InputMode.TextInput));
if (dx != 0 || dy != 0) {
EventBus.getDefault().post(new PDChatInputModeEvent(InputMode.TextInput));
}
}
});
super.onViewCreated(view, savedInstanceState);

View File

@ -7,6 +7,8 @@ import android.graphics.Color;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
@ -15,6 +17,7 @@ import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
@ -233,6 +236,7 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
imgMore.setOnClickListener(this);
imBack.setOnClickListener(this);
card = findViewById(R.id.userCard);
mContainer = findViewById(R.id.container);
card.setBackgroundColor(Color.parseColor("#00000000"));
mContainer = findViewById(R.id.container);
inputPanel.addMediaMessageCallback(new InputPanelViewHolder.MediaMessageCallback() {
@ -279,10 +283,10 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
ViewUtils.findViewById(card, R.id.user_status, TextView.class).setText(R.string.activity_msg_chat_top_status_offline);
ViewUtils.findViewById(card, R.id.userStatusIcon, ImageView.class).setImageResource(R.mipmap.icon_gray);
}
if("C".equals(data.getUser().getType())){
ViewUtils.findViewById(card,R.id.user_auth_status).setVisibility(View.VISIBLE);
}else{
ViewUtils.findViewById(card,R.id.user_auth_status).setVisibility(View.GONE);
if ("C".equals(data.getUser().getType())) {
ViewUtils.findViewById(card, R.id.user_auth_status).setVisibility(View.VISIBLE);
} else {
ViewUtils.findViewById(card, R.id.user_auth_status).setVisibility(View.GONE);
}
showBanner();
showTag();
@ -327,12 +331,12 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
private void showTag() {
List<String> tags = new ArrayList<>();
tags.add(userInfoBean.getInfo().getAge()+(WordUtil.isNewZh()?"":"years old"));
tags.add(userInfoBean.getInfo().getAge() + (WordUtil.isNewZh() ? "" : "years old"));
if (!StringUtil.isEmpty(userInfoBean.getInfo().getCareer())) {
tags.add(userInfoBean.getInfo().getCareer());
}
if (!StringUtil.isEmpty(userInfoBean.getInfo().getHeight()) && !userInfoBean.getInfo().getHeight().equals("0")) {
tags.add(userInfoBean.getInfo().getHeight()+"cm");
tags.add(userInfoBean.getInfo().getHeight() + "cm");
}
List<String> t;
if (WordUtil.isNewZh()) {