讯飞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:");
|
Log.e(CLASSNAME, "initRongIM:");
|
||||||
initPhotoGlide();
|
initPhotoGlide();
|
||||||
//初始化科大讯飞语音转文字
|
//初始化科大讯飞语音转文字
|
||||||
Recognizer.setAppId("af2efca9");
|
Recognizer.setAppId("671d2ae3");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RongIMClient.OnReceiveMessageWrapperListener mListener;
|
private static RongIMClient.OnReceiveMessageWrapperListener mListener;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:text="@string/fun_games"
|
android:text="@string/fun_games"
|
||||||
|
android:visibility="gone"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
@ -18,6 +19,7 @@
|
|||||||
android:id="@+id/fun_games_list"
|
android:id="@+id/fun_games_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="62dp"
|
android:layout_height="62dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp" />
|
||||||
|
|
||||||
|
@ -943,4 +943,5 @@
|
|||||||
<string name="alerts">消息通知</string>
|
<string name="alerts">消息通知</string>
|
||||||
<string name="studio_gift_effects">屏蔽直播間禮物特效</string>
|
<string name="studio_gift_effects">屏蔽直播間禮物特效</string>
|
||||||
<string name="studio_ride_effects">屏蔽直播間座駕特效</string>
|
<string name="studio_ride_effects">屏蔽直播間座駕特效</string>
|
||||||
|
<string name="in_batch">換一批</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -59,6 +59,10 @@ public class SidebarAdapter extends RefreshAdapter<AnchorRecommendItemModel> {
|
|||||||
} else if (holder instanceof SidebarViewHoler) {
|
} else if (holder instanceof SidebarViewHoler) {
|
||||||
SidebarViewHoler sidebarViewHoler = (SidebarViewHoler) holder;
|
SidebarViewHoler sidebarViewHoler = (SidebarViewHoler) holder;
|
||||||
sidebarViewHoler.onBanner(data);
|
sidebarViewHoler.onBanner(data);
|
||||||
|
sidebarViewHoler.setListener(() -> {
|
||||||
|
if (listener != null)
|
||||||
|
listener.refresh();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,4 +88,16 @@ public class SidebarAdapter extends RefreshAdapter<AnchorRecommendItemModel> {
|
|||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
return this;
|
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();
|
gamesAdapter = new FunGamesAdapter();
|
||||||
funGamesList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
funGamesList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||||
funGamesList.setAdapter(gamesAdapter);
|
funGamesList.setAdapter(gamesAdapter);
|
||||||
LiveNetManager.get(getContext())
|
// LiveNetManager.get(getContext())
|
||||||
.getActiveList(new HttpCallback<List<ActiveModel>>() {
|
// .getActiveList(new HttpCallback<List<ActiveModel>>() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess(List<ActiveModel> data) {
|
// public void onSuccess(List<ActiveModel> data) {
|
||||||
if (!isDetached())
|
// if (!isDetached())
|
||||||
gamesAdapter.addData(data);
|
// gamesAdapter.addData(data);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onError(String error) {
|
// public void onError(String error) {
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
//粉丝团
|
//粉丝团
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> {
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
@ -74,6 +74,7 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
|||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
Bundle bundle = getArguments();
|
Bundle bundle = getArguments();
|
||||||
|
|
||||||
sidebarBack = (ImageView) findViewById(R.id.sidebar_back);
|
sidebarBack = (ImageView) findViewById(R.id.sidebar_back);
|
||||||
mask = findViewById(R.id.mask);
|
mask = findViewById(R.id.mask);
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
@ -168,6 +169,12 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
|||||||
gotoLive(bean.getUid());
|
gotoLive(bean.getUid());
|
||||||
dismiss();
|
dismiss();
|
||||||
});
|
});
|
||||||
|
sidebarAdapter.setListener(new SidebarAdapter.SidebarListener() {
|
||||||
|
@Override
|
||||||
|
public void refresh() {
|
||||||
|
sidebarList.initData();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package com.yunbao.live.views;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
@ -10,14 +11,15 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.ms.banner.Banner;
|
import com.ms.banner.Banner;
|
||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.SlideInfoModel;
|
import com.yunbao.common.bean.SlideInfoModel;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.views.SlideInBannerViewHolder;
|
import com.yunbao.common.views.SlideInBannerViewHolder;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
|
|
||||||
@ -29,12 +31,27 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
|||||||
//侧边栏轮播
|
//侧边栏轮播
|
||||||
private Banner mBanner;
|
private Banner mBanner;
|
||||||
private Dialog mShowLoadingDialog;
|
private Dialog mShowLoadingDialog;
|
||||||
|
private TextView inBatch;
|
||||||
|
private SidebarListener listener;
|
||||||
|
|
||||||
|
public SidebarViewHoler setListener(SidebarListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public SidebarViewHoler(@NonNull View itemView) {
|
public SidebarViewHoler(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
//侧边栏轮播
|
//侧边栏轮播
|
||||||
mBanner = itemView.findViewById(R.id.banner);
|
mBanner = itemView.findViewById(R.id.banner);
|
||||||
|
inBatch = itemView.findViewById(R.id.in_batch);
|
||||||
mShowLoadingDialog = DialogUitl.loadingDialog(itemView.getContext());
|
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后需要展示加载中动画
|
* Banner双击可能会导致进入两次直播间,点击Banner后需要展示加载中动画
|
||||||
*/
|
*/
|
||||||
private void showLoadingDialog(){
|
private void showLoadingDialog() {
|
||||||
mShowLoadingDialog.show();
|
mShowLoadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface SidebarListener {
|
||||||
|
void refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
@ -29,14 +29,31 @@
|
|||||||
app:indicator_width="8dp" />
|
app:indicator_width="8dp" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp">
|
||||||
android:text="@string/recommended_for_you"
|
|
||||||
android:textColor="#FFF6F7FB"
|
<TextView
|
||||||
android:textSize="14sp" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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>
|
</LinearLayout>
|
||||||
|
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