1.房间活动接口更改
2.开箱子去掉黑色蒙层
This commit is contained in:
@@ -68,6 +68,7 @@ import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LogoutEvent;
|
||||
import com.yizhuan.xchat_android_core.bean.BaseProtocol;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.im.game.ImGameMode;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
@@ -811,7 +812,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
|
||||
|
||||
|
||||
@Override
|
||||
public void onGetActionDialog(List<ActionDialogInfo> dialogInfo) {
|
||||
public void onGetActionDialog(List<BannerInfo> dialogInfo) {
|
||||
if (mCurrentFragment != null && mCurrentFragment.isVisible()) {
|
||||
mCurrentFragment.onShowActivity(dialogInfo);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.yizhuan.erban.avroom.fragment;
|
||||
|
||||
import com.yizhuan.erban.base.BaseFragment;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,7 +14,7 @@ import java.util.List;
|
||||
public abstract class AbsRoomFragment extends BaseFragment {
|
||||
|
||||
|
||||
public abstract void onShowActivity(List<ActionDialogInfo> dialogInfo);
|
||||
public abstract void onShowActivity(List<BannerInfo> dialogInfo);
|
||||
|
||||
|
||||
public void onRoomOnlineNumberSuccess(int onlineNumber) {
|
||||
|
@@ -62,6 +62,7 @@ import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftMultiReceiverInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiveInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.MultiGiftReceiveInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomInfoAttachment;
|
||||
@@ -816,7 +817,7 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowActivity(List<ActionDialogInfo> dialogInfos) {
|
||||
public void onShowActivity(List<BannerInfo> dialogInfos) {
|
||||
if (roomFragment != null && roomFragment.isAdded()) {
|
||||
roomFragment.showActivity(dialogInfos);
|
||||
}
|
||||
|
@@ -116,6 +116,7 @@ import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.gift.GiftModel;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftMultiReceiverInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.ImGameAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.JoinMiniWorldAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomFollowOwnerAttachment;
|
||||
@@ -1006,91 +1007,16 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 左上角的活动,比较特殊,并且能触发暴走倒计时
|
||||
*/
|
||||
private List<ActionDialogInfo> specialActivities = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 显示活动图标
|
||||
*/
|
||||
public void showActivity(List<ActionDialogInfo> dialogInfo) {
|
||||
List<ActionDialogInfo> normalActivities = new ArrayList<>();
|
||||
if (dialogInfo == null) {
|
||||
dialogInfo = new ArrayList<>();
|
||||
}
|
||||
for (ActionDialogInfo info : dialogInfo) {
|
||||
if (info.getEntrancePosition() == 2) {
|
||||
specialActivities.add(info);
|
||||
} else {
|
||||
normalActivities.add(info);
|
||||
}
|
||||
}
|
||||
if (AvRoomDataManager.get().isCpRoom()) {
|
||||
initRoomAct(gameBinding.activityImgLeftCp, specialActivities, 11f);
|
||||
} else {
|
||||
initRoomAct(gameBinding.activityImgLeft, specialActivities, 11f);
|
||||
}
|
||||
|
||||
initRoomAct(gameBinding.activityImg, normalActivities, 11f);
|
||||
public void showActivity(List<BannerInfo> dialogInfo) {
|
||||
initRoomAct(gameBinding.activityImg, dialogInfo, 11f);
|
||||
setActTimerVisibility(View.GONE);
|
||||
|
||||
AvRoomModel.get().getRoomActTimer(AvRoomDataManager.get().getRoomUid())
|
||||
.compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW))
|
||||
.subscribe();
|
||||
|
||||
// gameBinding.activityImg.setVisibility(View.INVISIBLE);
|
||||
// mActionDialogInfoList = dialogInfo;
|
||||
// if (!ListUtils.isListEmpty(dialogInfo) && !MarketVerifyModel.get().isMarketChecking()) {
|
||||
// if (!isKtvMode && !isGameMode) {
|
||||
// gameBinding.activityImg.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
//
|
||||
// // 只有一个图标,隐藏底部指示器
|
||||
// boolean show = dialogInfo.size() > 1;
|
||||
// gameBinding.activityImg.setHintView(new ColorPointHintView(mContext, Color.WHITE, mContext.getResources().getColor(R.color.color_66FFFFFF)) {
|
||||
// @Override
|
||||
// public Drawable makeFocusDrawable() {
|
||||
// GradientDrawable dotFocus = new GradientDrawable();
|
||||
// dotFocus.setColor(Color.WHITE);
|
||||
// dotFocus.setCornerRadius(Util.dip2px(getContext(), 2));
|
||||
// dotFocus.setSize(Util.dip2px(getContext(), 9), Util.dip2px(getContext(), 4));
|
||||
// return show ? dotFocus : null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Drawable makeNormalDrawable() {
|
||||
// GradientDrawable dotNormal = new GradientDrawable();
|
||||
// dotNormal.setColor(mContext.getResources().getColor(R.color.color_66FFFFFF));
|
||||
// dotNormal.setCornerRadius(Util.dip2px(getContext(), 2));
|
||||
// dotNormal.setSize(Util.dip2px(getContext(), 4), Util.dip2px(getContext(), 4));
|
||||
// return show ? dotNormal : null;
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// RoomActAdapter bannerAdapter = new RoomActAdapter(mContext, dialogInfo);
|
||||
// gameBinding.activityImg.setAdapter(bannerAdapter);
|
||||
// gameBinding.activityImg.setPlayDelay(3000);
|
||||
// //设置透明度
|
||||
// gameBinding.activityImg.setAnimationDurtion(500);
|
||||
// bannerAdapter.notifyDataSetChanged();
|
||||
//
|
||||
// bannerAdapter.setRoomActClickListener(new RoomActAdapter.RoomActClickListener() {
|
||||
// @Override
|
||||
// public void onWebClick(String url) {
|
||||
// DialogWebFragment.newInstance(url).show(getFragmentManager());
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // 模拟指示器在viewpager底部效果
|
||||
// ViewPager viewPager = gameBinding.activityImg.getViewPager();
|
||||
// viewPager.setOffscreenPageLimit(dialogInfo.size());
|
||||
// RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) viewPager.getLayoutParams();
|
||||
// layoutParams.setMargins(0, 0, 0, 30);
|
||||
// viewPager.setLayoutParams(layoutParams);
|
||||
// } else {
|
||||
// gameBinding.activityImg.setVisibility(View.INVISIBLE);
|
||||
// }
|
||||
}
|
||||
|
||||
private void setActTimerVisibility(int visibility) {
|
||||
@@ -1098,7 +1024,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
gameBinding.activityTimerCp.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void initRoomAct(RollPagerView rollPagerView, List<ActionDialogInfo> dialogInfo, float bottomDp) {
|
||||
public void initRoomAct(RollPagerView rollPagerView, List<BannerInfo> dialogInfo, float bottomDp) {
|
||||
rollPagerView.setVisibility(View.INVISIBLE);
|
||||
if (!ListUtils.isListEmpty(dialogInfo) && !MarketVerifyModel.get().isMarketChecking()) {
|
||||
if (!isKtvMode && !isGameMode) {
|
||||
@@ -1133,12 +1059,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
rollPagerView.setAnimationDurtion(500);
|
||||
bannerAdapter.notifyDataSetChanged();
|
||||
|
||||
bannerAdapter.setRoomActClickListener(new RoomActAdapter.RoomActClickListener() {
|
||||
@Override
|
||||
public void onWebClick(String url) {
|
||||
DialogWebFragment.newInstance(url).show(getFragmentManager());
|
||||
}
|
||||
});
|
||||
bannerAdapter.setRoomActClickListener(url -> DialogWebFragment.newInstance(url).show(getFragmentManager()));
|
||||
|
||||
// 模拟指示器在viewpager底部效果
|
||||
ViewPager viewPager = rollPagerView.getViewPager();
|
||||
@@ -3167,13 +3088,13 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
if (timerBean == null) {
|
||||
return;
|
||||
}
|
||||
if (!ListUtils.isListEmpty(specialActivities)) {
|
||||
/* if (!ListUtils.isListEmpty(specialActivities)) {
|
||||
if (AvRoomDataManager.get().isCpRoom()) {
|
||||
gameBinding.activityTimerCp.start(timerBean);
|
||||
} else {
|
||||
gameBinding.activityTimer.start(timerBean);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void otherInitView() {
|
||||
|
@@ -33,6 +33,7 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomMicInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
@@ -435,11 +436,11 @@ public class AvRoomPresenter extends BaseMvpPresenter<IAvRoomView> {
|
||||
* 获取活动信息
|
||||
*/
|
||||
public void getActionDialog(int type) {
|
||||
mAvRoomModel.getActionDialog(type, new CallBack<ActivityInfo>() {
|
||||
mAvRoomModel.getActionDialog(type, new CallBack<List<BannerInfo>>() {
|
||||
@Override
|
||||
public void onSuccess(ActivityInfo data) {
|
||||
public void onSuccess(List<BannerInfo> data) {
|
||||
if (getMvpView() != null) {
|
||||
getMvpView().onGetActionDialog(data.getList());
|
||||
getMvpView().onGetActionDialog(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.yizhuan.erban.avroom.view;
|
||||
|
||||
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterInfo;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
@@ -48,7 +49,7 @@ public interface IAvRoomView extends IMvpBaseView {
|
||||
/**
|
||||
* 获取活动信息成功
|
||||
*/
|
||||
void onGetActionDialog(List<ActionDialogInfo> actionDialogInfoList);
|
||||
void onGetActionDialog(List<BannerInfo> actionDialogInfoList);
|
||||
|
||||
/**
|
||||
* 获取活动信息失败
|
||||
|
@@ -7,6 +7,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.jude.rollviewpager.adapter.StaticPagerAdapter;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
@@ -15,6 +16,8 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.im.RouterHandler;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.utils.CommonJumpHelper;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RouterType;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
@@ -30,38 +33,30 @@ import java.util.List;
|
||||
public class RoomActAdapter extends StaticPagerAdapter {
|
||||
|
||||
private Context mContext;
|
||||
private List<ActionDialogInfo> data;
|
||||
private SVGAParser svgaParser;
|
||||
private List<BannerInfo> data;
|
||||
|
||||
public void setInRoom(boolean inRoom) {
|
||||
this.inRoom = inRoom;
|
||||
}
|
||||
|
||||
private boolean inRoom = true;
|
||||
public RoomActAdapter(Context context, List<ActionDialogInfo> data) {
|
||||
|
||||
public RoomActAdapter(Context context, List<BannerInfo> data) {
|
||||
this.data = data;
|
||||
this.mContext = context;
|
||||
svgaParser = new SVGAParser(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(ViewGroup container, int position) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.item_room_act, container, false);
|
||||
SVGAImageView ivCover = view.findViewById(R.id.iv_cover);
|
||||
ActionDialogInfo bannerInfo = data.get(position);
|
||||
String url = bannerInfo.getSkipUrl();
|
||||
String actId = bannerInfo.getActId();
|
||||
if ("png".equals(bannerInfo.getImageType())) {
|
||||
ImageView ivCover = view.findViewById(R.id.iv_cover);
|
||||
BannerInfo bannerInfo = data.get(position);
|
||||
String url = bannerInfo.getSkipUri();
|
||||
String actId = String.valueOf(bannerInfo.getBannerId());
|
||||
ivCover.setScaleType(ImageView.ScaleType.FIT_XY);
|
||||
ImageLoadUtils.loadImage(mContext, bannerInfo.getAlertWinPic(), ivCover, R.drawable.default_cover);
|
||||
} else if ("svga".equals(bannerInfo.getImageType())) {
|
||||
ivCover.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
playSvag(ivCover, bannerInfo.getAlertWinPic());
|
||||
}
|
||||
|
||||
ImageLoadUtils.loadImage(mContext, bannerInfo.getBannerPic(), ivCover, R.drawable.default_cover);
|
||||
ivCover.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(url)) return;
|
||||
|
||||
if (inRoom) {
|
||||
if (AvRoomDataManager.get().isCpRoom()) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.cp_room_activity, "陪伴房活动点击");
|
||||
@@ -76,33 +71,23 @@ public class RoomActAdapter extends StaticPagerAdapter {
|
||||
if (!TextUtils.isEmpty(actId) && "19".equals(actId)) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_RECOMMEND_CLICK, "我要上推荐");
|
||||
}
|
||||
if (JavaUtil.str2int(bannerInfo.getSkipType()) == RouterType.H5 && bannerInfo.isDialogWeb()) {
|
||||
if (bannerInfo.getSkipType() == 3 && bannerInfo.getShowType() != 1) {
|
||||
if (listener != null) {
|
||||
listener.onWebClick(bannerInfo.getSkipUrl());
|
||||
listener.onWebClick(bannerInfo.getSkipUri());
|
||||
}
|
||||
} else {
|
||||
RouterHandler.handle(mContext, JavaUtil.str2int(bannerInfo.getSkipType()),
|
||||
String.valueOf(bannerInfo.getSkipUrl()));
|
||||
CommonJumpHelper.bannerJump(mContext, bannerInfo);
|
||||
}
|
||||
//新埋点
|
||||
String actName = bannerInfo.getActName();
|
||||
String actName = bannerInfo.getBannerName();
|
||||
if (actName == null) {
|
||||
actName = "";
|
||||
}
|
||||
if (bannerInfo.getEntrancePosition() == 2) {
|
||||
//左上角
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.Event.EVENT_ROOM_ACTIVITY_ENTRANCE,
|
||||
"房间左上角活动入口-区分活动:" + actName);
|
||||
} else {
|
||||
//右下角
|
||||
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.Event.EVENT_ROOM_ACTIVITY_ENTRANCE_B,
|
||||
"房间右下角活动入口-区分活动:" + actName);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@@ -115,27 +100,6 @@ public class RoomActAdapter extends StaticPagerAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
private void playSvag(SVGAImageView svgaImageView, String effect) {
|
||||
if (TextUtils.isEmpty(effect)) return;
|
||||
try {
|
||||
svgaParser.parse(new URL(effect),
|
||||
new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity svgaVideoEntity) {
|
||||
svgaImageView.setImageDrawable(new SVGADrawable(svgaVideoEntity));
|
||||
svgaImageView.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
svgaImageView.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private RoomActClickListener listener;
|
||||
|
||||
public void setRoomActClickListener(RoomActClickListener listener) {
|
||||
|
@@ -82,8 +82,6 @@
|
||||
|
||||
<com.yizhuan.erban.utils.VpSwipeRefreshLayout
|
||||
android:id="@+id/refresh_layout"
|
||||
android:focusableInTouchMode="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
@@ -101,18 +99,20 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_follow_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="70dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:focusableInTouchMode="true"
|
||||
android:focusable="true"
|
||||
android:id="@+id/ll_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -3,11 +3,11 @@
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
<ImageView
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:riv_corner_radius="5dp" />
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@@ -179,7 +179,7 @@
|
||||
<!--设置动画,在这里使用让它继承系统的Animation.Dialog-->
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
|
||||
<!--背景是否模糊显示-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
@@ -1058,10 +1058,11 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
|
||||
|
||||
private void recoverBottomView() {
|
||||
hideIME(etReply);
|
||||
mReplyType = 0;
|
||||
etReply.setHint(R.string.dy_pub_comment);
|
||||
etReply.setText("");
|
||||
clOption.setVisibility(View.VISIBLE);
|
||||
emoticonPickerView.setVisibility(View.GONE);
|
||||
llReply.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void replySuccess(Reply result, int replyPosition) {
|
||||
|
@@ -50,6 +50,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
private ObjectAnimator translationXAnimator;
|
||||
private ObjectAnimator translationYAnimator;
|
||||
private int boxType = IBoxModel.BOX_TYPE_NORMAL;
|
||||
private int height;
|
||||
|
||||
|
||||
public static void start(Context context) {
|
||||
@@ -61,17 +62,17 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
//这里的height用MATCH_PARENT状态栏会被顶上去,不知道什么鬼
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight);
|
||||
getWindow().setGravity(Gravity.CENTER);
|
||||
height = ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, height);
|
||||
getWindow().setGravity(Gravity.BOTTOM);
|
||||
subscribeEvent();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
mBinding.setClick(this);
|
||||
translationXAnimator = ObjectAnimator.ofFloat(mBinding.ivGiftAnim, "translationX", 0,
|
||||
ScreenUtil.screenWidth / 2f - ScreenUtil.dip2px(15 + 19)).setDuration(500);
|
||||
height / 2f - ScreenUtil.dip2px(15 + 19)).setDuration(500);
|
||||
translationXAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
translationXAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
@@ -247,6 +248,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
private ObjectAnimator translationXAnimator;
|
||||
private ObjectAnimator translationYAnimator;
|
||||
private int boxType = IBoxModel.BOX_TYPE_HONOUR;
|
||||
private int height;
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent starter = new Intent(context, TreasureBoxHonourActivity.class);
|
||||
@@ -60,8 +61,9 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
//这里的height用MATCH_PARENT状态栏会被顶上去,不知道什么鬼
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight);
|
||||
getWindow().setGravity(Gravity.CENTER);
|
||||
height = ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight-ScreenUtil.getStatusBarHeight(context));
|
||||
getWindow().setGravity(Gravity.BOTTOM);
|
||||
subscribeEvent();
|
||||
}
|
||||
|
||||
@@ -69,7 +71,7 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
protected void init() {
|
||||
mBinding.setClick(this);
|
||||
translationXAnimator = ObjectAnimator.ofFloat(mBinding.ivGiftAnim, "translationX", 0,
|
||||
ScreenUtil.screenWidth / 2f - ScreenUtil.dip2px(15 + 19)).setDuration(500);
|
||||
height / 2f - ScreenUtil.dip2px(15 + 19)).setDuration(500);
|
||||
translationXAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
translationXAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
|
@@ -6,10 +6,12 @@ import android.os.Parcelable;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2017/8/7.
|
||||
*/
|
||||
@ToString
|
||||
@Data
|
||||
public class BannerInfo implements Parcelable, Serializable {
|
||||
/**
|
||||
@@ -51,6 +53,9 @@ public class BannerInfo implements Parcelable, Serializable {
|
||||
*/
|
||||
private String routerValue;
|
||||
|
||||
/**1-全屏,2-半屏,默认值是1*/
|
||||
private int showType;
|
||||
|
||||
protected BannerInfo(Parcel in) {
|
||||
bannerId = in.readInt();
|
||||
bannerName = in.readString();
|
||||
|
@@ -19,6 +19,7 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_core.decoration.headwear.bean.HeadWearInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.im.game.ImGameMode;
|
||||
import com.yizhuan.xchat_android_core.level.UserLevelVo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
@@ -382,7 +383,7 @@ public class AvRoomModel extends RoomBaseModel implements IAvRoomModel {
|
||||
* 获取活动信息
|
||||
*/
|
||||
@Override
|
||||
public void getActionDialog(int type, CallBack<ActivityInfo> callBack) {
|
||||
public void getActionDialog(int type, CallBack<List<BannerInfo>> callBack) {
|
||||
execute(mRoomService.getActionDialog(String.valueOf(type), AvRoomDataManager.get().getRoomId())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.unsubscribeOn(Schedulers.io())
|
||||
|
@@ -22,6 +22,7 @@ import com.yizhuan.xchat_android_core.bean.RoomMicInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.exception.ErrorThrowable;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.room.activitytimer.TimerBean;
|
||||
@@ -782,9 +783,8 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
||||
* @param type 1首页 2房间
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("charge/activity/list")
|
||||
Observable<ServiceResult<ActivityInfo>> getActionDialog(@Field("type") String type, @Field("roomId") long roomId);
|
||||
@GET("/home/banner")
|
||||
Observable<ServiceResult<List<BannerInfo>>> getActionDialog(@Query("type") String type, @Query("roomId") long roomId);
|
||||
|
||||
/**
|
||||
* 通知我们自己服务器房间退出接口
|
||||
|
@@ -4,6 +4,7 @@ import com.google.gson.JsonElement;
|
||||
import com.netease.nimlib.sdk.chatroom.model.EnterChatRoomResultData;
|
||||
import com.yizhuan.xchat_android_core.base.IModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
import com.yizhuan.xchat_android_core.room.activitytimer.TimerBean;
|
||||
import com.yizhuan.xchat_android_core.room.bean.ActivityInfo;
|
||||
@@ -71,7 +72,7 @@ public interface IAvRoomModel extends IModel {
|
||||
Single<RoomInfo> requestRoomInfo(String uid);
|
||||
|
||||
/** 获取活动信息 */
|
||||
void getActionDialog(int type, CallBack<ActivityInfo> callBack);
|
||||
void getActionDialog(int type, CallBack<List<BannerInfo>> callBack);
|
||||
|
||||
/**
|
||||
* 告知服务端用户进入房间(后端统计需要)
|
||||
|
Reference in New Issue
Block a user