修改 测试问题
This commit is contained in:
@@ -399,6 +399,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
public void onSuccess(CoolConfig data) {
|
||||
new XPopup.Builder(mContext)
|
||||
.enableDrag(false)
|
||||
.autoOpenSoftInput(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||
.asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() {
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -29,10 +30,12 @@ import com.yunbao.common.bean.ImUserInfoModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
@@ -41,8 +44,6 @@ import com.yunbao.live.activity.SystemMessageActivity;
|
||||
import com.yunbao.live.bean.ImUserBean;
|
||||
import com.yunbao.live.event.RecommendLiveRoomEvent;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
import com.yunbao.main.adapter.SystemMessageAdapter;
|
||||
@@ -229,7 +230,15 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
textNewsNotice.setVisibility(View.GONE);
|
||||
} else {
|
||||
textNewsNotice.setVisibility(View.VISIBLE);
|
||||
textNewsNotice.setText(userBean.getNum());
|
||||
int numberInt = Integer.parseInt(userBean.getNum());
|
||||
if (numberInt > 99) {
|
||||
textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textNewsNotice.setText("99+");
|
||||
} else {
|
||||
textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textNewsNotice.setText(String.valueOf(numberInt));
|
||||
}
|
||||
|
||||
}
|
||||
ImgLoader.display(mContext, userBean.getNewImage(), imgNewsNotice);
|
||||
ViewClicksAntiShake.clicksAntiShake(imgNewsNotice, () -> {
|
||||
@@ -249,7 +258,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
textNewsInteraction.setVisibility(View.GONE);
|
||||
} else {
|
||||
textNewsInteraction.setVisibility(View.VISIBLE);
|
||||
textNewsInteraction.setText(userBean.getNum());
|
||||
int numberInt = Integer.parseInt(userBean.getNum());
|
||||
if (numberInt > 99) {
|
||||
textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textNewsInteraction.setText("99+");
|
||||
} else {
|
||||
textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textNewsInteraction.setText(String.valueOf(numberInt));
|
||||
}
|
||||
}
|
||||
ImgLoader.display(mContext, userBean.getNewImage(), imgNewsInteraction);
|
||||
ViewClicksAntiShake.clicksAntiShake(imgNewsInteraction, () -> {
|
||||
@@ -269,7 +285,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
textNewsOnline.setVisibility(View.GONE);
|
||||
} else {
|
||||
textNewsOnline.setVisibility(View.VISIBLE);
|
||||
textNewsOnline.setText(userBean.getNum());
|
||||
int numberInt = Integer.parseInt(userBean.getNum());
|
||||
if (numberInt > 99) {
|
||||
textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textNewsOnline.setText("99+");
|
||||
} else {
|
||||
textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textNewsOnline.setText(String.valueOf(numberInt));
|
||||
}
|
||||
}
|
||||
ImgLoader.display(mContext, userBean.getNewImage(), imgNewsOnline);
|
||||
ViewClicksAntiShake.clicksAntiShake(imgNewsOnline, () -> {
|
||||
@@ -278,7 +301,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
netHandler.post(systemNumberRunnable);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service");
|
||||
if (userBean.getLink() != null && !"".equals(userBean.getLink())) {
|
||||
// WebViewActivity.forward(mContext, userBean.getLink());
|
||||
// WebViewActivity.forward(mContext, userBean.getLink());
|
||||
RouteUtil.forwardCustomerService(userBean.getLink());
|
||||
} else {
|
||||
mContext.startActivity(new Intent(mContext, SystemMessageActivity.class)
|
||||
@@ -295,7 +318,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
textSystemMessages.setVisibility(View.GONE);
|
||||
} else {
|
||||
textSystemMessages.setVisibility(View.VISIBLE);
|
||||
textSystemMessages.setText(userBean.getNum());
|
||||
int numberInt = Integer.parseInt(userBean.getNum());
|
||||
if (numberInt > 99) {
|
||||
textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textSystemMessages.setText("99+");
|
||||
} else {
|
||||
textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textSystemMessages.setText(String.valueOf(numberInt));
|
||||
}
|
||||
}
|
||||
ImgLoader.display(mContext, userBean.getNewImage(), imgSystemMessages);
|
||||
ViewClicksAntiShake.clicksAntiShake(imgSystemMessages, () -> {
|
||||
@@ -402,9 +432,16 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
textNewsNotice.setText("");
|
||||
} else {
|
||||
String number = textNewsNotice.getText().toString().trim();
|
||||
int numberInt = Integer.parseInt(number) + 1;
|
||||
textNewsNotice.setVisibility(View.VISIBLE);
|
||||
textNewsNotice.setText(String.valueOf(numberInt));
|
||||
int numberInt = Integer.parseInt(number) + 1;
|
||||
if (numberInt > 99) {
|
||||
textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textNewsNotice.setText("99+");
|
||||
} else {
|
||||
textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textNewsNotice.setText(String.valueOf(numberInt));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -417,7 +454,13 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
String number = textNewsInteraction.getText().toString().trim();
|
||||
int numberInt = Integer.parseInt(number) + 1;
|
||||
textNewsInteraction.setVisibility(View.VISIBLE);
|
||||
textNewsInteraction.setText(String.valueOf(numberInt));
|
||||
if (numberInt > 99) {
|
||||
textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textNewsInteraction.setText("99+");
|
||||
} else {
|
||||
textNewsInteraction.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textNewsInteraction.setText(String.valueOf(numberInt));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -431,7 +474,13 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
String number = textNewsOnline.getText().toString().trim();
|
||||
int numberInt = Integer.parseInt(number) + 1;
|
||||
textNewsOnline.setVisibility(View.VISIBLE);
|
||||
textNewsOnline.setText(String.valueOf(numberInt));
|
||||
if (numberInt > 99) {
|
||||
textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textNewsOnline.setText("99+");
|
||||
} else {
|
||||
textNewsOnline.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textNewsOnline.setText(String.valueOf(numberInt));
|
||||
}
|
||||
}
|
||||
break; //在線客服
|
||||
case "4":
|
||||
@@ -442,7 +491,13 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
String number = textSystemMessages.getText().toString().trim();
|
||||
int numberInt = Integer.parseInt(number) + 1;
|
||||
textSystemMessages.setVisibility(View.VISIBLE);
|
||||
textSystemMessages.setText(String.valueOf(numberInt));
|
||||
if (numberInt > 99) {
|
||||
textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
|
||||
textSystemMessages.setText("99+");
|
||||
} else {
|
||||
textSystemMessages.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
textSystemMessages.setText(String.valueOf(numberInt));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_news_notice"
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
@@ -81,8 +81,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_system_messages"
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
@@ -108,8 +108,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_news_interaction"
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
@@ -135,8 +135,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_news_online"
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
|
||||
Reference in New Issue
Block a user