修改测试问题,shouye ytuijian
This commit is contained in:
parent
7bb3f2d5f7
commit
5b47d0b930
@ -19,7 +19,6 @@ import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.SystemMessageActivity;
|
||||
import com.yunbao.live.bean.ImUserBean;
|
||||
|
@ -115,8 +115,14 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
} else {
|
||||
changeBatchUser.setVisibility(View.GONE);
|
||||
}
|
||||
if (data.getList().size()>2){
|
||||
listShow.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
listShow.setVisibility(View.GONE);
|
||||
//组装搜索历史数据
|
||||
adapter.showData(data.getList());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -327,8 +333,15 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
public void onError(String error) {
|
||||
|
||||
RouteUtil.forwardUserHome(mContext, String.valueOf(event.getModel().getId()), 0);
|
||||
if (mContext instanceof LiveAnchorActivity) {
|
||||
((LiveAnchorActivity) mContext).superBackPressed();
|
||||
} else if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity) mContext).exitLiveRoom();
|
||||
} else if (mContext instanceof LiveRyAnchorActivity) {
|
||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_conversation_portrait"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="54dp"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<ImageView
|
||||
|
@ -19,7 +19,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -421,7 +420,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel data) {
|
||||
if (data.getListShow() == 1) {
|
||||
if (data.getListShow() == 1 && data.getList().size() > 2) {
|
||||
floatBanner.setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
|
||||
floatBanner.showBanner(data.getList());
|
||||
@ -1145,6 +1144,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) floatBanner.getLayoutParams();
|
||||
lp.bottomMargin = DpUtil.dp2px(50);
|
||||
floatBanner.setLayoutParams(lp);
|
||||
RelativeLayout.LayoutParams lp2 = (RelativeLayout.LayoutParams) findViewById(R.id.banner_click).getLayoutParams();
|
||||
lp2.bottomMargin = DpUtil.dp2px(50);
|
||||
findViewById(R.id.banner_click).setLayoutParams(lp2);
|
||||
waitingTip.setVisibility(View.VISIBLE);
|
||||
//跳转消息中心
|
||||
waitingTip.setOnClickListener(new View.OnClickListener() {
|
||||
@ -1161,8 +1163,21 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) floatBanner.getLayoutParams();
|
||||
lp.bottomMargin = DpUtil.dp2px(10);
|
||||
floatBanner.setLayoutParams(lp);
|
||||
RelativeLayout.LayoutParams lp2 = (RelativeLayout.LayoutParams) findViewById(R.id.banner_click).getLayoutParams();
|
||||
lp2.bottomMargin = DpUtil.dp2px(10);
|
||||
findViewById(R.id.banner_click).setLayoutParams(lp2);
|
||||
waitingTip.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新首页推荐位
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onAnchorRecommendModel(AnchorRecommendModel event) {
|
||||
initAnchorRecommendBanner();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
ToastUtil.show(R.string.following);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,14 +1,16 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import android.util.Log;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@ -93,7 +95,7 @@ public class MainHomeFollLiveViewHolder extends AbsMainHomeChildViewHolder imple
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<LiveBean> list, int count) {
|
||||
|
||||
EventBus.getDefault().post(new AnchorRecommendModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -124,9 +126,6 @@ public class MainHomeFollLiveViewHolder extends AbsMainHomeChildViewHolder imple
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemClick(LiveBean bean, int position) {
|
||||
if ("1".equals(bean.getIslive())) {
|
||||
|
@ -21,6 +21,7 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.LiveClassBean;
|
||||
@ -219,6 +220,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
LiveStorge.getInstance().put(Constants.LIVE_HOME, list);
|
||||
}
|
||||
showBanner();
|
||||
EventBus.getDefault().post(new AnchorRecommendModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@ -99,7 +100,7 @@ public class MainHomeRecomLiveViewHolder extends AbsMainHomeChildViewHolder impl
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<LiveBean> list, int count) {
|
||||
|
||||
EventBus.getDefault().post(new AnchorRecommendModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -12,6 +12,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
@ -58,6 +59,10 @@ public class SearchResultsViewHolder extends RecyclerView.ViewHolder {
|
||||
public void showData(SearchModel model, int type, String searchKey) {
|
||||
this.model = model;
|
||||
ImgLoader.displayAvatar(itemView.getContext(), model.getAvatar(), avatar);
|
||||
Glide.with(itemView.getContext())
|
||||
.asGif()
|
||||
.load(R.mipmap.icon_user_home_living).skipMemoryCache(false)
|
||||
.into(isLive);
|
||||
//用戶直接隱藏
|
||||
if (type == 3) {
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(Integer.parseInt(model.getLevel()));
|
||||
|
Loading…
Reference in New Issue
Block a user