diff --git a/common/src/main/res/layout/view_fun_games.xml b/common/src/main/res/layout/view_fun_games.xml
index 22261996d..cb570cf27 100644
--- a/common/src/main/res/layout/view_fun_games.xml
+++ b/common/src/main/res/layout/view_fun_games.xml
@@ -10,6 +10,7 @@
android:id="@+id/fun_game_pic"
android:padding="3dp"
android:layout_width="40dp"
+ android:layout_marginTop="10dp"
android:layout_height="40dp"
android:src="@mipmap/live_more_icon_guard" />
diff --git a/common/src/main/res/layout/view_live_total.xml b/common/src/main/res/layout/view_live_total.xml
index 28d7252d8..6f063c92a 100644
--- a/common/src/main/res/layout/view_live_total.xml
+++ b/common/src/main/res/layout/view_live_total.xml
@@ -19,9 +19,8 @@
APP全應用小窗播放
在其他應用上及所有界面显示小窗\n需打開懸浮窗權限。
前往打開
- 不喜歡小窗播放吗?\n 可以在「個人中心」-「設定」中關閉
+ 不喜歡小窗播放吗?\n可以在「個人中心」-「設定」中關閉
去設置
知道了
個人設定
diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
index 9bdb8734f..09e3ae30c 100644
--- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java
@@ -726,15 +726,25 @@ public class LiveAudienceActivity extends LiveActivity {
liveGiftDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
break;
case CURRENT_ACTIVITY:
- bundle.putString("url", event.getModel().activityUrl(mContext, mLiveBean.getUid()));
- int show = TextUtils.isEmpty(event.getModel().getShowType()) ? 0 : Integer.parseInt(event.getModel().getShowType());
- bundle.putInt("show_type", show);
- LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
- liveHDDialogFragment.setArguments(bundle);
- liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
+ int type = 0;
+ if (TextUtils.equals(event.getModel().getActiveName(), "闖關熱戀")) {
+ type = 0;
+ } else if (TextUtils.equals(event.getModel().getActiveName(), "甜蜜約會")) {
+ type = 1;
+ } else if (TextUtils.equals(event.getModel().getActiveName(), "娛樂整蠱")) {
+ type = 3;
+ } else if (TextUtils.equals(event.getModel().getActiveName(), "怪物大作戰")) {
+ type = 4;
+ } else if (TextUtils.equals(event.getModel().getActiveName(), "動感零鉆購")) {
+ type = 2;
+ }
+ LiveGameDialogFragment currentFragment = new LiveGameDialogFragment();
+ currentFragment.selectIndex(type);
+ currentFragment.setRoomId(mLiveUid);
+ currentFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
break;
case WE_CHEAT:
- LiveGameDialogFragment fragment=new LiveGameDialogFragment();
+ LiveGameDialogFragment fragment = new LiveGameDialogFragment();
fragment.selectIndex(3);
fragment.setRoomId(mLiveUid);
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
@@ -874,7 +884,7 @@ public class LiveAudienceActivity extends LiveActivity {
+ "&stream=" + mStream
+ "&uid=" + CommonAppConfig.getInstance().getUid()
+ "&token=" + CommonAppConfig.getInstance().getToken();
- liveHDDialogFragment = new LiveHDDialogFragment();
+ LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
bundle.putString("url", url);
bundle.putInt("show_type", 0);
liveHDDialogFragment.setArguments(bundle);
diff --git a/live/src/main/java/com/yunbao/live/adapter/SidebarAdapter.java b/live/src/main/java/com/yunbao/live/adapter/SidebarAdapter.java
index 054187c9d..a0839a9cb 100644
--- a/live/src/main/java/com/yunbao/live/adapter/SidebarAdapter.java
+++ b/live/src/main/java/com/yunbao/live/adapter/SidebarAdapter.java
@@ -80,6 +80,7 @@ public class SidebarAdapter extends RefreshAdapter {
* @param list
*/
public void addData(List list) {
+
refreshData(list);
}
diff --git a/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java b/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java
index a8bf3066b..ac3168698 100644
--- a/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java
+++ b/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java
@@ -151,19 +151,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter {
title.setVisibility(View.GONE);
title1.setVisibility(View.GONE);
Log.i("tag", "" + num);
-// if (position == 0 && type.equals("1")) {
-// title1.setText(R.string.noble);
-// title1.setVisibility(View.VISIBLE);
-// }
- if (!noble && position == num && type.equals("1")) {
- title.setText(R.string.live_audience);
- title.setVisibility(View.VISIBLE);
-
- }
- ivIcon.setVisibility(View.GONE);
- if (noble) {
- ivIcon.setVisibility(View.VISIBLE);
- }
+ ivIcon.setVisibility(View.VISIBLE);
mIcon.setImageBitmap(null);
tvName.setVisibility(View.GONE);
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java
index bc154ccff..67f10500c 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java
@@ -8,6 +8,7 @@ import android.view.WindowManager;
import android.widget.HorizontalScrollView;
import android.widget.TextView;
+import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -72,7 +73,7 @@ public class LiveTotalDialog extends AbsDialogFragment {
benefits = (HorizontalScrollView) findViewById(R.id.benefits);
basicToolsLayout = (HorizontalScrollView) findViewById(R.id.basic_tools_layout);
gamesAdapter = new FunGamesAdapter();
- funGamesList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
+ funGamesList.setLayoutManager(new GridLayoutManager(mContext, 4));
funGamesList.setAdapter(gamesAdapter);
if (isActivity) {
funGames.setVisibility(View.VISIBLE);
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java
index 48ad13463..0d09fd5e1 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java
@@ -275,9 +275,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
data.add(model);
}
} else {
- if (TextUtils.equals(model.getNoble_id(), "0")) {
- data.add(model);
- }
+ data.add(model);
}
}
diff --git a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java
index 4ce8db214..03f0c2f49 100644
--- a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java
+++ b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java
@@ -10,14 +10,19 @@ import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.GsonUtils;
import com.google.gson.reflect.TypeToken;
+import com.ms.banner.Banner;
+import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
+import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.SlideInfoModel;
import com.yunbao.common.custom.CommonRefreshView;
import com.yunbao.common.custom.ItemDecoration;
@@ -28,9 +33,10 @@ import com.yunbao.common.http.main.MainNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.RouteUtil;
+import com.yunbao.common.views.SlideInBannerViewHolder;
+import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R;
import com.yunbao.live.adapter.SidebarAdapter;
-import com.yunbao.common.bean.LiveBean;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.live.event.LiveRoomChangeEvent;
import com.yunbao.live.http.LiveHttpUtil;
@@ -59,6 +65,9 @@ public class SidebarLiveAudience extends AbsDialogFragment {
private List list = new ArrayList<>();
private int index = 0;
+ private LinearLayout haveData, noDataLive;
+ private Banner mBanner;
+ private TextView inBatch;
@Override
protected int getLayoutId() {
@@ -76,6 +85,11 @@ public class SidebarLiveAudience extends AbsDialogFragment {
Bundle bundle = getArguments();
sidebarBack = (ImageView) findViewById(R.id.sidebar_back);
+ haveData = (LinearLayout) findViewById(R.id.have_data);
+ noDataLive = (LinearLayout) findViewById(R.id.view_no_data_live);
+ //侧边栏轮播
+ mBanner = (Banner) findViewById(R.id.banner);
+ inBatch = (TextView) findViewById(R.id.in_batch);
mask = findViewById(R.id.mask);
if (bundle != null) {
String avatar = bundle.getString("Avatar");
@@ -117,9 +131,45 @@ public class SidebarLiveAudience extends AbsDialogFragment {
sidebarAdapter = new SidebarAdapter(mContext, mDisplay.getHeight());
sidebarAdapter.setHasStableIds(true);
sidebarList.setRecyclerViewAdapter(sidebarAdapter);
+ ViewClicksAntiShake.clicksAntiShake(inBatch, new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ sidebarList.initData();
+ }
+ });
if (sidebarAdapter != null) {
- sidebarAdapter.addData(list);
- sidebarAdapter.setData(slideInfoModels);
+ if (list.size() == 1) {
+ haveData.setVisibility(View.GONE);
+ noDataLive.setVisibility(View.VISIBLE);
+
+ if (mBanner.isStart()) {
+ mBanner.update(slideInfoModels);
+ } else {
+ mBanner.setAutoPlay(true)
+ .setPages(slideInfoModels, new SlideInBannerViewHolder())
+ .setDelayTime(3000)
+ .setOnBannerClickListener((datas, p) -> {
+ if (p >= 0 && p < slideInfoModels.size()) {
+ SlideInfoModel bean = slideInfoModels.get(p);
+ if (bean != null) {
+
+ String link = bean.getSlideUrl();
+ if (link.contains("http")) {
+ WebViewActivity.forward(getContext(), link, true);
+ } else {
+ gotoLive(link);
+ }
+ }
+ }
+ }).start();
+ }
+ } else {
+ haveData.setVisibility(View.VISIBLE);
+ noDataLive.setVisibility(View.GONE);
+ sidebarAdapter.addData(list);
+ sidebarAdapter.setData(slideInfoModels);
+ }
+
}
sidebarList.setDataHelperNew(new CommonRefreshView.DataHelperNew() {
@Override
@@ -147,9 +197,38 @@ public class SidebarLiveAudience extends AbsDialogFragment {
}
list.add(0, new AnchorRecommendItemModel());
+ if (list.size() == 1) {
+ haveData.setVisibility(View.GONE);
+ noDataLive.setVisibility(View.VISIBLE);
+
+ if (mBanner.isStart()) {
+ mBanner.update(slideInfoModels);
+ } else {
+ mBanner.setAutoPlay(true)
+ .setPages(slideInfoModels, new SlideInBannerViewHolder())
+ .setDelayTime(3000)
+ .setOnBannerClickListener((datas, p) -> {
+ if (p >= 0 && p < slideInfoModels.size()) {
+ SlideInfoModel bean = slideInfoModels.get(p);
+ if (bean != null) {
+
+ String link = bean.getSlideUrl();
+ if (link.contains("http")) {
+ WebViewActivity.forward(getContext(), link, true);
+ } else {
+ gotoLive(link);
+ }
+ }
+ }
+ }).start();
+ }
+ } else {
+ haveData.setVisibility(View.VISIBLE);
+ noDataLive.setVisibility(View.GONE);
+ sidebarAdapter.addData(list);
+ sidebarAdapter.setData(anchorRecommendModel.getSlide());
+ }
- sidebarAdapter.addData(list);
- sidebarAdapter.setData(anchorRecommendModel.getSlide());
sidebarList.onFinish();
}
diff --git a/live/src/main/res/layout/view_sidebar_live_audience.xml b/live/src/main/res/layout/view_sidebar_live_audience.xml
index 87d7479a4..a5638be36 100644
--- a/live/src/main/res/layout/view_sidebar_live_audience.xml
+++ b/live/src/main/res/layout/view_sidebar_live_audience.xml
@@ -1,5 +1,6 @@
@@ -16,6 +17,7 @@
android:background="#90000000" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/view_voice_dialog.xml b/live/src/main/res/layout/view_voice_dialog.xml
index fde22298d..78701d376 100644
--- a/live/src/main/res/layout/view_voice_dialog.xml
+++ b/live/src/main/res/layout/view_voice_dialog.xml
@@ -52,6 +52,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
+ android:layout_marginStart="5dp"
+ android:layout_marginEnd="5dp"
android:text="@string/fingers_slide"
android:textColor="#9A9A9A" />
diff --git a/live/src/main/res/mipmap-xxxhdpi/img_no_anchor.png b/live/src/main/res/mipmap-xxxhdpi/img_no_anchor.png
new file mode 100644
index 000000000..4c3164f18
Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/img_no_anchor.png differ
diff --git a/main/src/main/res/layout/item_setting.xml b/main/src/main/res/layout/item_setting.xml
index b6f235388..e9cd976aa 100644
--- a/main/src/main/res/layout/item_setting.xml
+++ b/main/src/main/res/layout/item_setting.xml
@@ -21,9 +21,5 @@
android:layout_centerVertical="true"
android:src="@mipmap/icon_arrow_right" />
-
+
\ No newline at end of file
diff --git a/main/src/main/res/layout/item_setting_1.xml b/main/src/main/res/layout/item_setting_1.xml
index ee252d187..32bfb353a 100644
--- a/main/src/main/res/layout/item_setting_1.xml
+++ b/main/src/main/res/layout/item_setting_1.xml
@@ -23,9 +23,5 @@
android:textColor="@color/global"
android:textSize="16sp" />
-
+
\ No newline at end of file