封版羽声,作为最后的基础版
@@ -8,6 +8,7 @@ import android.view.View;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.modulevoice.R;
|
||||
@@ -24,8 +25,10 @@ import com.google.android.flexbox.FlexboxLayoutManager;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.RecordSection;
|
||||
import com.qxcm.moduleutil.bean.RoomResultResp;
|
||||
import com.qxcm.moduleutil.bean.RoomSearchResp;
|
||||
import com.qxcm.moduleutil.bean.SearchResp;
|
||||
import com.qxcm.moduleutil.bean.UserResultResp;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommonDialog;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -34,11 +37,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* 搜索页面
|
||||
* 搜索页面
|
||||
*/
|
||||
public class SearchActivity extends BaseMvpActivity<SearchPresenter, ActivitySearchBinding> implements SearchContacts.View, CommonDialog.OnClickListener {
|
||||
private String keyWord;
|
||||
private List<RoomResultResp.RoomResultInfo> roomResultInfoList = new ArrayList<>();
|
||||
private List<RoomSearchResp> roomResultInfoList = new ArrayList<>();
|
||||
|
||||
|
||||
private SearchHistoryAdapter mSearchHistoryAdapter;
|
||||
@@ -73,7 +76,7 @@ public class SearchActivity extends BaseMvpActivity<SearchPresenter, ActivitySea
|
||||
mBinding.recycleViewUser.setAdapter(mSearchUserResultAdapter = new SearchUserResultAdapter());
|
||||
//搜索到房间信息
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2);
|
||||
mBinding.recycleViewRoom.setLayoutManager(new LinearLayoutManager(this));
|
||||
mBinding.recycleViewRoom.setLayoutManager(gridLayoutManager);
|
||||
mBinding.recycleViewRoom.setAdapter(mSearchRoomResultAdapter = new SearchRoomResultAdapter());
|
||||
|
||||
mBinding.editQuery.addTextChangedListener(new TextWatcher() {
|
||||
@@ -103,6 +106,7 @@ public class SearchActivity extends BaseMvpActivity<SearchPresenter, ActivitySea
|
||||
mBinding.llHistory.setVisibility(View.GONE);
|
||||
MvpPre.getSearchHistory();
|
||||
MvpPre.fuzzyQuery(keyWord);
|
||||
MvpPre.search(keyWord, "2");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -113,7 +117,7 @@ public class SearchActivity extends BaseMvpActivity<SearchPresenter, ActivitySea
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
MvpPre.saveSearchHistory(mSearchRecordAdapter.getItem(position).t);
|
||||
MvpPre.search(mSearchRecordAdapter.getItem(position).t);
|
||||
MvpPre.search(mSearchRecordAdapter.getItem(position).t, "2");
|
||||
}
|
||||
});
|
||||
//搜索历史点击
|
||||
@@ -150,9 +154,9 @@ public class SearchActivity extends BaseMvpActivity<SearchPresenter, ActivitySea
|
||||
mSearchRoomResultAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
RoomResultResp.RoomResultInfo item = mSearchRoomResultAdapter.getItem(position);
|
||||
RoomSearchResp item = mSearchRoomResultAdapter.getItem(position);
|
||||
if (item != null) {
|
||||
// ARouter.getInstance().build(ARouteConstants.LIVE_ROOM).withString("form","搜索界面").withString("roomId", item.getRoom_id()).navigation();
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "搜索界面").withString("roomId", item.getId()).navigation();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -206,41 +210,41 @@ public class SearchActivity extends BaseMvpActivity<SearchPresenter, ActivitySea
|
||||
* @param data
|
||||
*/
|
||||
@Override
|
||||
public void setSearch(SearchResp data) {
|
||||
public void setSearch(List<RoomSearchResp> data) {
|
||||
mBinding.recycleViewRecord.setVisibility(View.GONE);
|
||||
mBinding.llHistory.setVisibility(View.GONE);
|
||||
mBinding.rlResult.setVisibility(View.VISIBLE);
|
||||
RoomResultResp room_result = data.getRoom_result();
|
||||
List<UserResultResp> user_result = data.getUser_result();
|
||||
if (room_result.getCount() == 0 && (user_result == null || user_result.size() == 0)) {
|
||||
if (data == null || data.size() == 0) {
|
||||
mBinding.rlNull.setVisibility(View.VISIBLE);
|
||||
mBinding.nestedscrollview.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.rlNull.setVisibility(View.GONE);
|
||||
mBinding.nestedscrollview.setVisibility(View.VISIBLE);
|
||||
if (room_result.getCount() == 0) {
|
||||
if (data.size() == 0) {
|
||||
mBinding.recycleViewRoom.setVisibility(View.GONE);
|
||||
mBinding.rlRoom.setVisibility(View.GONE);
|
||||
} else {
|
||||
roomResultInfoList = room_result.getList();
|
||||
// roomResultInfoList = room_result.getList();
|
||||
mBinding.recycleViewRoom.setVisibility(View.VISIBLE);
|
||||
mBinding.rlRoom.setVisibility(View.VISIBLE);
|
||||
if (room_result.getList().size() > 2) {
|
||||
mSearchRoomResultAdapter.setNewData(room_result.getList().subList(0, 2));
|
||||
if (data.size() > 2) {
|
||||
mSearchRoomResultAdapter.setNewData(data.subList(0, 2));
|
||||
} else {
|
||||
mSearchRoomResultAdapter.setNewData(room_result.getList());
|
||||
mSearchRoomResultAdapter.setNewData(data);
|
||||
}
|
||||
mBinding.tvRoomCount.setText("全部 " + room_result.getCount());
|
||||
}
|
||||
if (user_result != null && user_result.size() != 0) {
|
||||
mBinding.rlUser.setVisibility(View.VISIBLE);
|
||||
mBinding.recycleViewUser.setVisibility(View.VISIBLE);
|
||||
mSearchUserResultAdapter.setNewData(user_result);
|
||||
} else {
|
||||
mBinding.rlUser.setVisibility(View.GONE);
|
||||
mBinding.recycleViewUser.setVisibility(View.GONE);
|
||||
mBinding.tvRoomCount.setText("全部 " + data.size());
|
||||
}
|
||||
// if (user_result != null && user_result.size() != 0) {
|
||||
// mBinding.rlUser.setVisibility(View.VISIBLE);
|
||||
// mBinding.recycleViewUser.setVisibility(View.VISIBLE);
|
||||
// mSearchUserResultAdapter.setNewData(user_result);
|
||||
// } else {
|
||||
mBinding.rlUser.setVisibility(View.GONE);
|
||||
mBinding.recycleViewUser.setVisibility(View.GONE);
|
||||
// }
|
||||
}
|
||||
mSearchRoomResultAdapter.setNewData(data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.lihang.ShadowLayout;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.PlaceholderBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.StringUtil;
|
||||
import com.qxcm.moduleutil.widget.BeautifulNameView;
|
||||
import com.qxcm.moduleutil.widget.CommonEmptyView;
|
||||
import com.qxcm.moduleutil.widget.GifAvatarOvalView;
|
||||
@@ -162,7 +163,7 @@ public class PlaceholderFragment extends BaseMvpFragment<PlaceholderPresenter, F
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, PlaceholderBean.ListsBean item) {
|
||||
helper.setText(R.id.tv_charm, item.getTotal());
|
||||
helper.setText(R.id.tv_charm, StringUtil.toWan2(item.getTotal(),1));
|
||||
RelativeLayout rl = helper.getView(R.id.r_3_2);
|
||||
if (index == 0) {
|
||||
rl.setVisibility(View.GONE);
|
||||
@@ -283,7 +284,7 @@ public class PlaceholderFragment extends BaseMvpFragment<PlaceholderPresenter, F
|
||||
TextView tvRankState = mBinding.includeTopBar.tvRankState;
|
||||
TextView tvRankNo = mBinding.includeTopBar.tvRankNo;
|
||||
|
||||
tvCharm.setText(data.getTotal());
|
||||
tvCharm.setText(StringUtil.toWan2(data.getTotal(),1));
|
||||
if (data.getRank().equals("-1")) {
|
||||
tvRankState.setText("暂未上榜");
|
||||
tvRankNo.setText(new SpanUtils().append("距上榜差 ").append(data.getDiff() + "").setBold().setForegroundColor(Color.parseColor("#FFFF8ACC")).setFontSize(12, true).create());
|
||||
@@ -329,7 +330,7 @@ public class PlaceholderFragment extends BaseMvpFragment<PlaceholderPresenter, F
|
||||
ivOneCp2Hhead.setImageResource(0); // 设置默认图片资源
|
||||
return;
|
||||
}
|
||||
tvXing1.setText(data.getTotal());
|
||||
tvXing1.setText(StringUtil.toWan2(data.getTotal(),1));
|
||||
tvXing1.setBackgroundResource(type.equals("4") ? com.qxcm.moduleutil.R.mipmap.bangdan3 :com.qxcm.moduleutil.R.mipmap.bangdan4);
|
||||
if (type.equals("0")) {
|
||||
tvUsername1.setText(data.getRoom_name());
|
||||
@@ -382,7 +383,7 @@ public class PlaceholderFragment extends BaseMvpFragment<PlaceholderPresenter, F
|
||||
ivOneCp2Hhead.setImageResource(0); // 设置默认图片资源
|
||||
return;
|
||||
}
|
||||
tvXing2.setText(data.getTotal());
|
||||
tvXing2.setText(StringUtil.toWan2(data.getTotal(),1));
|
||||
tvXing2.setBackgroundResource(type.equals("4") ? com.qxcm.moduleutil.R.mipmap.bangdan3 :com.qxcm.moduleutil.R.mipmap.bangdan4);
|
||||
if (type.equals("0")) {
|
||||
tvUsername2.setText(data.getRoom_name());
|
||||
@@ -434,7 +435,7 @@ public class PlaceholderFragment extends BaseMvpFragment<PlaceholderPresenter, F
|
||||
ivOneCp2Hhead.setImageResource(0); // 设置默认图片资源
|
||||
return;
|
||||
}
|
||||
tvXing3.setText(data.getTotal());
|
||||
tvXing3.setText(StringUtil.toWan2(data.getTotal(),1));
|
||||
tvXing3.setBackgroundResource(type.equals("4") ? com.qxcm.moduleutil.R.mipmap.bangdan3 :com.qxcm.moduleutil.R.mipmap.bangdan4);
|
||||
if (type.equals("0")) {
|
||||
tvUsername3.setText(data.getRoom_name());
|
||||
|
||||
@@ -52,7 +52,7 @@ public class HotAdapter extends BaseMultiItemQuickAdapter<TopRoom, BaseViewHolde
|
||||
}else {
|
||||
iv.setVisibility(GONE);
|
||||
}
|
||||
helper.setText(R.id.tv_num, item.getHot_value());
|
||||
helper.setText(R.id.tv_num, formatHotValue(Integer.parseInt(item.getHot_value())));
|
||||
ImageUtils.loadHeadCC(item.getLabel_icon(), helper.getView(R.id.iv_type));
|
||||
|
||||
helper.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -67,6 +67,14 @@ public class HotAdapter extends BaseMultiItemQuickAdapter<TopRoom, BaseViewHolde
|
||||
|
||||
}
|
||||
|
||||
private String formatHotValue(int hotValue) {
|
||||
if (hotValue > 10000) {
|
||||
return String.format("%.1fw", hotValue / 10000.0);
|
||||
} else {
|
||||
return String.valueOf(hotValue);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRecycled(@NonNull BaseViewHolder holder) {
|
||||
Logger.e("onViewRecycled", "onViewRecycled");
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
package com.example.modulevoice.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import static android.view.View.GONE;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevoice.R;
|
||||
import com.qxcm.moduleutil.bean.RoomResultResp;
|
||||
import com.qxcm.moduleutil.bean.RoomSearchResp;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
/**
|
||||
* 搜索房间结果
|
||||
*/
|
||||
public class SearchRoomResultAdapter extends BaseQuickAdapter<RoomResultResp.RoomResultInfo, BaseViewHolder> {
|
||||
public class SearchRoomResultAdapter extends BaseQuickAdapter<RoomSearchResp, BaseViewHolder> {
|
||||
|
||||
|
||||
public SearchRoomResultAdapter() {
|
||||
@@ -19,23 +26,33 @@ public class SearchRoomResultAdapter extends BaseQuickAdapter<RoomResultResp.Roo
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, RoomResultResp.RoomResultInfo item) {
|
||||
helper.setText(R.id.tv_anchor, item.getNickname());
|
||||
helper.setText(R.id.tv_popularity, item.getPopularity());
|
||||
helper.setText(R.id.tv_room_name, item.getRoom_name());
|
||||
helper.setText(R.id.tv_room_id,String.format("ID:%s",item.getRoom_id()));
|
||||
if (TextUtils.isEmpty(item.getLabel_icon())) {
|
||||
helper.setGone(R.id.iv_room_labe, false);
|
||||
} else {
|
||||
helper.setGone(R.id.iv_room_labe, true);
|
||||
ImageUtils.loadImageView(item.getLabel_icon(), helper.getView(R.id.iv_room_labe));
|
||||
}
|
||||
ImageUtils.loadHeadCC(item.getCover_picture(), helper.getView(R.id.riv_room_cover));
|
||||
if (item.getLocked() == 1) {
|
||||
helper.setVisible(R.id.riv_room_lock, true);
|
||||
} else {
|
||||
helper.setVisible(R.id.riv_room_lock, false);
|
||||
}
|
||||
}
|
||||
protected void convert(BaseViewHolder helper,RoomSearchResp item) {
|
||||
ImageUtils.loadHeadCC(item.getPicture(), helper.getView(R.id.iv_follow_bg));
|
||||
helper.setText(R.id.tv_name, item.getName());
|
||||
ImageView iv = helper.getView(R.id.iv_play);
|
||||
// if (item.getIcon()!=null && item.getIcon().size() > 0) {
|
||||
// iv.setVisibility(View.VISIBLE);
|
||||
// ImageUtils.loadRes(com.qxcm.moduleutil.R.drawable.voice_play, iv);
|
||||
// }else {
|
||||
iv.setVisibility(GONE);
|
||||
// }
|
||||
helper.setText(R.id.tv_num, formatHotValue(Integer.parseInt(item.getHot_value())));
|
||||
ImageUtils.loadHeadCC(item.getLabel_icon(), helper.getView(R.id.iv_type));
|
||||
|
||||
helper.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(ARouteConstants.LIVE_ROOM).withString("form","首页热门列表").withString("roomId", item.getId()).navigation();
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页热门列表").withString("roomId", item.getId()).navigation();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
private String formatHotValue(int hotValue) {
|
||||
if (hotValue > 10000) {
|
||||
return String.format("%.1fw", hotValue / 10000.0);
|
||||
} else {
|
||||
return String.valueOf(hotValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.app.Activity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.RecordSection;
|
||||
import com.qxcm.moduleutil.bean.RoomSearchResp;
|
||||
import com.qxcm.moduleutil.bean.SearchResp;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,7 +16,7 @@ public final class SearchContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void setSearchHistory(List<String> data);
|
||||
|
||||
void setSearch(SearchResp data);
|
||||
void setSearch(List<RoomSearchResp> data);
|
||||
|
||||
void setFuzzyQuery(List<RecordSection> data);
|
||||
|
||||
@@ -31,7 +32,7 @@ public final class SearchContacts {
|
||||
|
||||
void deleteSearchHistory();
|
||||
|
||||
void search(String keyWord);
|
||||
void search(String keyWord,String type);
|
||||
|
||||
void fuzzyQuery(String keyWord);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.FirstChargeBean;
|
||||
|
||||
|
||||
public final class VoiceContacts {
|
||||
@@ -12,13 +13,13 @@ public final class VoiceContacts {
|
||||
// void setBanners(List<BannerResp> list);
|
||||
|
||||
void hideRecommend(boolean hideRecommend,boolean hideGame);
|
||||
// void myInfoSuccess(MyInfoResp data);
|
||||
|
||||
}
|
||||
|
||||
public interface IIndexPre extends IPresenter {
|
||||
|
||||
void getBanners();
|
||||
void getMyInfo();
|
||||
|
||||
void getNameAuthResult(int type);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,13 @@ public class HotListFragment extends BaseMvpFragment<HotListPresenter, FragmentH
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.getRoomList(2, "1", "10", "1", label_id);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MvpPre.getRoomList(2, "1", "20", "1", label_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,14 +96,14 @@ public class HotListFragment extends BaseMvpFragment<HotListPresenter, FragmentH
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getRoomList(2, page+"", "10", "1", label_id);
|
||||
MvpPre.getRoomList(2, page+"", "20", "1", label_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getRoomList(2, page+"", "10", "1", label_id);
|
||||
MvpPre.getRoomList(2, page+"", "20", "1", label_id);
|
||||
}
|
||||
});
|
||||
mAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@@ -119,14 +125,22 @@ public class HotListFragment extends BaseMvpFragment<HotListPresenter, FragmentH
|
||||
|
||||
@Override
|
||||
public void roomList(List<TopRoom> data, int type) {
|
||||
if (data!=null) {
|
||||
mAdapter.setNewData(data);
|
||||
if (data!= null && data.size() > 0) {
|
||||
if (page==1) {
|
||||
mAdapter.setNewData(data);
|
||||
}else {
|
||||
mAdapter.setNewData(data);
|
||||
}
|
||||
}
|
||||
// }else {
|
||||
// mAdapter.addData(data);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishRefreshLoadMore() {
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
mBinding.smartRefreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,8 +7,10 @@ import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -23,6 +25,8 @@ import com.example.modulevoice.adapter.CarouselBannerAdapter;
|
||||
import com.example.modulevoice.contacts.VoiceCategoryContacts;
|
||||
import com.example.modulevoice.databinding.FragmentVoiceCategoryBinding;
|
||||
import com.example.modulevoice.presenter.VoiceCategoryPresenter;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.BannerModel;
|
||||
@@ -42,6 +46,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 声播
|
||||
@@ -231,9 +236,37 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
||||
|
||||
@Override
|
||||
public void setCategories(List<RoomTypeModel> list) {
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list));
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
// adapter = new MyFragmentPagerAdapter(getChildFragmentManager(), list);
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getActivity(), list));
|
||||
// mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
// mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
|
||||
// 设置 TabLayout 与 ViewPager2 的关联
|
||||
new TabLayoutMediator(mBinding.slidingTabLayout, mBinding.viewPager,
|
||||
(tab, position) -> tab.setText(list.get(position).getLabel_name()) // 设置标签文本
|
||||
).attach();
|
||||
|
||||
mBinding.slidingTabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@Override
|
||||
public void onTabSelected(TabLayout.Tab tab) {
|
||||
int position = tab.getPosition();
|
||||
RoomTypeModel roomTypeModel = list.get(position);
|
||||
String categoryId = roomTypeModel.getId();
|
||||
// 通知对应的Fragment更新数据
|
||||
HotListFragment.newInstance(categoryId, TYPE_INDEX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(TabLayout.Tab tab) {
|
||||
}
|
||||
});
|
||||
|
||||
// 设置默认选中的标签
|
||||
mBinding.slidingTabLayout.selectTab(mBinding.slidingTabLayout.getTabAt(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -264,32 +297,49 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
private static class MyFragmentPagerAdapter extends FragmentStateAdapter {
|
||||
|
||||
private List<RoomTypeModel> list;
|
||||
|
||||
|
||||
public MyFragmentPagerAdapter(FragmentManager fm, List<RoomTypeModel> list) {
|
||||
super(fm);
|
||||
// public MyFragmentPagerAdapter(FragmentManager fm, List<RoomTypeModel> list) {
|
||||
// super(fm);
|
||||
// this.list = list;
|
||||
// }
|
||||
public MyFragmentPagerAdapter(@NonNull FragmentActivity fragmentActivity, List<RoomTypeModel> list) {
|
||||
super(fragmentActivity);
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
RoomTypeModel model = list.get(position);
|
||||
return HotListFragment.newInstance(model.getId(), TYPE_INDEX);
|
||||
public Fragment createFragment(int position) {
|
||||
RoomTypeModel roomTypeModel = list.get(position);
|
||||
String categoryId = roomTypeModel.getId();
|
||||
return HotListFragment.newInstance(categoryId, TYPE_INDEX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
RoomTypeModel model = list.get(position);
|
||||
return model.getLabel_name();
|
||||
}
|
||||
// @Override
|
||||
// public Fragment getItem(int position) {
|
||||
// RoomTypeModel model = list.get(position);
|
||||
// return HotListFragment.newInstance(model.getId(), TYPE_INDEX);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getCount() {
|
||||
// return list.size();
|
||||
// }
|
||||
//
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public CharSequence getPageTitle(int position) {
|
||||
// RoomTypeModel model = list.get(position);
|
||||
// return model.getLabel_name();
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.example.modulevoice.fragment;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -12,7 +13,10 @@ import com.example.modulevoice.databinding.FragmentVoiceBinding;
|
||||
import com.example.modulevoice.presenter.VoicePresenter;
|
||||
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.FirstChargeBean;
|
||||
import com.qxcm.moduleutil.dialog.HeavenGiftDialog;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -27,8 +31,14 @@ public class VoiceFragment extends BaseMvpFragment<VoicePresenter, FragmentVoice
|
||||
|
||||
@Override
|
||||
protected void initData () {
|
||||
MvpPre.getConfig();
|
||||
MvpPre.getMyInfo();
|
||||
MvpPre.getConfig();//
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,6 +150,8 @@ public class VoiceFragment extends BaseMvpFragment<VoicePresenter, FragmentVoice
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// @Override
|
||||
// public void myInfoSuccess (MyInfoResp data){
|
||||
// this.mMyInfoResp = data;
|
||||
|
||||
@@ -30,8 +30,8 @@ public class HotListPresenter extends BasePresenter<HotListContacts.View> implem
|
||||
public void getRoomList(int type, String page, String page_limit, String is_top, String label_id) {
|
||||
Type listType = new TypeToken<List<TopRoom>>() {}.getType();
|
||||
List<TopRoom> restoredRoomModels = GsonUtils.getGSON().fromJson(SpUtil.getTopRoom(), listType);
|
||||
if (restoredRoomModels!= null && restoredRoomModels.size() > 0) {
|
||||
MvpRef.get().roomList(restoredRoomModels, type);
|
||||
if (restoredRoomModels!= null && restoredRoomModels.size() > 0 ) {
|
||||
// MvpRef.get().roomList(restoredRoomModels, type);
|
||||
}
|
||||
api.getTopRooms(page+"",page_limit,is_top,label_id,new BaseObserver<List<TopRoom>>() {
|
||||
@Override
|
||||
@@ -47,11 +47,13 @@ public class HotListPresenter extends BasePresenter<HotListContacts.View> implem
|
||||
HotListContacts.View view = MvpRef.get();
|
||||
if (view != null) {
|
||||
if (topRooms != null) {
|
||||
SpUtil.setTopRoom("");
|
||||
SpUtil.setTopRoom(GsonUtils.getGSON().toJson(topRooms));
|
||||
view.roomList(topRooms, type);
|
||||
} else {
|
||||
view.roomList(new ArrayList<>(), type);
|
||||
}
|
||||
view.finishRefreshLoadMore();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,6 +5,9 @@ import android.content.Context;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.example.modulevoice.contacts.SearchContacts;
|
||||
import com.qxcm.moduleutil.bean.RoomSearchResp;
|
||||
import com.qxcm.moduleutil.bean.SearchResp;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
@@ -46,25 +49,21 @@ public class SearchPresenter extends BasePresenter<SearchContacts.View> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void search(String keyWord) {
|
||||
public void search(String keyWord,String type) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A020301, "send_value", keyWord);
|
||||
// MvpRef.get().showLoadings();
|
||||
// ApiClient.getInstance().getSearch(keyWord, new BaseObserver<SearchResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(SearchResp searchResp) {
|
||||
// MvpRef.get().setSearch(searchResp);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
api.getSearch(keyWord,type, new BaseObserver<List<RoomSearchResp>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<RoomSearchResp> searchResps) {
|
||||
MvpRef.get().setSearch(searchResps);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,10 +3,14 @@ package com.example.modulevoice.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulevoice.contacts.VoiceContacts;
|
||||
import com.qxcm.moduleutil.bean.FirstChargeBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class VoicePresenter extends BasePresenter<VoiceContacts.View> implements VoiceContacts.IIndexPre {
|
||||
|
||||
public VoicePresenter(VoiceContacts.View view, Context context) {
|
||||
@@ -34,25 +38,7 @@ public class VoicePresenter extends BasePresenter<VoiceContacts.View> implements
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getMyInfo() {
|
||||
// ApiClient.getInstance().getMyInfo(new com.qpyy.libcommon.http.BaseObserver<MyInfoResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(MyInfoResp myInfoResp) {
|
||||
// MvpRef.get().myInfoSuccess(myInfoResp);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
public void getConfig() {
|
||||
// api.appUpdate(new com.qpyy.libcommon.http.BaseObserver<AppUpdateModel>() {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="false">
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -27,10 +27,11 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_50" />
|
||||
android:paddingBottom="@dimen/dp_80" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -128,11 +128,16 @@
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@color/color_transparent" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -45,13 +45,11 @@
|
||||
android:layout_width="@dimen/dp_92"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ll"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ll"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@drawable/group"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,123 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rl_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:background="@drawable/index_bg_search_item"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:layout_marginLeft="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_87">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/index_bg_search_avatar"
|
||||
android:padding="@dimen/dp_5">
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/riv_room_cover"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:scaleType="center"
|
||||
app:riv_border_color="#E3E3E3"
|
||||
app:riv_border_width="@dimen/dp_1"
|
||||
app:gav_border_color="#E3E3E3"
|
||||
app:gav_border_width="@dimen/dp_1"
|
||||
app:riv_corner_radius="@dimen/dp_360"
|
||||
tools:src="@color/color_FF88CF" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/riv_room_lock"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/index_img_room_mask"
|
||||
app:riv_border_color="#E3E3E3"
|
||||
app:riv_border_width="@dimen/dp_1"
|
||||
app:gav_border_color="#E3E3E3"
|
||||
app:gav_border_width="@dimen/dp_1"
|
||||
app:riv_corner_radius="@dimen/dp_360" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_toRightOf="@+id/rl_avatar"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_FF1C1C1C"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
tools:text="房间名" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_room_labe"
|
||||
android:layout_width="@dimen/dp_37"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_toRightOf="@+id/rl_avatar"
|
||||
android:src="@mipmap/ic_user_new"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_room_name"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_toRightOf="@+id/rl_avatar"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_797979"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="gone"
|
||||
tools:text="19234" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_anchor"
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_follow_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:layout_toLeftOf="@+id/tv_popularity"
|
||||
android:drawableLeft="@mipmap/index_icon_user"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="5dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:visibility="gone"
|
||||
tools:text="主播名"></TextView>
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_corner_radius="@dimen/dp_11" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_popularity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="@dimen/dp_17"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:drawableLeft="@mipmap/index_icon_fire"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:textColor="@color/color_FF1C1C1C"
|
||||
android:textSize="@dimen/sp_11"
|
||||
tools:text="23213" />
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_r11_with"
|
||||
android:scaleType="fitCenter"
|
||||
app:riv_corner_radius="@dimen/dp_11"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_type"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:src="@mipmap/jiaoyou"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ll"
|
||||
app:layout_constraintTop_toTopOf="@+id/ll" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_34"
|
||||
android:text="烟花易冷"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_play"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/phonetic"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="烟花易冷"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_name"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_num_bg"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="@drawable/bg_r15_4d000000"
|
||||
android:gravity="center|left"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:src="@mipmap/f_h" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:gravity="center"
|
||||
android:text="99"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_num_bg"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
@@ -102,6 +102,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:gravity="center"
|
||||
android:text="99"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
android:id="@+id/riv_2"
|
||||
android:layout_width="@dimen/dp_58"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:src="@color/white"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_top2"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top2"
|
||||
@@ -94,14 +94,14 @@
|
||||
android:id="@+id/im_user2"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:src="@color/white"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@mipmap/huangg2"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
@@ -113,34 +113,37 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center|top"
|
||||
android:visibility="gone"
|
||||
|
||||
>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_second_cp1_head"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:rotation="-20"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_second_cp2_head"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_toEndOf="@+id/iv_second_cp1_head"
|
||||
android:rotation="20"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_width="@dimen/dp_98"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:src="@mipmap/cp_second"
|
||||
android:visibility="visible" />
|
||||
|
||||
@@ -228,15 +231,15 @@
|
||||
android:id="@+id/im_user1"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:src="@color/white"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im1"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_gravity="center_horizontal|top|center"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
@@ -248,33 +251,35 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center|top"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_one_cp1_head"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:rotation="-20"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_one_cp2_head"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_toEndOf="@+id/iv_one_cp1_head"
|
||||
android:rotation="20"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_width="@dimen/dp_98"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:src="@mipmap/cp_one"
|
||||
android:visibility="visible" />
|
||||
@@ -360,14 +365,14 @@
|
||||
android:id="@+id/im_user3"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:src="@color/white"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_marginStart="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@mipmap/huangg3"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
@@ -384,32 +389,33 @@
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_three_cp1_head"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:rotation="-20"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_three_cp2_head"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_toEndOf="@+id/iv_three_cp1_head"
|
||||
android:rotation="20"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_width="@dimen/dp_98"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:src="@mipmap/cp_three"
|
||||
android:visibility="visible" />
|
||||
@@ -494,7 +500,7 @@
|
||||
android:id="@+id/riv_1"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:src="@color/white"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_top1"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
@@ -876,14 +882,14 @@
|
||||
android:id="@+id/iv_my_cp1_head"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/iv_my_cp2_head"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_toEndOf="@+id/iv_my_cp1_head"
|
||||
android:src="@color/white" />
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/v_my_cp1_head"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |