|
@@ -1,5 +1,6 @@
|
|
|
package com.jixin.im.view;
|
|
|
|
|
|
+import android.app.Dialog;
|
|
|
import android.content.Context;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.AttributeSet;
|
|
@@ -144,38 +145,41 @@ public class ChatToolsView extends RelativeLayout {
|
|
|
listener.clickCamera();
|
|
|
}),
|
|
|
// 现拍照录像ui和二为一
|
|
|
-/*
|
|
|
- new Item(R.drawable.im_tool_local_button_bg, R.string.video, () -> {
|
|
|
- Dialog bottomDialog = new Dialog(getContext(), R.style.BottomDialog);
|
|
|
- View contentView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_select_video, null);
|
|
|
- bottomDialog.setContentView(contentView);
|
|
|
- ViewGroup.LayoutParams layoutParams = contentView.getLayoutParams();
|
|
|
- layoutParams.width = getResources().getDisplayMetrics().widthPixels;
|
|
|
- contentView.setLayoutParams(layoutParams);
|
|
|
- bottomDialog.getWindow().setGravity(Gravity.BOTTOM);
|
|
|
- bottomDialog.getWindow().setWindowAnimations(R.style.BottomDialog_Animation);
|
|
|
- bottomDialog.show();
|
|
|
- contentView.findViewById(R.id.dialog_select_cancel).setOnClickListener(v -> bottomDialog.dismiss());
|
|
|
- contentView.findViewById(R.id.dialog_select_local_video).setOnClickListener(v -> {
|
|
|
- bottomDialog.dismiss();
|
|
|
- listener.clickLocalVideo();
|
|
|
- });
|
|
|
- contentView.findViewById(R.id.dialog_select_start_record).setOnClickListener(v -> {
|
|
|
- bottomDialog.dismiss();
|
|
|
- listener.clickStartRecord();
|
|
|
- });
|
|
|
- }),
|
|
|
-*/
|
|
|
|
|
|
-// new Item(R.drawable.im_tool_local_button_bg, R.string.chat_loc, () -> {
|
|
|
-// listener.clickLocation();
|
|
|
+// new Item(R.drawable.im_tool_local_button_bg, R.string.video, () -> {
|
|
|
+// Dialog bottomDialog = new Dialog(getContext(), R.style.BottomDialog);
|
|
|
+// View contentView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_select_video, null);
|
|
|
+// bottomDialog.setContentView(contentView);
|
|
|
+// ViewGroup.LayoutParams layoutParams = contentView.getLayoutParams();
|
|
|
+// layoutParams.width = getResources().getDisplayMetrics().widthPixels;
|
|
|
+// contentView.setLayoutParams(layoutParams);
|
|
|
+// bottomDialog.getWindow().setGravity(Gravity.BOTTOM);
|
|
|
+// bottomDialog.getWindow().setWindowAnimations(R.style.BottomDialog_Animation);
|
|
|
+// bottomDialog.show();
|
|
|
+// contentView.findViewById(R.id.dialog_select_cancel).setOnClickListener(v -> bottomDialog.dismiss());
|
|
|
+// contentView.findViewById(R.id.dialog_select_local_video).setOnClickListener(v -> {
|
|
|
+// bottomDialog.dismiss();
|
|
|
+// listener.clickLocalVideo();
|
|
|
+// });
|
|
|
+// contentView.findViewById(R.id.dialog_select_start_record).setOnClickListener(v -> {
|
|
|
+// bottomDialog.dismiss();
|
|
|
+// listener.clickStartRecord();
|
|
|
+// });
|
|
|
// }),
|
|
|
+
|
|
|
+
|
|
|
+ //定位
|
|
|
+ new Item(R.drawable.im_tool_local_button_bg, R.string.chat_loc, () -> {
|
|
|
+ listener.clickLocation();
|
|
|
+ }),
|
|
|
// new Item(R.drawable.im_tool_transfer_button_bg, R.string.transfer_money, () -> {
|
|
|
// listener.clickTransferMoney();
|
|
|
// }),
|
|
|
+ //收藏
|
|
|
// new Item(R.drawable.im_tool_collection_button_bg, R.string.chat_collection, () -> {
|
|
|
// listener.clickCollection();
|
|
|
// }),
|
|
|
+ //名片
|
|
|
// new Item(R.drawable.im_tool_card_button_bg, R.string.chat_card, () -> {
|
|
|
// listener.clickCard();
|
|
|
// }),
|
|
@@ -281,8 +285,9 @@ public class ChatToolsView extends RelativeLayout {
|
|
|
});
|
|
|
// 这里面notify了,
|
|
|
gridPagerAdapter.removeAll(
|
|
|
- R.drawable.im_tool_transfer_button_bg,
|
|
|
- R.drawable.im_tool_video_button_bg
|
|
|
+ R.drawable.im_tool_transfer_button_bg
|
|
|
+
|
|
|
+// R.drawable.im_tool_video_button_bg
|
|
|
// , R.drawable.im_tool_shake_button_bg
|
|
|
);
|
|
|
|