fix:融云返回null列表问题
add:工具栏合集
This commit is contained in:
parent
bbb1dc628d
commit
711752c324
@ -35,9 +35,31 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp">
|
||||
<LinearLayout
|
||||
android:id="@+id/popular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_moods" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/popular_tickets"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fan_club"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
@ -125,12 +147,18 @@
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/activity_center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
@ -207,6 +235,51 @@
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/system_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_system" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/system_notice"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/online"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_service" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/online_service"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/report_layout"
|
||||
android:layout_width="wrap_content"
|
||||
|
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_moods.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_moods.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_service.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_service.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_system.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_system.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
@ -884,5 +884,8 @@
|
||||
<string name="shield_mount_effect">屏蔽座駕特效</string>
|
||||
<string name="current_live_room">您已在當前直播間</string>
|
||||
<string name="clear_unread_messages">是否清空未讀消息</string>
|
||||
<string name="popular_tickets">人氣票</string>
|
||||
<string name="system_notice">系統通知</string>
|
||||
<string name="online_service">在線客服</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import static com.yunbao.live.views.LivePlayRyViewHolder.Micing;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.AudioManager;
|
||||
@ -16,12 +19,17 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
@ -46,10 +54,10 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.VerticalViewPager;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.VerticalPagerAdapter;
|
||||
import com.yunbao.live.bean.ImUserBean;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.dialog.LiveFansFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGuardDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMicUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTotalDialog;
|
||||
@ -58,6 +66,7 @@ import com.yunbao.live.dialog.SidebarLiveAudience;
|
||||
import com.yunbao.live.event.LinkMicTxAccEvent;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
@ -68,10 +77,9 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.yunbao.live.views.LivePlayRyViewHolder.Micing;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/10.
|
||||
* 看直播
|
||||
@ -773,11 +781,71 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
case REPORT:
|
||||
LiveReportActivity.forward(mContext, event.getBean().getUid());
|
||||
break;
|
||||
case POPULAR:
|
||||
url = CommonAppConfig.HOST + "/h5/activity/PopularityTask/index.html";
|
||||
url += "?anchorUid=" + mLiveUid
|
||||
+ "&stream=" + mStream
|
||||
+ "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
liveHDDialogFragment=new LiveHDDialogFragment();
|
||||
bundle.putString("url", url);
|
||||
bundle.putInt("show_type", 1);
|
||||
liveHDDialogFragment.show(getSupportFragmentManager(),"LiveHDDialogFragment");
|
||||
break;
|
||||
case NOTICE:
|
||||
toSysMsgWeb("1");
|
||||
break;
|
||||
case ONLINE:
|
||||
toSysMsgWeb("3");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到消息中心的系统信息web
|
||||
* @param type 1、官方通知 2、互动信息 3、在线客服
|
||||
*/
|
||||
private void toSysMsgWeb(String type){
|
||||
ImHttpUtil.getImUserInfo("", new HttpCallback() {
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<ImUserBean> list = JSON.parseArray(Arrays.toString(info), ImUserBean.class);
|
||||
for (ImUserBean bean : list) {
|
||||
if(type.equals(bean.getType())){
|
||||
switch (type){
|
||||
case "1":
|
||||
startActivity(new Intent(mContext, SystemMessageActivity.class)
|
||||
.putExtra("type", bean.getType())
|
||||
.putExtra("uid", "")
|
||||
.putExtra("title", bean.getTitle())
|
||||
.putExtra("headImg", ""));
|
||||
break;
|
||||
case "3":
|
||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service");
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
if (bean.getLink() != null && !"".equals(bean.getLink())) {
|
||||
WebViewActivity.forward(mContext, bean.getLink());
|
||||
} else {
|
||||
startActivity(new Intent(mContext, SystemMessageActivity.class)
|
||||
.putExtra("type", bean.getType())
|
||||
.putExtra("uid", "")
|
||||
.putExtra("title", "")
|
||||
.putExtra("headImg", ""));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public boolean canBackPressed() {
|
||||
return super.canBackPressed();
|
||||
|
@ -1,54 +0,0 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
import io.rong.common.RLog;
|
||||
import io.rong.imkit.config.ConversationListBehaviorListener;
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
import io.rong.imkit.conversationlist.ConversationListFragment;
|
||||
import io.rong.imkit.conversationlist.model.BaseUiConversation;
|
||||
import io.rong.imkit.conversationlist.model.GatheredConversation;
|
||||
import io.rong.imkit.utils.RouteUtils;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
|
||||
/**
|
||||
* 会话界面需要配置参数,复写onItemClick给view这是bundle的tag,在会话界面可以获取该bundle
|
||||
*/
|
||||
public class MyConversationListFragment extends ConversationListFragment {
|
||||
private final String TAG = ConversationListFragment.class.getSimpleName();
|
||||
private Bundle bundle=new Bundle();
|
||||
|
||||
public void setBundle(Bundle bundle) {
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, ViewHolder holder, int position) {
|
||||
if (position >= 0) {
|
||||
BaseUiConversation baseUiConversation = (BaseUiConversation)this.mAdapter.getItem(position);
|
||||
ConversationListBehaviorListener listBehaviorListener = RongConfigCenter.conversationListConfig().getListener();
|
||||
view.setTag(bundle);
|
||||
if (listBehaviorListener != null && listBehaviorListener.onConversationClick(view.getContext(), view, baseUiConversation)) {
|
||||
RLog.d(this.TAG, "ConversationList item click event has been intercepted by App.");
|
||||
} else {
|
||||
if (baseUiConversation != null && baseUiConversation.mCore != null) {
|
||||
if (baseUiConversation instanceof GatheredConversation) {
|
||||
RouteUtils.routeToSubConversationListActivity(view.getContext(),
|
||||
((GatheredConversation)baseUiConversation).mGatheredType,
|
||||
baseUiConversation.mCore.getConversationTitle());
|
||||
} else {
|
||||
RouteUtils.routeToConversationActivity(view.getContext(),
|
||||
baseUiConversation.mCore.getConversationType(),
|
||||
baseUiConversation.mCore.getTargetId(),bundle);
|
||||
}
|
||||
} else {
|
||||
RLog.e(this.TAG, "invalid conversation.");
|
||||
}
|
||||
|
||||
}
|
||||
view.setTag(null);
|
||||
}
|
||||
}
|
||||
}
|
@ -126,6 +126,24 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.REPORT));
|
||||
dismiss();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.popular), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setBean(anchorBean)
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.POPULAR));
|
||||
dismiss();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.system_notice), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setBean(anchorBean)
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.NOTICE));
|
||||
dismiss();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.online), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setBean(anchorBean)
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.ONLINE));
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,7 +114,10 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
ACTIVITY_CENTER(13, "活動中心"),
|
||||
LIVE_ROOM_EXCEPTION(14, "直播间异常"),
|
||||
REFRESH_THE_LIVEl_PAGE(15, "刷新直播页面"),
|
||||
REPORT(16, "舉報");
|
||||
REPORT(16, "舉報"),
|
||||
POPULAR(17, "人气票任务"),
|
||||
NOTICE(18, "系统通知"),
|
||||
ONLINE(19, "在线客服");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
@ -901,7 +901,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
params1.bottomMargin = 0;
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
});
|
||||
|
||||
// mBanner2.setVisibility(View.GONE);
|
||||
if (fastMsgRecyclerView.getVisibility() == View.GONE) {
|
||||
params1.bottomMargin = 0;
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
@ -1770,7 +1770,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
RongIMClient.getInstance().getConversationListByPage(new RongIMClient.ResultCallback<List<Conversation>>() {
|
||||
@Override
|
||||
public void onSuccess(List<Conversation> conversations) {
|
||||
if(!conversations.isEmpty()){
|
||||
if(conversations!=null&&!conversations.isEmpty()){
|
||||
Conversation conversation = conversations.get(0);
|
||||
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId());
|
||||
if(userInfo!=null){
|
||||
|
Loading…
Reference in New Issue
Block a user