讯飞sdk替换,页面修改
This commit is contained in:
parent
90e249e2d7
commit
099cc0d83d
Binary file not shown.
Binary file not shown.
@ -61,7 +61,7 @@ public class RongcloudIMManager {
|
||||
Log.e(CLASSNAME, "initRongIM:");
|
||||
initPhotoGlide();
|
||||
//初始化科大讯飞语音转文字
|
||||
Recognizer.setAppId("af2efca9");
|
||||
Recognizer.setAppId("671d2ae3");
|
||||
}
|
||||
|
||||
private static RongIMClient.OnReceiveMessageWrapperListener mListener;
|
||||
|
@ -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" />
|
||||
|
||||
|
@ -943,4 +943,5 @@
|
||||
<string name="alerts">消息通知</string>
|
||||
<string name="studio_gift_effects">屏蔽直播間禮物特效</string>
|
||||
<string name="studio_ride_effects">屏蔽直播間座駕特效</string>
|
||||
<string name="in_batch">換一批</string>
|
||||
</resources>
|
||||
|
@ -59,6 +59,10 @@ public class SidebarAdapter extends RefreshAdapter<AnchorRecommendItemModel> {
|
||||
} 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<AnchorRecommendItemModel> {
|
||||
notifyDataSetChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private SidebarListener listener;
|
||||
|
||||
public SidebarAdapter setListener(SidebarListener listener) {
|
||||
this.listener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface SidebarListener {
|
||||
|
||||
void refresh();
|
||||
}
|
||||
}
|
||||
|
@ -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<List<ActiveModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<ActiveModel> data) {
|
||||
if (!isDetached())
|
||||
gamesAdapter.addData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
// LiveNetManager.get(getContext())
|
||||
// .getActiveList(new HttpCallback<List<ActiveModel>>() {
|
||||
// @Override
|
||||
// public void onSuccess(List<ActiveModel> data) {
|
||||
// if (!isDetached())
|
||||
// gamesAdapter.addData(data);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(String error) {
|
||||
// }
|
||||
// });
|
||||
//粉丝团
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
@ -29,15 +29,32 @@
|
||||
app:indicator_width="8dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/recommended_for_you"
|
||||
android:textColor="#FFF6F7FB"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/in_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:text="@string/in_batch"
|
||||
android:textColor="#FFF6F7FB"
|
||||
android:drawablePadding="2dp"
|
||||
android:drawableStart="@mipmap/icon_change"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
BIN
live/src/main/res/mipmap-xhdpi/icon_change.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/icon_change.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 726 B |
Loading…
Reference in New Issue
Block a user