新增首页战令入口
This commit is contained in:
parent
ac6eb21e06
commit
7627219e77
@ -20,6 +20,12 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
@SerializedName("red_packet_show")
|
@SerializedName("red_packet_show")
|
||||||
private int showRedPacket = 0;//是否显示首页红包浮窗
|
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||||
//是否支持换一批0=不支持 1=支持
|
//是否支持换一批0=不支持 1=支持
|
||||||
|
|
||||||
|
|
||||||
|
@SerializedName("live_battle_pass_show_status")
|
||||||
|
private int showWarOrder = 0;//是否显示首页戰令
|
||||||
|
//是否支持换一批0=不支持 1=支持
|
||||||
|
|
||||||
@SerializedName("up_show")
|
@SerializedName("up_show")
|
||||||
private int upShow = 0;
|
private int upShow = 0;
|
||||||
@SerializedName("list")
|
@SerializedName("list")
|
||||||
@ -40,6 +46,14 @@ public class AnchorRecommendModel extends BaseModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getShowWarOrder() {
|
||||||
|
return showWarOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowWarOrder(int showWarOrder) {
|
||||||
|
this.showWarOrder = showWarOrder;
|
||||||
|
}
|
||||||
|
|
||||||
public int getListShow() {
|
public int getListShow() {
|
||||||
return listShow;
|
return listShow;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public class SamsungUtil {
|
|||||||
public void init() {
|
public void init() {
|
||||||
iapHelper = IapHelper.getInstance(mContext);
|
iapHelper = IapHelper.getInstance(mContext);
|
||||||
//设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式
|
//设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式
|
||||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST);
|
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,6 +31,7 @@ public class RouteUtil {
|
|||||||
public static final String PATH_LIVEREPORT = "/live/LiveReportActivity";
|
public static final String PATH_LIVEREPORT = "/live/LiveReportActivity";
|
||||||
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
|
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
|
||||||
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
|
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
|
||||||
|
public static final String PATH_COMPENSATE_ACTIVITY = "/live/CompensateActivity";
|
||||||
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
|
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
|
||||||
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
||||||
public static final String PATH_MAIN = "/main/MainActivity";
|
public static final String PATH_MAIN = "/main/MainActivity";
|
||||||
@ -46,6 +47,7 @@ public class RouteUtil {
|
|||||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||||
|
public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
|
||||||
|
|
||||||
public static void forwardFansActivity(String uid) {
|
public static void forwardFansActivity(String uid) {
|
||||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||||
@ -128,6 +130,23 @@ public class RouteUtil {
|
|||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到
|
||||||
|
*/
|
||||||
|
public static void forwardLiveCompensateActivity(Context context, String msgid, String banner, String title, String content, String time, String link, boolean receive) {
|
||||||
|
ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
|
||||||
|
.withString("msgid", msgid)
|
||||||
|
.withString("banner", banner)
|
||||||
|
.withString("title", title)
|
||||||
|
.withString("content", content)
|
||||||
|
.withString("time", time)
|
||||||
|
.withString("link", link)
|
||||||
|
.withBoolean("receive", receive)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转到装扮
|
* 跳转到装扮
|
||||||
*/
|
*/
|
||||||
|
@ -1439,4 +1439,6 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="sys_msg_year">-</string>
|
<string name="sys_msg_year">-</string>
|
||||||
<string name="sys_msg_month">-</string>
|
<string name="sys_msg_month">-</string>
|
||||||
<string name="sys_msg_day"></string>
|
<string name="sys_msg_day"></string>
|
||||||
|
|
||||||
|
<string name="main_suspension_war_order">BattlePass</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1438,4 +1438,6 @@
|
|||||||
<string name="sys_msg_month">月</string>
|
<string name="sys_msg_month">月</string>
|
||||||
<string name="sys_msg_day">日</string>
|
<string name="sys_msg_day">日</string>
|
||||||
|
|
||||||
|
<string name="main_suspension_war_order">直播通行證</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1437,4 +1437,6 @@
|
|||||||
<string name="sys_msg_month">月</string>
|
<string name="sys_msg_month">月</string>
|
||||||
<string name="sys_msg_day">日</string>
|
<string name="sys_msg_day">日</string>
|
||||||
|
|
||||||
|
<string name="main_suspension_war_order">直播通行證</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1434,4 +1434,6 @@
|
|||||||
<string name="sys_msg_month">月</string>
|
<string name="sys_msg_month">月</string>
|
||||||
<string name="sys_msg_day">日</string>
|
<string name="sys_msg_day">日</string>
|
||||||
|
|
||||||
|
<string name="main_suspension_war_order">直播通行證</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1443,4 +1443,6 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="sys_msg_month">-</string>
|
<string name="sys_msg_month">-</string>
|
||||||
<string name="sys_msg_day"></string>
|
<string name="sys_msg_day"></string>
|
||||||
|
|
||||||
|
<string name="main_suspension_war_order">BattlePass</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
9
live/src/main/res/drawable/bg_war_order.xml
Normal file
9
live/src/main/res/drawable/bg_war_order.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<corners android:radius="24dp" />
|
||||||
|
<gradient
|
||||||
|
android:angle="270"
|
||||||
|
android:endColor="#3A27CA"
|
||||||
|
android:startColor="#E79EFB" />
|
||||||
|
</shape>
|
@ -189,6 +189,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
private boolean isfloatBannernet = true, isFirst = true;
|
private boolean isfloatBannernet = true, isFirst = true;
|
||||||
|
|
||||||
private View floatRedPacket;
|
private View floatRedPacket;
|
||||||
|
|
||||||
|
private View floatWarOrder;
|
||||||
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
@ -244,7 +246,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
v_table_redpoint = findViewById(R.id.v_table_redpoint);
|
v_table_redpoint = findViewById(R.id.v_table_redpoint);
|
||||||
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);
|
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);
|
||||||
floatRedPacket = findViewById(R.id.red_packet);
|
floatRedPacket = findViewById(R.id.red_packet);
|
||||||
|
floatWarOrder = findViewById(R.id.war_order);
|
||||||
initRedPacket();
|
initRedPacket();
|
||||||
|
initWarOrder();
|
||||||
|
|
||||||
Display mDisplay = getWindowManager().getDefaultDisplay();
|
Display mDisplay = getWindowManager().getDefaultDisplay();
|
||||||
Height = mDisplay.getHeight();
|
Height = mDisplay.getHeight();
|
||||||
@ -329,25 +333,25 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
case 0:
|
case 0:
|
||||||
//点击埋点
|
//点击埋点
|
||||||
MobclickAgent.onEvent(mContext, "home_page", "首页");
|
MobclickAgent.onEvent(mContext, "home_page", "首页");
|
||||||
if(mMainHomeCommunityViewHolder!=null) {
|
if (mMainHomeCommunityViewHolder != null) {
|
||||||
mMainHomeCommunityViewHolder.onPauseVideo();
|
mMainHomeCommunityViewHolder.onPauseVideo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
MobclickAgent.onEvent(mContext, "community", "社区");
|
MobclickAgent.onEvent(mContext, "community", "社区");
|
||||||
if(mMainHomeCommunityViewHolder!=null) {
|
if (mMainHomeCommunityViewHolder != null) {
|
||||||
mMainHomeCommunityViewHolder.onResumePlay();
|
mMainHomeCommunityViewHolder.onResumePlay();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
MobclickAgent.onEvent(mContext, "information", "消息");
|
MobclickAgent.onEvent(mContext, "information", "消息");
|
||||||
if(mMainHomeCommunityViewHolder!=null) {
|
if (mMainHomeCommunityViewHolder != null) {
|
||||||
mMainHomeCommunityViewHolder.onPauseVideo();
|
mMainHomeCommunityViewHolder.onPauseVideo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
MobclickAgent.onEvent(mContext, "my", "我的");
|
MobclickAgent.onEvent(mContext, "my", "我的");
|
||||||
if(mMainHomeCommunityViewHolder!=null) {
|
if (mMainHomeCommunityViewHolder != null) {
|
||||||
mMainHomeCommunityViewHolder.onPauseVideo();
|
mMainHomeCommunityViewHolder.onPauseVideo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -513,12 +517,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
floatBanner.setVisibility(View.GONE);
|
floatBanner.setVisibility(View.GONE);
|
||||||
floatRedPacket.setVisibility(View.GONE);
|
floatRedPacket.setVisibility(View.GONE);
|
||||||
|
floatWarOrder.setVisibility(View.GONE);
|
||||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||||
isfloatBannernet = false;
|
isfloatBannernet = false;
|
||||||
if (mainMessageViewHolder != null) mainMessageViewHolder.onResume();
|
if (mainMessageViewHolder != null) mainMessageViewHolder.onResume();
|
||||||
} else {
|
} else {
|
||||||
floatBanner.setVisibility(View.GONE);
|
floatBanner.setVisibility(View.GONE);
|
||||||
floatRedPacket.setVisibility(View.GONE);
|
floatRedPacket.setVisibility(View.GONE);
|
||||||
|
floatWarOrder.setVisibility(View.GONE);
|
||||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||||
isfloatBannernet = false;
|
isfloatBannernet = false;
|
||||||
}
|
}
|
||||||
@ -528,6 +534,20 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
checkVersion();
|
checkVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示战令
|
||||||
|
*/
|
||||||
|
private void initWarOrder() {
|
||||||
|
if (floatWarOrder != null) {
|
||||||
|
floatWarOrder.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
RouteUtil.forwardBattlePass();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
@ -594,6 +614,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(AnchorRecommendModel data) {
|
public void onSuccess(AnchorRecommendModel data) {
|
||||||
if (isFinishing()) return;
|
if (isFinishing()) return;
|
||||||
|
if (data.getShowWarOrder() == 0) {
|
||||||
|
floatWarOrder.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
if (data.getListShow() == 1 && data.getList().size() > 2) {
|
if (data.getListShow() == 1 && data.getList().size() > 2) {
|
||||||
floatBanner.setVisibility(View.VISIBLE);
|
floatBanner.setVisibility(View.VISIBLE);
|
||||||
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
|
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
|
||||||
@ -610,8 +633,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
((ProgressBar) floatRedPacket.findViewById(R.id.progress)).setProgress(data.getRedPacketNum());
|
((ProgressBar) floatRedPacket.findViewById(R.id.progress)).setProgress(data.getRedPacketNum());
|
||||||
((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal());
|
((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
30
main/src/main/res/layout/view_float_war_order.xml
Normal file
30
main/src/main/res/layout/view_float_war_order.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="140dp"
|
||||||
|
android:layout_height="41dp"
|
||||||
|
android:background="@drawable/bg_war_order"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="25dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:src="@mipmap/icon_war_order" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/main_suspension_war_order"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="15dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -179,6 +179,17 @@
|
|||||||
android:layout_above="@id/rt_main_tab"
|
android:layout_above="@id/rt_main_tab"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_marginBottom="10dp" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/war_order"
|
||||||
|
layout="@layout/view_float_war_order"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_above="@id/rt_main_tab"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="12dp"
|
||||||
android:layout_marginBottom="10dp" />
|
android:layout_marginBottom="10dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
BIN
main/src/main/res/mipmap-mdpi/icon_war_order.png
Normal file
BIN
main/src/main/res/mipmap-mdpi/icon_war_order.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
Loading…
Reference in New Issue
Block a user