From 099cc0d83d92f14b6a013b049308eb35ff3422de Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 22 Oct 2022 14:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=AF=E9=A3=9Esdk=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/libs/arm64-v8a/libmsc.so | Bin 2374416 -> 2374416 bytes common/libs/armeabi-v7a/libmsc.so | Bin 2215900 -> 2215900 bytes .../imrongcloud/RongcloudIMManager.java | 2 +- .../src/main/res/layout/view_live_total.xml | 2 ++ common/src/main/res/values/strings.xml | 1 + .../yunbao/live/adapter/SidebarAdapter.java | 16 +++++++++ .../yunbao/live/dialog/LiveTotalDialog.java | 24 +++++++------- .../live/dialog/SidebarLiveAudience.java | 7 ++++ .../yunbao/live/views/SidebarViewHoler.java | 26 +++++++++++++-- .../layout/view_sidebar_live_audience_top.xml | 31 ++++++++++++++---- .../src/main/res/mipmap-xhdpi/icon_change.png | Bin 0 -> 726 bytes 11 files changed, 87 insertions(+), 22 deletions(-) create mode 100644 live/src/main/res/mipmap-xhdpi/icon_change.png diff --git a/common/libs/arm64-v8a/libmsc.so b/common/libs/arm64-v8a/libmsc.so index 6077a8185fd1d3b6e5cbcc503bcab37d01fa0377..2d64258852a53f5a1b1b974f4cab8422a8429e62 100644 GIT binary patch delta 127 zcmWN>#|^?T7=Td)LN~ovQx>qII5Fb{5=6G(@JU=f3=(^=2UpJghxh!?2VOh~s8A)O zMx6#tTD0k)=+dLlfFUEsOqeob&VnT?)@<0ad+G08Cnm|G*rvCOGtOqQv**l2M$U^O Sy*^c`#a$qj-)7=Y2>zAxZ{E7-w=FfjJwWe~hg1zbFQ31!%XiOo=q|KYv%(|E0T@6-F6tQ={)zB}y)Fq zrbCw=eFh8}F=oP)8FLmaS+Qor_Uk`gATNj>s`!4B2(Ddn&g(`64|PBzTWA* RKIo%9>9Y=W_$%Edvww2=EaU(H diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java index c4a4f656b..abf9f7b62 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java @@ -61,7 +61,7 @@ public class RongcloudIMManager { Log.e(CLASSNAME, "initRongIM:"); initPhotoGlide(); //初始化科大讯飞语音转文字 - Recognizer.setAppId("af2efca9"); + Recognizer.setAppId("671d2ae3"); } private static RongIMClient.OnReceiveMessageWrapperListener mListener; diff --git a/common/src/main/res/layout/view_live_total.xml b/common/src/main/res/layout/view_live_total.xml index 2fc96c2c4..b398773e0 100644 --- a/common/src/main/res/layout/view_live_total.xml +++ b/common/src/main/res/layout/view_live_total.xml @@ -11,6 +11,7 @@ android:layout_marginStart="16dp" android:layout_marginTop="24dp" android:text="@string/fun_games" + android:visibility="gone" android:textColor="@color/white" android:textSize="14sp" /> @@ -18,6 +19,7 @@ android:id="@+id/fun_games_list" android:layout_width="match_parent" android:layout_height="62dp" + android:visibility="gone" android:layout_marginStart="16dp" android:layout_marginTop="10dp" /> diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 305f3c76c..8c5ee21eb 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -943,4 +943,5 @@ 消息通知 屏蔽直播間禮物特效 屏蔽直播間座駕特效 + 換一批 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 6945b7591..054187c9d 100644 --- a/live/src/main/java/com/yunbao/live/adapter/SidebarAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/SidebarAdapter.java @@ -59,6 +59,10 @@ public class SidebarAdapter extends RefreshAdapter { } else if (holder instanceof SidebarViewHoler) { SidebarViewHoler sidebarViewHoler = (SidebarViewHoler) holder; sidebarViewHoler.onBanner(data); + sidebarViewHoler.setListener(() -> { + if (listener != null) + listener.refresh(); + }); } } @@ -84,4 +88,16 @@ public class SidebarAdapter extends RefreshAdapter { notifyDataSetChanged(); return this; } + + private SidebarListener listener; + + public SidebarAdapter setListener(SidebarListener listener) { + this.listener = listener; + return this; + } + + public interface SidebarListener { + + void refresh(); + } } 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 960721203..accdfcb70 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java @@ -59,18 +59,18 @@ public class LiveTotalDialog extends AbsDialogFragment { gamesAdapter = new FunGamesAdapter(); funGamesList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false)); funGamesList.setAdapter(gamesAdapter); - LiveNetManager.get(getContext()) - .getActiveList(new HttpCallback>() { - @Override - public void onSuccess(List data) { - if (!isDetached()) - gamesAdapter.addData(data); - } - - @Override - public void onError(String error) { - } - }); +// LiveNetManager.get(getContext()) +// .getActiveList(new HttpCallback>() { +// @Override +// public void onSuccess(List data) { +// if (!isDetached()) +// gamesAdapter.addData(data); +// } +// +// @Override +// public void onError(String error) { +// } +// }); //粉丝团 ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> { Bus.get().post(new LiveAudienceEvent() 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 aecb11117..4ce8db214 100644 --- a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java +++ b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java @@ -74,6 +74,7 @@ public class SidebarLiveAudience extends AbsDialogFragment { public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); Bundle bundle = getArguments(); + sidebarBack = (ImageView) findViewById(R.id.sidebar_back); mask = findViewById(R.id.mask); if (bundle != null) { @@ -168,6 +169,12 @@ public class SidebarLiveAudience extends AbsDialogFragment { gotoLive(bean.getUid()); dismiss(); }); + sidebarAdapter.setListener(new SidebarAdapter.SidebarListener() { + @Override + public void refresh() { + sidebarList.initData(); + } + }); } @Override diff --git a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java index a20442623..e447730a6 100644 --- a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java +++ b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java @@ -3,6 +3,7 @@ package com.yunbao.live.views; import android.app.Activity; import android.app.Dialog; import android.view.View; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; @@ -10,14 +11,15 @@ import androidx.recyclerview.widget.RecyclerView; import com.alibaba.fastjson.JSON; import com.ms.banner.Banner; import com.yunbao.common.activity.WebViewActivity; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.SlideInfoModel; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.utils.DialogUitl; 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.activity.LiveAudienceActivity; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; @@ -29,12 +31,27 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder { //侧边栏轮播 private Banner mBanner; private Dialog mShowLoadingDialog; + private TextView inBatch; + private SidebarListener listener; + + public SidebarViewHoler setListener(SidebarListener listener) { + this.listener = listener; + return this; + } public SidebarViewHoler(@NonNull View itemView) { super(itemView); //侧边栏轮播 mBanner = itemView.findViewById(R.id.banner); + inBatch = itemView.findViewById(R.id.in_batch); mShowLoadingDialog = DialogUitl.loadingDialog(itemView.getContext()); + ViewClicksAntiShake.clicksAntiShake(inBatch, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (listener != null) + listener.refresh(); + } + }); } @@ -103,10 +120,15 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder { } }); } + /** * Banner双击可能会导致进入两次直播间,点击Banner后需要展示加载中动画 */ - private void showLoadingDialog(){ + private void showLoadingDialog() { mShowLoadingDialog.show(); } + + public interface SidebarListener { + void refresh(); + } } diff --git a/live/src/main/res/layout/view_sidebar_live_audience_top.xml b/live/src/main/res/layout/view_sidebar_live_audience_top.xml index f8fed0dca..866e383f0 100644 --- a/live/src/main/res/layout/view_sidebar_live_audience_top.xml +++ b/live/src/main/res/layout/view_sidebar_live_audience_top.xml @@ -6,9 +6,9 @@ - - + android:layout_marginTop="20dp"> + + + + + + diff --git a/live/src/main/res/mipmap-xhdpi/icon_change.png b/live/src/main/res/mipmap-xhdpi/icon_change.png new file mode 100644 index 0000000000000000000000000000000000000000..59a45587206929f76e97a4d15e457509e51a1345 GIT binary patch literal 726 zcmV;{0xA88P)Px%kV!;AR7gw3)nDk}a}>w%$C*XK7^AF|&7X_Kh1ilLn{q{yFp(Qkn?IRC%5L}( zxnY;2rIzBtpBpz*Y^0V^{)1cpGnG8+Jv+-;)kIQ6Mu<#&x(G%W)EZ#_kR> zuf_hvhj;}aM8uvWMWzW{j#qI3KEX%$9KRrO7B0orxC-0xGG2;^z2hR&1S;?o_#Us} zhlu!N{KL-jT-<>NTlhu15E1)Fdk+)H%=$liS7kU55x>s{LS~+V)mVq0um)QqqB8xr z$(gwTSN6O2hXNmwO^G~-`>_Et5m92IPkkO9=yd1ep&}$As)>WEV=Tcts2)5X5t~K= zm*7#{i1{7uGpvn>YVNG7alW>Zz7;F*T+_9)GN{HBj)me0s0LLQn{ih}>>TJpdE>3d zwlJ;(e}VGRjuI%;uE+UpsCTij1#gdtZwCZU#51@Tr*`0KaCu_GL1H@1d+;<$V5TyO zh~j&2Wo8k#77yceeA8vxcnH(XyaCU4w3QL@^W!Q9UF_pae>91!OeK2 zU3uVWMVh37q~_O-5$59p)z~}nJbpu!?BkJPrU`Z6IT7*K;IPZgGh1L4zG`Af{r2^}us$Lx>tTULx5~8)xAe0zEA!N<%cVp=?ciJMzL-?TS+C4) zU^%?lF7p*3<@R0pv0*5`9GskkO+H#Ak7eKgcj+I?DQDaJ4{Xxdblvk;P5=M^07*qo IM6N<$f--4hQvd(} literal 0 HcmV?d00001