修改测试问题,shouye ytuijian

This commit is contained in:
18401019693 2022-08-10 16:21:38 +08:00
parent 7bb3f2d5f7
commit 5b47d0b930
9 changed files with 60 additions and 25 deletions

View File

@ -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;

View File

@ -115,8 +115,14 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
} else {
changeBatchUser.setVisibility(View.GONE);
}
//组装搜索历史数据
adapter.showData(data.getList());
if (data.getList().size()>2){
listShow.setVisibility(View.VISIBLE);
}else {
listShow.setVisibility(View.GONE);
//组装搜索历史数据
adapter.showData(data.getList());
}
}
@ -327,7 +333,14 @@ 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();
}
}
});

View File

@ -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

View File

@ -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;
@ -403,13 +402,13 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
});
//选中监听
mTabButtonGroup.addTabButtonGroupChangeListener((view, index) -> {
if (index==0){
floatBanner.setVisibility(View.VISIBLE);
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
}else {
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
}
if (index == 0) {
floatBanner.setVisibility(View.VISIBLE);
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
} else {
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
}
});
}
@ -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());
@ -1055,10 +1054,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
} else {
mViewPager.setCurrentItem(event.getPage());
mTabButtonGroup.setCurPosition(event.getPage());
if (event.getPage()==0){
if (event.getPage() == 0) {
floatBanner.setVisibility(View.VISIBLE);
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
}else {
} else {
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
}
@ -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();
}
}

View File

@ -56,6 +56,7 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
}
}
notifyDataSetChanged();
ToastUtil.show(R.string.following);
}
@Override

View File

@ -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,18 +126,15 @@ public class MainHomeFollLiveViewHolder extends AbsMainHomeChildViewHolder imple
}
@Override
public void onItemClick(LiveBean bean, int position) {
if ("1".equals(bean.getIslive())) {
watchLive(bean, Constants.LIVE_HOME, position);
}else if(bean.getIs_week()!=null&&bean.getIs_week().equals("1")){
String url = CommonAppConfig.HOST + bean.getUrl()+"?a=1";
} else if (bean.getIs_week() != null && bean.getIs_week().equals("1")) {
String url = CommonAppConfig.HOST + bean.getUrl() + "?a=1";
WeekWebViewActivity.forward(mContext, url, true);
} else {
RouteUtil.forwardUserHome(mContext, bean.getUid(),0);
RouteUtil.forwardUserHome(mContext, bean.getUid(), 0);
}
}

View File

@ -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

View File

@ -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

View File

@ -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()));