优化
This commit is contained in:
parent
64f9cee3af
commit
004a5b2a53
@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class FloatWarOrderEvent extends BaseModel {
|
||||
private boolean floatWarOrder;
|
||||
|
||||
public boolean isFloatWarOrder() {
|
||||
return floatWarOrder;
|
||||
}
|
||||
|
||||
public FloatWarOrderEvent setFloatWarOrder(boolean floatWarOrder) {
|
||||
this.floatWarOrder = floatWarOrder;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:background="@drawable/bg_live_sud_game_top_new"
|
||||
android:gravity="start|center_vertical">
|
||||
|
||||
@ -146,14 +146,15 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:gravity="center">
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="75dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_list"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp" />
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="88dp"
|
||||
android:layout_marginStart="15dp"
|
||||
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@mipmap/background_home_sud_game_list"
|
||||
android:orientation="horizontal">
|
||||
@ -48,11 +48,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_name"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:textColor="#000"
|
||||
android:textSize="14sp" />
|
||||
|
@ -15,6 +15,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="9dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/vacancy_sud_game"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@mipmap/icon_vacancy_sud_game"
|
||||
android:visibility="visible" />
|
||||
@ -18,14 +18,14 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/user_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="60dp"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/sud_game_user"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:scaleType="centerCrop"
|
||||
|
@ -9,9 +9,9 @@ ext {
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// 测试
|
||||
serverHost : " https://ceshi.yaoulive.com",
|
||||
// serverHost : " https://ceshi.yaoulive.com",
|
||||
|
||||
//百度语音识别
|
||||
|
||||
|
@ -68,6 +68,7 @@ import com.yunbao.common.custom.TabButtonGroup;
|
||||
import com.yunbao.common.dialog.HintDialog;
|
||||
import com.yunbao.common.dialog.InstructorOperationDialog;
|
||||
import com.yunbao.common.event.CompleteInformationEvent;
|
||||
import com.yunbao.common.event.FloatWarOrderEvent;
|
||||
import com.yunbao.common.event.InstructorOperationEvent;
|
||||
import com.yunbao.common.event.LiveFloatEvent;
|
||||
import com.yunbao.common.event.MainHomeCommunityToChatEvent;
|
||||
@ -104,9 +105,7 @@ import com.yunbao.common.views.APKUpdateCustomPopup;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||
import com.yunbao.common.views.weight.LiveFloatView;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.utils.LiveStorge;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.FullAdToBannerTransition;
|
||||
@ -1476,6 +1475,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onFloatWarOrderEvent(FloatWarOrderEvent event) {
|
||||
if (event.isFloatWarOrder()) {
|
||||
floatWarOrder.setVisibility(View.GONE);
|
||||
} else {
|
||||
floatWarOrder.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void initRedPacket() {
|
||||
ImageView title = floatRedPacket.findViewById(R.id.title);
|
||||
if (WordUtil.isNewZh()) {
|
||||
|
@ -1,18 +1,18 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.event.FloatWarOrderEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/22.
|
||||
* MainActivity 首页 删除
|
||||
@ -61,15 +61,19 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
switch (position) {
|
||||
case 0:
|
||||
MobclickAgent.onEvent(mContext, "home_page_follow", "首页关注列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
|
||||
break;
|
||||
case 1:
|
||||
MobclickAgent.onEvent(mContext, "home_page_hot", "首页热门列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
|
||||
break;
|
||||
case 2:
|
||||
MobclickAgent.onEvent(mContext, "home_page_recommend", "首页推荐列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(false));
|
||||
break;
|
||||
case 3:
|
||||
MobclickAgent.onEvent(mContext, "home_page_redpk", "首页红包列表按钮");
|
||||
EventBus.getDefault().post(new FloatWarOrderEvent().setFloatWarOrder(true));
|
||||
break;
|
||||
}
|
||||
if (mViewHolders == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user