私聊改造:bugfix
This commit is contained in:
@@ -347,9 +347,9 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
public int getPanelTriggerId() {
|
||||
return R.id.emoji_button;
|
||||
}
|
||||
}).logTrack(false)//output log
|
||||
})
|
||||
.logTrack(false)//output log
|
||||
.build();
|
||||
|
||||
messageListView.setPanelSwitchHelper(mHelper);
|
||||
}
|
||||
|
||||
@@ -859,6 +859,10 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
|
||||
|
||||
@Override
|
||||
public void onRecordSuccess(File audioFile, long audioLength, RecordType recordType) {
|
||||
if (audioLength < 1000) {
|
||||
SingleToastUtil.showToast("说话时间太短!");
|
||||
return;
|
||||
}
|
||||
IMMessage audioMessage = MessageBuilder.createAudioMessage(container.account, container.sessionType, audioFile, audioLength);
|
||||
container.proxy.sendMessage(audioMessage);
|
||||
}
|
||||
|
@@ -1056,7 +1056,9 @@ public class MessageListPanelEx {
|
||||
|
||||
private boolean enableRevokeButton(IMMessage selectedItem) {
|
||||
return selectedItem.getStatus() == MsgStatusEnum.success
|
||||
&& selectedItem.getMsgType() == MsgTypeEnum.text
|
||||
&& (selectedItem.getMsgType() == MsgTypeEnum.text ||
|
||||
selectedItem.getMsgType() == MsgTypeEnum.audio ||
|
||||
selectedItem.getMsgType() == MsgTypeEnum.image)
|
||||
&& !recordOnly
|
||||
&& selectedItem.getDirect() == MsgDirectionEnum.Out
|
||||
&& CurrentTimeUtils.getCurrentTime() - selectedItem.getTime() < 2 * 60 * 1000;
|
||||
|
@@ -49,6 +49,7 @@ public class AddBlackListActivity extends BaseMvpActivity<IAddBlackListView, Add
|
||||
private ImageView ivHeadWear;
|
||||
private IOSSwitchView switchTop;
|
||||
private IOSSwitchView switchAddBlack;
|
||||
private TextView tvId;
|
||||
|
||||
public static void start(Context context, String contactId) {
|
||||
Intent intent = new Intent();
|
||||
@@ -113,6 +114,7 @@ public class AddBlackListActivity extends BaseMvpActivity<IAddBlackListView, Add
|
||||
switchTop = findViewById(R.id.switch_top);
|
||||
switchAddBlack = findViewById(R.id.switch_add_black);
|
||||
ivHeadWear = findViewById(R.id.iv_head_wear);
|
||||
tvId = findViewById(R.id.tv_id);
|
||||
}
|
||||
|
||||
void changeText(boolean contains) {
|
||||
@@ -122,7 +124,7 @@ public class AddBlackListActivity extends BaseMvpActivity<IAddBlackListView, Add
|
||||
/**
|
||||
* 初始化目标的信息
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
@SuppressLint({"CheckResult", "SetTextI18n"})
|
||||
private void initTarget() {
|
||||
UserModel.get()
|
||||
.getUserInfo(Long.parseLong(account))
|
||||
@@ -131,6 +133,7 @@ public class AddBlackListActivity extends BaseMvpActivity<IAddBlackListView, Add
|
||||
ImageLoadUtils.loadAvatar(AddBlackListActivity.this, userInfo.getAvatar(), ivAvatar, true);
|
||||
// 名字
|
||||
tvName.setText(RegexUtil.getPrintableString(userInfo.getNick()));
|
||||
tvId.setText("ID:" + userInfo.getErbanNo());
|
||||
HeadWearInfo headWearInfo = userInfo.getUserHeadwear();
|
||||
if (headWearInfo != null && !TextUtils.isEmpty(headWearInfo.getPic())) {
|
||||
NobleUtil.loadHeadWear(
|
||||
|
@@ -68,9 +68,9 @@
|
||||
android:layout_below="@id/tv_name"
|
||||
android:layout_alignStart="@id/tv_name"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="ID:953842"
|
||||
android:textColor="#ffbabbcd"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
tools:text="ID:953842" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -25,5 +25,5 @@ only_arm64=false
|
||||
|
||||
channel_file=channel.txt
|
||||
|
||||
version_name=5.6.0.3
|
||||
version_code=560
|
||||
version_name=5.9.0.3
|
||||
version_code=590
|
@@ -97,6 +97,7 @@ dependencies {
|
||||
|
||||
api 'com.github.DSAppTeam:PanelSwitchHelper:v1.5.2'
|
||||
|
||||
api 'io.github.razerdp:BasePopup:3.2.1'
|
||||
|
||||
}
|
||||
repositories {
|
||||
|
BIN
nim_uikit/res/drawable-xhdpi/nim_bottom_arrow.png
Normal file
BIN
nim_uikit/res/drawable-xhdpi/nim_bottom_arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 506 B |
@@ -1,10 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/nim_shape_767676_8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/nim_bottom_arrow" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,17 +1,11 @@
|
||||
package com.netease.nim.uikit.common.ui.dialog;
|
||||
|
||||
import static android.widget.LinearLayout.SHOW_DIVIDER_BEGINNING;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.util.Pair;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.netease.nim.uikit.R;
|
||||
@@ -20,8 +14,10 @@ import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import razerdp.basepopup.BasePopupWindow;
|
||||
|
||||
public class CustomPopupWindow extends PopupWindow {
|
||||
|
||||
public class CustomPopupWindow extends BasePopupWindow {
|
||||
|
||||
private final Context context;
|
||||
private final LinearLayout llRoot;
|
||||
@@ -29,15 +25,17 @@ public class CustomPopupWindow extends PopupWindow {
|
||||
private int orientation;
|
||||
|
||||
public CustomPopupWindow(Context context, int orientation) {
|
||||
super(context);
|
||||
this.context = context;
|
||||
this.orientation = orientation;
|
||||
llRoot = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.nim_custom_popup_window, null);
|
||||
setContentView(llRoot);
|
||||
llRoot.setShowDividers(SHOW_DIVIDER_BEGINNING);
|
||||
|
||||
setContentView(createPopupById(R.layout.nim_custom_popup_window));
|
||||
llRoot = findViewById(R.id.ll_root);
|
||||
llRoot.setOrientation(orientation);
|
||||
setBackgroundDrawable(new ColorDrawable());
|
||||
setOutsideTouchable(true);
|
||||
setFocusable(true);
|
||||
setOutSideDismiss(true);
|
||||
setBackgroundColor(Color.TRANSPARENT);
|
||||
hideKeyboardOnShow(false);
|
||||
setPopupAnimationStyle(-1);
|
||||
}
|
||||
|
||||
public void addItem(String itemText, View.OnClickListener listener) {
|
||||
@@ -51,9 +49,8 @@ public class CustomPopupWindow extends PopupWindow {
|
||||
new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, ScreenUtil.dip2px(30))
|
||||
);
|
||||
}
|
||||
setHeight(ScreenUtil.dip2px(30 * (orientation == LinearLayout.HORIZONTAL ? 1 : itemTextList.size())));
|
||||
setWidth(WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
showAsDropDown(anchor, xoff, yoff);
|
||||
setPopupGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
|
||||
showPopupWindow(anchor);
|
||||
}
|
||||
|
||||
private TextView createTextView(CharSequence text, View.OnClickListener listener) {
|
||||
|
Reference in New Issue
Block a user