diff --git a/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java b/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java
index 87fccce94..5e7fecaa1 100644
--- a/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java
+++ b/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java
@@ -8,6 +8,7 @@ import android.os.Looper;
import android.util.Log;
import android.widget.Toast;
+import com.yunbao.common.BuildConfig;
import com.yunbao.common.bean.CrashSaveBean;
import com.yunbao.common.utils.FileUtil;
import com.yunbao.common.utils.SpUtil;
@@ -101,7 +102,9 @@ public class NeverCrashUtils {
Log.e(TAG, "未捕获的主线程异常行为", e);
}
e.printStackTrace();
- //Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
+ if(BuildConfig.DEBUG) {
+ Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
+ }
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
// return;
diff --git a/common/src/main/res/layout/live_anchor_call_me_edit_title.xml b/common/src/main/res/layout/live_anchor_call_me_edit_title.xml
new file mode 100644
index 000000000..964b43618
--- /dev/null
+++ b/common/src/main/res/layout/live_anchor_call_me_edit_title.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java
new file mode 100644
index 000000000..11d08543b
--- /dev/null
+++ b/live/src/main/java/com/yunbao/live/adapter/LiveAnchorEditCallMeAdapter.java
@@ -0,0 +1,262 @@
+package com.yunbao.live.adapter;
+
+import android.app.Dialog;
+import android.content.Context;
+import android.graphics.Color;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.bean.PrankGiftBean;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.http.base.HttpCallback;
+import com.yunbao.common.http.live.LiveNetManager;
+import com.yunbao.common.interfaces.OnItemClickListener;
+import com.yunbao.common.utils.DialogUitl;
+import com.yunbao.common.utils.StringUtil;
+import com.yunbao.common.utils.ToastUtil;
+import com.yunbao.live.R;
+import com.yunbao.live.dialog.GiftPopDialog;
+import com.yunbao.live.dialog.LiveAnchorEditCallMeEditAppDialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter {
+ public static final int TYPE_GIFT = 0;
+ public static final int TYPE_LETTER = 1;
+ public static final int TYPE_APP_WECHAT = 2;
+ public static final int TYPE_APP_LINE = 3;
+ public static final int TYPE_APP_WHATSAPP = 4;
+ private Context mContext;
+ private OnItemClickListener onItemClickListener;
+ private List list = new ArrayList<>();
+ private String mLiveUid = "98275";
+ private View mParent;
+
+ public LiveAnchorEditCallMeAdapter(Context mContext, View parent) {
+ this.mContext = mContext;
+ this.mParent = parent;
+ }
+
+ public void setList(List list) {
+ this.list = list;
+ notifyDataSetChanged();
+ }
+
+ public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
+ this.onItemClickListener = onItemClickListener;
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ return list.get(position).getType();
+ }
+
+ @NonNull
+ @Override
+ public BaseViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ BaseViewHolder holder;
+ switch (viewType) {
+ case TYPE_GIFT:
+ holder = new GiftViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_call_me_gift, parent, false));
+ break;
+ case TYPE_LETTER:
+ holder = new LetterViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_call_me_letter, parent, false));
+ break;
+ default:
+ holder = new AppViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_call_me_app, parent, false));
+ }
+ return holder;
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull BaseViewHolder holder, int position) {
+ holder.setData(list.get(position), position);
+ }
+
+ @Override
+ public int getItemCount() {
+ return list.size();
+ }
+
+ public static class TmpData {
+ private String value;
+ private int status;
+ private int type;
+
+ public TmpData() {
+ }
+
+ public TmpData(String value, int status, int type) {
+ this.value = value;
+ this.status = status;
+ this.type = type;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+ }
+
+ public class BaseViewHolder extends RecyclerView.ViewHolder {
+
+ public BaseViewHolder(@NonNull View itemView) {
+ super(itemView);
+ }
+
+ public void setData(TmpData data, int position) {
+
+ }
+ }
+
+ public class GiftViewHolder extends BaseViewHolder {
+
+ private View select;
+ private ImageView giftIcon;
+
+ public GiftViewHolder(@NonNull View itemView) {
+ super(itemView);
+ select = itemView.findViewById(R.id.select);
+ giftIcon = itemView.findViewById(R.id.gift_icon);
+ select.setOnClickListener(v -> {
+ initGiftData();
+ });
+ }
+
+ @Override
+ public void setData(TmpData data, int position) {
+ super.setData(data, position);
+ }
+
+
+ private void initGiftData() {
+ new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() {
+
+ @Override
+ public void onSelectGift(PrankGiftBean bean) {
+ if (bean != null) {
+ ImgLoader.display(mContext, bean.getIcon(), giftIcon);
+ }
+ }
+
+ @Override
+ public void onDismiss() {
+ }
+ })
+ .setShowNumber(false)
+ .setTitle("選擇禮物")
+ .showDialog()
+ ;
+ }
+ }
+
+
+ public class LetterViewHolder extends BaseViewHolder {
+ TextView letter;
+ View edit;
+
+ public LetterViewHolder(@NonNull View itemView) {
+ super(itemView);
+ letter = itemView.findViewById(R.id.letterText);
+ edit = itemView.findViewById(R.id.edit);
+ edit.setOnClickListener(v -> {
+ new LiveAnchorEditCallMeEditAppDialog(mContext, LiveAnchorEditCallMeEditAppDialog.TYPE_LETTER).setOnValueListener(new OnItemClickListener() {
+ @Override
+ public void onItemClick(String bean, int position) {
+ letter.setText(bean);
+ }
+ }).showDialog();
+ });
+ }
+
+ @Override
+ public void setData(TmpData data, int position) {
+ super.setData(data, position);
+ letter.setText(data.getValue());
+ }
+ }
+
+ public class AppViewHolder extends BaseViewHolder {
+ TextView contact;
+ View edit;
+ ImageView status;
+ ImageView icon;
+
+ public AppViewHolder(@NonNull View itemView) {
+ super(itemView);
+ contact = itemView.findViewById(R.id.contact);
+ edit = itemView.findViewById(R.id.app_edit);
+ status = itemView.findViewById(R.id.app_switch);
+ icon = itemView.findViewById(R.id.gift_icon);
+ itemView.setOnClickListener(v -> {
+ if (onItemClickListener != null) {
+ onItemClickListener.onItemClick(list.get(getAbsoluteAdapterPosition()), getAbsoluteAdapterPosition());
+ }
+ });
+ }
+
+ @Override
+ public void setData(TmpData data, int position) {
+ super.setData(data, position);
+ if (StringUtil.isEmpty(data.getValue())) {
+ contact.setText("未填写");
+ contact.setTextColor(Color.parseColor("#80FFFFFF"));
+ } else {
+ contact.setText(data.getValue());
+ contact.setTextColor(Color.WHITE);
+ }
+ if (data.getStatus() == 0) {
+ status.setImageResource(R.mipmap.special_icon_off);
+ } else if (data.getStatus() == 1) {
+ status.setImageResource(R.mipmap.special_icon_on);
+ }
+ edit.setOnClickListener(v -> {
+ new LiveAnchorEditCallMeEditAppDialog(mContext, data.getType()).setOnValueListener(new OnItemClickListener() {
+ @Override
+ public void onItemClick(String bean, int position) {
+ contact.setText(bean);
+ }
+ }).showDialog();
+ });
+ switch (data.getType()) {
+ case TYPE_APP_WECHAT:
+ icon.setImageResource(R.mipmap.icon_wechat_x);
+ break;
+ case TYPE_APP_LINE:
+ icon.setImageResource(R.mipmap.icon_line_x);
+ break;
+ case TYPE_APP_WHATSAPP:
+ icon.setImageResource(R.mipmap.icon_whatsapp_x);
+ break;
+ }
+ }
+
+ }
+}
diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java
index 0fcae4596..662e3dcda 100644
--- a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java
+++ b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java
@@ -17,8 +17,10 @@ import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
+import com.lxj.xpopup.XPopup;
import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.bean.PrankGiftBean;
+import com.yunbao.common.dialog.AbsDialogPopupWindow;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.StringUtil;
@@ -34,15 +36,14 @@ import com.yunbao.live.http.LiveHttpUtil;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;
-public class GiftPopDialog extends PopupWindow implements ActionListener, View.OnClickListener {
+public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListener, View.OnClickListener {
- private View mParent;
private Context mContext;
- private View mContentView;
private LiveGiftPagerAdapter mLiveGiftPagerAdapter;
private GiftPopDialog.ActionListener mActionListener;
private View mLoading;
@@ -60,16 +61,27 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
private int prangNum;
private InputMethodManager imm;
private List giftBeans;
+ private boolean showNumber = true;
+ private View numberView;
+ private String title;
+ private TextView mTitle;
- private void initView(View mRootView) {
- mLoading = mRootView.findViewById(R.id.loading);
- items = (RecyclerView) mRootView.findViewById(R.id.items);
- mViewPager = (ViewPager) mRootView.findViewById(R.id.viewPager);
- mRadioGroup = (RadioGroup) mRootView.findViewById(R.id.radio_group);
- mBtnSend = mRootView.findViewById(R.id.btn_send);
- mBtnContext = mRootView.findViewById(R.id.btn_context);
- mBtn = mRootView.findViewById(R.id.gift_btn);
- mBack = mRootView.findViewById(R.id.gift_back);
+
+ public GiftPopDialog(@NonNull Context context) {
+ super(context);
+ }
+
+ private void initView() {
+ mLoading = findViewById(R.id.loading);
+ items = (RecyclerView) findViewById(R.id.items);
+ mViewPager = (ViewPager) findViewById(R.id.viewPager);
+ mRadioGroup = (RadioGroup) findViewById(R.id.radio_group);
+ mBtnSend = findViewById(R.id.btn_send);
+ mBtnContext = findViewById(R.id.btn_context);
+ mBtn = findViewById(R.id.gift_btn);
+ mBack = findViewById(R.id.gift_back);
+ mTitle = findViewById(R.id.title);
+ numberView = findViewById(R.id.btn_send_group);
final LinearLayoutManager manager = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false);
items.setLayoutManager(manager);
mViewPager.setOffscreenPageLimit(5);
@@ -112,52 +124,41 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
}
});
+ if (!showNumber) {
+ numberView.setVisibility(View.GONE);
+ prangNum = 1;
+ prangContext = "null";
+ }
+ if (!StringUtil.isEmpty(title)) {
+ mTitle.setText(title);
+ }
}
- public GiftPopDialog(Context mContext, View parent, GiftPopDialog.ActionListener actionListener) {
+ public GiftPopDialog(Context mContext, GiftPopDialog.ActionListener actionListener) {
+ super(mContext);
this.mContext = mContext;
- mParent = parent;
mActionListener = actionListener;
- mContentView = LayoutInflater.from(mContext).inflate(R.layout.dialog_live_select_gift_wrap, null);
- ViewParent viewParent = mContentView.getParent();
- if (viewParent != null) {
- ((ViewGroup) viewParent).removeView(mContentView);
- }
- setContentView(mContentView);
- setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
- setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
- setBackgroundDrawable(new ColorDrawable());
- setOutsideTouchable(true);
- setFocusable(true);
- setAnimationStyle(R.style.leftToRightAnim);
- setOnDismissListener(new OnDismissListener() {
- @Override
- public void onDismiss() {
- if (mActionListener != null) {
- if (bean == null || StringUtil.isEmpty(prangContext) || prangNum == 0) {
- mActionListener.onDismiss();
- return;
- }
- PrankGiftBean giftBean = new PrankGiftBean();
- giftBean.setGiftId(bean.getId() + "");
- giftBean.setNum(prangNum);
- giftBean.setIcon(bean.getIcon());
- giftBean.setTitle(prangContext);
- giftBean.setName(bean.getName());
- mActionListener.onSelectGift(giftBean);
- System.out.println("gift.bean = " + bean);
- }
- ViewParent viewParent = mContentView.getParent();
- if (viewParent != null) {
- ((ViewGroup) viewParent).removeView(mContentView);
- }
- mContentView = null;
- }
- });
- initView(mContentView);
+ // setAnimationStyle(R.style.leftToRightAnim);
+
+ }
+
+ @Override
+ protected void onCreate() {
+ super.onCreate();
+ initView();
initDate();
}
+ public GiftPopDialog setShowNumber(boolean showNumber) {
+ this.showNumber = showNumber;
+ return this;
+ }
+
+ public GiftPopDialog setTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
private void initDate() {
LiveHttpUtil.getNewGiftList(new HttpCallback() {
@Override
@@ -214,10 +215,6 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
}
}
- public void show() {
- showAtLocation(mParent, Gravity.CENTER, 0, 0);
- }
-
@Override
public void onItemChecked(LiveGiftBean bean) {
@@ -233,11 +230,11 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
public void onConfirmClick(Dialog dialog, String content) {
try {
prangNum = Integer.parseInt(content);
- if (prangNum <= 0 ) {
+ if (prangNum <= 0) {
ToastUtil.show("數量不能為0或負數");
return;
}
- if(prangNum>999){
+ if (prangNum > 999) {
ToastUtil.show("數量不能大於999");
return;
}
@@ -298,6 +295,14 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
}
}
dismiss();
+
+ PrankGiftBean giftBean = new PrankGiftBean();
+ giftBean.setGiftId(bean.getId() + "");
+ giftBean.setNum(prangNum);
+ giftBean.setIcon(bean.getIcon());
+ giftBean.setTitle(prangContext);
+ giftBean.setName(bean.getName());
+ mActionListener.onSelectGift(giftBean);
} else if (id == R.id.gift_back) {
dismiss();
}
@@ -307,6 +312,16 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
this.giftBeans = giftBeans;
}
+ @Override
+ public void buildDialog(XPopup.Builder builder) {
+ builder.enableDrag(false);
+ }
+
+ @Override
+ public int bindLayoutId() {
+ return R.layout.dialog_live_select_gift_wrap;
+ }
+
public interface ActionListener {
void onSelectGift(PrankGiftBean bean);
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveAnchorEditCallMeDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveAnchorEditCallMeDialog.java
new file mode 100644
index 000000000..4d5d1c03f
--- /dev/null
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveAnchorEditCallMeDialog.java
@@ -0,0 +1,73 @@
+package com.yunbao.live.dialog;
+
+import android.app.Dialog;
+import android.content.Context;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.lxj.xpopup.XPopup;
+import com.yunbao.common.bean.PrankGiftBean;
+import com.yunbao.common.dialog.AbsDialogPopupWindow;
+import com.yunbao.common.http.base.HttpCallback;
+import com.yunbao.common.http.live.LiveNetManager;
+import com.yunbao.common.interfaces.OnItemClickListener;
+import com.yunbao.common.utils.DialogUitl;
+import com.yunbao.common.utils.ToastUtil;
+import com.yunbao.live.R;
+import com.yunbao.live.adapter.LiveAnchorEditCallMeAdapter;
+import com.yunbao.live.adapter.LivePrankRecyclerAdapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LiveAnchorEditCallMeDialog extends AbsDialogPopupWindow {
+ String mLiveUid = "98275";
+ RecyclerView list;
+ LiveAnchorEditCallMeAdapter adapter;
+
+ public LiveAnchorEditCallMeDialog(@NonNull Context context) {
+ super(context);
+ }
+
+ @Override
+ public void buildDialog(XPopup.Builder builder) {
+ builder.enableDrag(false);
+ builder.autoFocusEditText(false);
+ }
+
+ @Override
+ public int bindLayoutId() {
+ return R.layout.dialog_anchor_call_me;
+ }
+
+ @Override
+ protected void onCreate() {
+ super.onCreate();
+ initView();
+ initData();
+ }
+
+ private void initData() {
+ List data = new ArrayList<>();
+ data.add(new LiveAnchorEditCallMeAdapter.TmpData(null, 1, LiveAnchorEditCallMeAdapter.TYPE_GIFT));
+ data.add(new LiveAnchorEditCallMeAdapter.TmpData("测试测试", 1, LiveAnchorEditCallMeAdapter.TYPE_LETTER));
+ data.add(new LiveAnchorEditCallMeAdapter.TmpData("13333333333", 1, LiveAnchorEditCallMeAdapter.TYPE_APP_WECHAT));
+ data.add(new LiveAnchorEditCallMeAdapter.TmpData("13333333333", 0, LiveAnchorEditCallMeAdapter.TYPE_APP_LINE));
+ data.add(new LiveAnchorEditCallMeAdapter.TmpData(null, 0, LiveAnchorEditCallMeAdapter.TYPE_APP_WHATSAPP));
+ adapter.setList(data);
+ }
+
+ private void initView() {
+ list = findViewById(R.id.anchor_call_list);
+ adapter = new LiveAnchorEditCallMeAdapter(getContext(),getRootView());
+
+ list.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
+ list.setAdapter(adapter);
+
+ }
+
+
+}
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveAnchorEditCallMeEditAppDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveAnchorEditCallMeEditAppDialog.java
new file mode 100644
index 000000000..4c9c6b83a
--- /dev/null
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveAnchorEditCallMeEditAppDialog.java
@@ -0,0 +1,107 @@
+package com.yunbao.live.dialog;
+
+import android.content.Context;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+import com.lxj.xpopup.XPopup;
+import com.yunbao.common.dialog.AbsDialogPopupWindow;
+import com.yunbao.common.interfaces.OnItemClickListener;
+import com.yunbao.common.utils.StringUtil;
+import com.yunbao.live.R;
+
+public class LiveAnchorEditCallMeEditAppDialog extends AbsDialogPopupWindow {
+ public static final int TYPE_LETTER = 0;
+ public static final int TYPE_APP_WECHAT = 2;
+ public static final int TYPE_APP_LINE = 3;
+ public static final int TYPE_APP_WHATSAPP = 4;
+ OnItemClickListener clickListener;
+ private int type;
+ private String defValue;
+
+ private TextView titleView;
+ private TextView title;
+ private EditText edit;
+
+ public LiveAnchorEditCallMeEditAppDialog(@NonNull Context context) {
+ super(context);
+ this.type = TYPE_LETTER;
+ }
+
+ public LiveAnchorEditCallMeEditAppDialog(@NonNull Context context, int type) {
+ super(context);
+ this.type = type;
+ }
+
+ @Override
+ public void buildDialog(XPopup.Builder builder) {
+ builder.autoFocusEditText(false);
+ builder.moveUpToKeyboard(false);
+ builder.enableDrag(false);
+ }
+
+ @Override
+ public int bindLayoutId() {
+ return R.layout.dialog_anchor_call_edit_app;
+ }
+
+ public void setDefValue(String defValue) {
+ this.defValue = defValue;
+ }
+
+ public LiveAnchorEditCallMeEditAppDialog setOnValueListener(OnItemClickListener clickListener) {
+ this.clickListener = clickListener;
+ return this;
+ }
+
+ @Override
+ protected void onCreate() {
+ super.onCreate();
+ initView();
+ initData();
+
+ switch (type) {
+ case TYPE_LETTER:
+ titleView.setText("填寫信內容");
+ edit.setHint("我能想到最浪漫的事,就是和你一起慢慢變老,一路上收藏點點滴滴的歡笑,留到以後坐著搖椅慢慢聊。");
+ title.setText("信內容");
+ break;
+ case TYPE_APP_WECHAT:
+ titleView.setText("填寫聯系方式");
+ edit.setHint("请输入");
+ title.setText("Wechat账号");
+ break;
+ case TYPE_APP_LINE:
+ titleView.setText("填寫聯系方式");
+ edit.setHint("请输入");
+ title.setText("Line账号");
+ break;
+ case TYPE_APP_WHATSAPP:
+ titleView.setText("填寫聯系方式");
+ edit.setHint("请输入");
+ title.setText("WhatsApp账号");
+ break;
+ }
+ }
+
+ private void initData() {
+ if (!StringUtil.isEmpty(defValue)) {
+ edit.setText(defValue);
+ }
+ }
+
+ void initView() {
+ titleView = findViewById(R.id.titleView);
+ title = findViewById(R.id.title);
+ edit = findViewById(R.id.edit);
+ findViewById(R.id.btn_back).setOnClickListener(v -> dismiss());
+ findViewById(R.id.submit).setOnClickListener(v -> {
+ clickListener.onItemClick(edit.getText().toString(), 0);
+ dismiss();
+ });
+ }
+}
diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java
index 110932759..a5e0d1cf2 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java
@@ -141,7 +141,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
ToastUtil.show("可添加禮物數量達到上限");
return;
}
- GiftPopDialog dialog = new GiftPopDialog(mContext, mRootView, new GiftPopDialog.ActionListener() {
+ GiftPopDialog dialog = new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() {
@Override
public void onSelectGift(PrankGiftBean bean) {
@@ -156,7 +156,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
});
dialog.setList(giftBeans);
- dialog.show();
+ dialog.showDialog();
} else {
setPrankConfig();
}
diff --git a/main/src/main/res/drawable/background_33ffffff.xml b/live/src/main/res/drawable/background_33ffffff.xml
similarity index 100%
rename from main/src/main/res/drawable/background_33ffffff.xml
rename to live/src/main/res/drawable/background_33ffffff.xml
diff --git a/live/src/main/res/drawable/bg_live_ready_btn2.xml b/live/src/main/res/drawable/bg_live_ready_btn2.xml
new file mode 100644
index 000000000..f7cda2e72
--- /dev/null
+++ b/live/src/main/res/drawable/bg_live_ready_btn2.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/dialog_anchor_call_edit_app.xml b/live/src/main/res/layout/dialog_anchor_call_edit_app.xml
new file mode 100644
index 000000000..a398e27b8
--- /dev/null
+++ b/live/src/main/res/layout/dialog_anchor_call_edit_app.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/dialog_anchor_call_me.xml b/live/src/main/res/layout/dialog_anchor_call_me.xml
new file mode 100644
index 000000000..776d99b92
--- /dev/null
+++ b/live/src/main/res/layout/dialog_anchor_call_me.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/dialog_anchor_say.xml b/live/src/main/res/layout/dialog_anchor_say.xml
index d36bfaa68..456430ce4 100644
--- a/live/src/main/res/layout/dialog_anchor_say.xml
+++ b/live/src/main/res/layout/dialog_anchor_say.xml
@@ -74,9 +74,9 @@
android:autofillHints=""
android:background="@drawable/bg_item_random_pk_type_1"
android:ems="10"
- android:hint="请輸入女神想說的話,限12個字哦。"
+ android:hint="请輸入女神想說的話,限16個字哦。"
android:inputType="textPersonName"
- android:maxLength="12"
+ android:maxLength="16"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColorHint="#80FFFFFF"
diff --git a/live/src/main/res/layout/dialog_live_select_gift_wrap.xml b/live/src/main/res/layout/dialog_live_select_gift_wrap.xml
index 347248502..073e6fb74 100644
--- a/live/src/main/res/layout/dialog_live_select_gift_wrap.xml
+++ b/live/src/main/res/layout/dialog_live_select_gift_wrap.xml
@@ -40,6 +40,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/item_anchor_call_me_gift.xml b/live/src/main/res/layout/item_anchor_call_me_gift.xml
new file mode 100644
index 000000000..8c095df32
--- /dev/null
+++ b/live/src/main/res/layout/item_anchor_call_me_gift.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/item_anchor_call_me_letter.xml b/live/src/main/res/layout/item_anchor_call_me_letter.xml
new file mode 100644
index 000000000..c853b288f
--- /dev/null
+++ b/live/src/main/res/layout/item_anchor_call_me_letter.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/mipmap-mdpi/icon_line_x.png b/live/src/main/res/mipmap-mdpi/icon_line_x.png
new file mode 100644
index 000000000..7035688f2
Binary files /dev/null and b/live/src/main/res/mipmap-mdpi/icon_line_x.png differ
diff --git a/live/src/main/res/mipmap-mdpi/icon_wechat_x.png b/live/src/main/res/mipmap-mdpi/icon_wechat_x.png
new file mode 100644
index 000000000..37b173f6e
Binary files /dev/null and b/live/src/main/res/mipmap-mdpi/icon_wechat_x.png differ
diff --git a/live/src/main/res/mipmap-mdpi/icon_whatsapp_x.png b/live/src/main/res/mipmap-mdpi/icon_whatsapp_x.png
new file mode 100644
index 000000000..637abb8e1
Binary files /dev/null and b/live/src/main/res/mipmap-mdpi/icon_whatsapp_x.png differ
diff --git a/live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_edit.png b/live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_edit.png
new file mode 100644
index 000000000..1ca6c0602
Binary files /dev/null and b/live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_edit.png differ
diff --git a/live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_r.png b/live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_r.png
new file mode 100644
index 000000000..0b19fe32f
Binary files /dev/null and b/live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_r.png differ
diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java
index a41f106e5..9ff5eb264 100644
--- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java
+++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java
@@ -1,19 +1,14 @@
package com.yunbao.main.views;
import android.content.Context;
-import android.content.Intent;
-import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.WordUtil;
-import com.yunbao.live.dialog.LiveAnchorSayPopDialog;
-import com.yunbao.live.dialog.LiveRobotSettingDialogFragment;
+import com.yunbao.live.dialog.LiveAnchorEditCallMeDialog;
import com.yunbao.main.R;
-import com.yunbao.main.activity.MainActivity;
-import com.yunbao.main.activity.TestActivity;
/**
* Created by cxf on 2018/9/22.
@@ -45,7 +40,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
img_trophy.setOnLongClickListener(v -> {
- new LiveAnchorSayPopDialog(mContext).showDialog();
+ new LiveAnchorEditCallMeDialog(mContext).showDialog();
return false;
});