修复聊天详情问题

This commit is contained in:
18401019693 2022-09-06 16:04:48 +08:00
parent 9b3483457f
commit 0a179e5727
2 changed files with 0 additions and 52 deletions

View File

@ -85,7 +85,6 @@
android:name=".activity.PDLiveConversationActivity"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:theme="@style/DialogNotTitleActivity"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"/>
<activity
android:name=".activity.PDLIiveChatActivity"

View File

@ -6,15 +6,11 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.app.ActivityCompat;
@ -37,7 +33,6 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.NoviceInstructorManager;
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.live.R;
import com.yunbao.live.bean.SearchUserBean;
import com.yunbao.live.dialog.MenuPopuwWindow;
@ -73,8 +68,6 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
private final int SELECT_IMAGE_REQUEST = 0x0001;
private ArrayList<ImageEntity> mSelectImages = new ArrayList<>();
private String targetId = "";
private LinearLayout mRootLayout;
private boolean isDialogWindow=true;
@Override
@ -88,11 +81,6 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
EventBus.getDefault().register(this);
mContext = this;
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
Intent intent = getIntent();
if(intent!=null){
isDialogWindow=intent.getBooleanExtra("dialogWindow",false);
}
configWindow();
initView();
initData();
WindowSoftModeAdjustResizeExecutor.assistActivity(this);
@ -100,41 +88,6 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
MessageIMManager.get(this).addConversationClickListener();
}
/**
* 配置窗口参数
*/
public void configWindow() {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(getResources().getColor(R.color.transparent));
getWindow().setGravity(Gravity.BOTTOM);//设置显示在底部 默认在中间
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.width = WindowManager.LayoutParams.MATCH_PARENT;//设置宽度满屏
if(isDialogWindow) {
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
}else{
lp.height = WindowManager.LayoutParams.MATCH_PARENT;
}
getWindow().setAttributes(lp);
setFinishOnTouchOutside(true);//允许点击空白处关闭
}
/**
* ui展示后再调整大小
*/
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if(hasFocus&&isDialogWindow){
ViewGroup.LayoutParams params = mRootLayout.getLayoutParams();
params.height= DpUtil.dp2px(500);
mRootLayout.setLayoutParams(params);
}
}
/**
* 数据的设置
@ -199,10 +152,6 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
titleView = findViewById(R.id.titleView);
imgMore = findViewById(R.id.img_more);
imBack = findViewById(R.id.btn_back);
mRootLayout = findViewById(R.id.root_layout);
//来个底部弹出的动画不然太突兀了
mRootLayout.startAnimation(AnimationUtils.loadAnimation(mContext,R.anim.bottomview_anim_enter));
imgMore.setOnClickListener(this);
imBack.setOnClickListener(this);