1:完成挚友功能
2:添加在送特定礼物展示弹框功能 3:修改部分图片格式变成wedp 4:用户主页添加礼物墙和挚友
@@ -51,6 +51,9 @@ dependencies {
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation project(':locktableview')
|
||||
implementation libs.lifecycle.livedata.ktx
|
||||
implementation libs.lifecycle.viewmodel.ktx
|
||||
implementation libs.androidx.fragment.ktx
|
||||
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
@@ -68,5 +71,6 @@ dependencies {
|
||||
api project(':tuichat')
|
||||
api project(':BaseModule')
|
||||
|
||||
|
||||
}
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
@@ -6,6 +6,12 @@
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||
|
||||
<application android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activity.user.activity.RelationshipActivity"
|
||||
android:exported="true" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.BosomFriendActivity"
|
||||
android:exported="true" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.UserPlaylistActivity"
|
||||
android:exported="false" />
|
||||
@@ -195,16 +201,6 @@
|
||||
android:name=".service.CancelNoticeService"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
<!-- <provider-->
|
||||
<!-- android:name="androidx.core.content.FileProvider"-->
|
||||
<!-- android:authorities="${applicationId}.fileprovider"-->
|
||||
<!-- android:exported="false"-->
|
||||
<!-- android:grantUriPermissions="true">-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
|
||||
<!-- android:resource="@xml/file_paths" />-->
|
||||
<!-- </provider>-->
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -8,6 +8,9 @@ import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.ItemRequestedSongBinding;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
@@ -18,22 +21,15 @@ import java.util.List;
|
||||
/**
|
||||
* 已点歌曲列表适配器
|
||||
*/
|
||||
public class RequestedSongsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
public class RequestedSongsAdapter extends BaseQuickAdapter<SongPlaylist.SongPlaylistBean, BaseViewHolder> {
|
||||
|
||||
// 歌曲状态常量
|
||||
public static final int STATUS_PLAYING = 1; // 正在播放
|
||||
public static final int STATUS_PENDING = 2; // 等待播放
|
||||
public static final int STATUS_TOP = 3; // 置顶
|
||||
|
||||
// 列表项类型
|
||||
private static final int TYPE_NORMAL = 0; // 普通列表项
|
||||
private static final int TYPE_FOOTER = 1; // 底部加载更多项
|
||||
|
||||
private List<SongPlaylist.SongPlaylistBean> songList = new ArrayList<>();
|
||||
private boolean isShowFooter = false; // 是否显示底部加载更多
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
public RequestedSongsAdapter() {
|
||||
super(R.layout.item_requested_song);
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onPlayClick(SongPlaylist.SongPlaylistBean song, int position);
|
||||
|
||||
@@ -44,166 +40,32 @@ public class RequestedSongsAdapter extends RecyclerView.Adapter<RecyclerView.Vie
|
||||
this.onItemClickListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
// 创建普通列表项视图
|
||||
ItemRequestedSongBinding binding = ItemRequestedSongBinding.inflate(
|
||||
LayoutInflater.from(parent.getContext()), parent, false);
|
||||
return new SongViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof FooterViewHolder) {
|
||||
// 底部加载更多项,不需要处理
|
||||
return;
|
||||
}
|
||||
|
||||
if (holder instanceof SongViewHolder) {
|
||||
// 普通列表项
|
||||
SongViewHolder songHolder = (SongViewHolder) holder;
|
||||
|
||||
// 检查位置是否有效,防止索引越界
|
||||
if (position >= songList.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SongPlaylist.SongPlaylistBean song = songList.get(position);
|
||||
|
||||
// 设置歌曲信息
|
||||
songHolder.binding.tvSongName.setText(song.getSong_name());
|
||||
ImageUtils.loadHead(song.getBase_image(), songHolder.binding.ivSongCover);
|
||||
songHolder.binding.tvSinger.setText("演唱者:" + song.getSinger_nickname());
|
||||
songHolder.binding.tvRequestBos.setText("老板:" + song.getBoss_nickname());
|
||||
|
||||
// 根据位置显示不同的UI
|
||||
if (position == 0) {
|
||||
// 第一个是正在播放
|
||||
songHolder.binding.tvRequestStatus.setText("正在播放");
|
||||
songHolder.binding.tvRequestStatus.setTextColor(0xFF3ABC6D);
|
||||
songHolder.binding.tvRequestStatus.setBackgroundColor(android.graphics.Color.TRANSPARENT);
|
||||
} else {
|
||||
// 第三个以后都是置顶,文字是白色的
|
||||
songHolder.binding.tvRequestStatus.setText("置顶");
|
||||
songHolder.binding.tvRequestStatus.setTextColor(0xFFFFFFFF);
|
||||
songHolder.binding.tvRequestStatus.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r34_3abc6d);
|
||||
}
|
||||
|
||||
|
||||
// 设置tvRequestStatus的点击事件,只有置顶状态才能点击
|
||||
songHolder.binding.tvRequestStatus.setOnClickListener(v -> {
|
||||
// 只有第三个及以后的项目(position > 1)才能点击tvRequestStatus
|
||||
if (position > 1 && onItemClickListener != null) {
|
||||
onItemClickListener.onTopClick(song, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
// 如果是最后一项且需要显示底部加载更多,则返回底部类型
|
||||
if (position == songList.size() && isShowFooter) {
|
||||
return TYPE_FOOTER;
|
||||
}
|
||||
return TYPE_NORMAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
// 如果需要显示底部加载更多,则数量加1
|
||||
return songList.size() + (isShowFooter ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据歌曲对象获取状态
|
||||
*/
|
||||
private int getStatusFromSong(SongPlaylist.SongPlaylistBean song) {
|
||||
// 根据业务逻辑判断状态,这里仅作为示例
|
||||
if ("1".equals(song.getStatus())) {
|
||||
return STATUS_PLAYING;
|
||||
} else if ("0".equals(song.getStatus())) {
|
||||
return STATUS_TOP;
|
||||
protected void convert(@NonNull BaseViewHolder helper, SongPlaylist.SongPlaylistBean item) {
|
||||
helper.setText(R.id.tv_song_name, item.getSong_name());
|
||||
helper.setText(R.id.tv_singer, "演唱者:" + item.getSinger_nickname());
|
||||
helper.setText(R.id.tv_request_bos, "老板:" + item.getBoss_nickname());
|
||||
ImageUtils.loadHead(item.getBase_image(), helper.getView(R.id.iv_song_cover));
|
||||
// 根据位置显示不同的UI
|
||||
if (helper.getLayoutPosition() == 0) {
|
||||
// 第一个是正在播放
|
||||
helper.setText(R.id.tv_request_status, "正在播放");
|
||||
helper.setTextColor(R.id.tv_request_status, 0xFF3ABC6D);
|
||||
helper.setBackgroundRes(R.id.tv_request_status, android.graphics.Color.TRANSPARENT);
|
||||
} else {
|
||||
return STATUS_PENDING;
|
||||
// 第三个以后都是置顶,文字是白色的
|
||||
helper.setText(R.id.tv_request_status, "置顶");
|
||||
helper.setTextColor(R.id.tv_request_status, 0xFFFFFFFF);
|
||||
helper.setBackgroundRes(R.id.tv_request_status, com.xscm.moduleutil.R.drawable.bg_r34_3abc6d);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置歌曲列表
|
||||
*/
|
||||
public void setSongList(List<SongPlaylist.SongPlaylistBean> list) {
|
||||
if (list != null) {
|
||||
this.songList.clear();
|
||||
this.songList.addAll(list);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加歌曲列表(用于加载更多)
|
||||
*/
|
||||
public void addSongList(List<SongPlaylist.SongPlaylistBean> list) {
|
||||
if (list != null) {
|
||||
int startPos = this.songList.size();
|
||||
this.songList.addAll(list);
|
||||
notifyItemRangeInserted(startPos, list.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示或隐藏底部加载更多
|
||||
*/
|
||||
public void setShowFooter(boolean showFooter) {
|
||||
boolean wasShowing = this.isShowFooter;
|
||||
this.isShowFooter = showFooter;
|
||||
|
||||
if (wasShowing != showFooter) {
|
||||
if (showFooter) {
|
||||
notifyItemInserted(songList.size());
|
||||
} else {
|
||||
notifyItemRemoved(songList.size());
|
||||
// 设置tvRequestStatus的点击事件,只有置顶状态才能点击
|
||||
helper.getView(R.id.tv_request_status).setOnClickListener(v -> {
|
||||
// 只有第三个及以后的项目(position > 1)才能点击tvRequestStatus
|
||||
if (helper.getLayoutPosition() > 1 && onItemClickListener != null) {
|
||||
onItemClickListener.onTopClick(item, helper.getLayoutPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空列表
|
||||
*/
|
||||
public void clear() {
|
||||
this.songList.clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定位置的歌曲
|
||||
*/
|
||||
public SongPlaylist.SongPlaylistBean getItem(int position) {
|
||||
if (position >= 0 && position < songList.size()) {
|
||||
return songList.get(position);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通列表项ViewHolder
|
||||
*/
|
||||
static class SongViewHolder extends RecyclerView.ViewHolder {
|
||||
ItemRequestedSongBinding binding;
|
||||
|
||||
public SongViewHolder(@NonNull ItemRequestedSongBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部加载更多ViewHolder
|
||||
*/
|
||||
static class FooterViewHolder extends RecyclerView.ViewHolder {
|
||||
public FooterViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ public class RelationshipFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
adapter = new RelationshipAdapter();
|
||||
mBinding.rvHostList.setAdapter(adapter);
|
||||
adapter.setOnItemClickListener((RelationshipAdapter.OnItemClickListener) (view, data, position) -> {
|
||||
if (view.getId() == R.id.im_zhid) {
|
||||
if (view.getId() == R.id.icon_cp_zd) {
|
||||
queren(1, data.getId(), "");
|
||||
} else if (view.getId() == R.id.im_shanchu) {
|
||||
} else if (view.getId() == R.id.icon_cp_dele) {
|
||||
queren(2, data.getId(), data.getDelete_me_coin());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,7 +24,9 @@ import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 已点歌曲页面Fragment
|
||||
@@ -130,34 +132,57 @@ public class RequestedSongsFragment extends BaseMvpFragment<RequestSongPresenter
|
||||
|
||||
@Override
|
||||
public void singerSongList(SongPlaylist s) {
|
||||
// 这个方法似乎是处理单个歌曲的,我们可能需要另一个方法处理列表
|
||||
// 这个方法处理歌曲列表数据,并过滤重复数据
|
||||
|
||||
if (s != null &&s.getLists()!=null && s.getLists().size() > 0 ) {
|
||||
if (s != null && s.getLists() != null && s.getLists().size() > 0) {
|
||||
// 判断当前是刷新还是加载更多
|
||||
RefreshState state = mBinding.smartRefreshLayout.getState();
|
||||
|
||||
if (state == RefreshState.Refreshing) {
|
||||
// 刷新,清空列表并添加新数据
|
||||
songList.clear();
|
||||
songList.addAll(s.getLists());
|
||||
adapter.setSongList(songList);
|
||||
adapter.setNewData(songList);
|
||||
mBinding.smartRefreshLayout.finishRefresh(true);
|
||||
} else if (state == RefreshState.Loading) {
|
||||
// 加载更多,添加数据到列表
|
||||
// 加载更多,过滤重复数据后添加到列表
|
||||
if (s.getLists().size() > 0) {
|
||||
songList.addAll(s.getLists());
|
||||
adapter.addSongList(songList);
|
||||
adapter.setShowFooter(true);
|
||||
mBinding.smartRefreshLayout.finishLoadMore(true);
|
||||
// 创建一个集合存储现有歌曲的ID,用于快速查找
|
||||
Set<Integer> existingSongIds = new HashSet<>();
|
||||
for (SongPlaylist.SongPlaylistBean song : songList) {
|
||||
if (song.getId() != 0) {
|
||||
existingSongIds.add(song.getId());
|
||||
}
|
||||
}
|
||||
|
||||
// 过滤掉已存在的歌曲
|
||||
List<SongPlaylist.SongPlaylistBean> newSongs = new ArrayList<>();
|
||||
for (SongPlaylist.SongPlaylistBean song : s.getLists()) {
|
||||
if (song.getId() != 0 && !existingSongIds.contains(song.getId())) {
|
||||
newSongs.add(song);
|
||||
existingSongIds.add(song.getId()); // 添加到已存在集合中,防止本次加载的数据内部重复
|
||||
}
|
||||
}
|
||||
|
||||
// 只有当有新数据时才更新
|
||||
if (!newSongs.isEmpty()) {
|
||||
songList.addAll(newSongs);
|
||||
adapter.addData(songList);
|
||||
mBinding.smartRefreshLayout.finishLoadMore(true);
|
||||
} else {
|
||||
// 没有新数据,但不算加载失败
|
||||
mBinding.smartRefreshLayout.finishLoadMore(true);
|
||||
}
|
||||
} else {
|
||||
// 没有更多数据
|
||||
adapter.setShowFooter(false);
|
||||
// adapter.setShowFooter(false);
|
||||
mBinding.smartRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||
}
|
||||
} else {
|
||||
// 首次加载
|
||||
songList.clear();
|
||||
songList.addAll(s.getLists());
|
||||
adapter.setSongList(songList);
|
||||
adapter.setNewData(songList);
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,Fr
|
||||
private String currentTimeFilter = "today"; // 默认为今日
|
||||
private int page = 1;
|
||||
private String roomId;
|
||||
private String type="1";
|
||||
private String type="2";
|
||||
|
||||
private SongHistoryAdapter adapter;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,Fr
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterToday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "today";
|
||||
type="1";
|
||||
type="2";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
@@ -93,7 +93,7 @@ public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,Fr
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterYesterday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "yesterday";
|
||||
type="2";
|
||||
type="3";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
@@ -104,7 +104,7 @@ public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,Fr
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterThisWeek.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "this_week";
|
||||
type="3";
|
||||
type="4";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
@@ -115,7 +115,7 @@ public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,Fr
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterLastWeek.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "last_week";
|
||||
type="4";
|
||||
type="5";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
@@ -193,8 +193,9 @@ public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,Fr
|
||||
} else if (state == RefreshState.Loading) {
|
||||
// 加载更多,添加数据到列表
|
||||
if (s.getLists().size() > 0) {
|
||||
// 只添加新加载的数据,而不是整个列表
|
||||
songList.addAll(s.getLists());
|
||||
adapter.addData(songList);
|
||||
adapter.addData(s.getLists());
|
||||
mBinding.smartRefreshLayout.finishLoadMore(true);
|
||||
} else {
|
||||
// 没有更多数据
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.xscm.modulemain.activity.user.activity
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.luck.picture.lib.utils.SpUtils
|
||||
import com.xscm.modulemain.BaseMvpActivity
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.user.activity.ui.main.BosomFriendFragment
|
||||
import com.xscm.modulemain.activity.user.conacts.UserHomepageConacts
|
||||
import com.xscm.modulemain.activity.user.presenter.UserHomepagePresenter
|
||||
import com.xscm.modulemain.databinding.ActivityBosomFriendBinding
|
||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity
|
||||
import com.xscm.moduleutil.bean.CircleListBean
|
||||
import com.xscm.moduleutil.bean.RelationBean
|
||||
import com.xscm.moduleutil.bean.UserInfo
|
||||
import com.xscm.moduleutil.utils.SpUtil
|
||||
|
||||
/**
|
||||
* 挚友活动类
|
||||
* 继承自AppCompatActivity,用于展示知心好友相关界面
|
||||
*/
|
||||
class BosomFriendActivity : BaseAppCompatActivity<ActivityBosomFriendBinding>() {
|
||||
|
||||
var fragment: BosomFriendFragment?=null
|
||||
|
||||
/**
|
||||
* 活动创建时的回调方法
|
||||
* @param savedInstanceState 保存的活动状态数据
|
||||
*/
|
||||
// override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// super.onCreate(savedInstanceState) // 调用父类的onCreate方法
|
||||
// setContentView(R.layout.activity_bosom_friend) // 设置活动布局文件
|
||||
// // 检查是否有保存的实例状态,如果没有则添加BosomFriendFragment
|
||||
// if (savedInstanceState == null) {
|
||||
// supportFragmentManager.beginTransaction()
|
||||
// .replace(R.id.fl_container, BosomFriendFragment.newInstance()) // 替换容器中的Fragment
|
||||
// .commitNow() // 立即提交事务
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
override fun initData() {
|
||||
if (fragment == null) {
|
||||
fragment = BosomFriendFragment.newInstance(userId = SpUtil.getUserId().toString(),0)
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fl_container, fragment!!)
|
||||
.commitNow()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
mBinding.topBar.tvTitle.visibility= View.GONE
|
||||
mBinding.topBar.ivBack.setImageResource(R.mipmap.im_friend_back)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.activity_bosom_friend
|
||||
}
|
||||
|
||||
}
|
||||
@@ -54,9 +54,13 @@ public class BriefIntroductionActivity extends BaseMvpActivity<BriefIntroduction
|
||||
protected void convert(BaseViewHolder helper, UserTagBean item) {
|
||||
helper.setText(R.id.tv, item.getTag_name());
|
||||
if (selectedItems.contains(item)) {
|
||||
helper.itemView.setBackgroundColor(Color.parseColor("#FF8ACC"));
|
||||
// helper.itemView.setBackgroundColor(Color.parseColor("#FF8ACC"));
|
||||
helper.getView(R.id.tv).setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r48_ff8acc);
|
||||
|
||||
} else {
|
||||
helper.itemView.setBackgroundColor(Color.WHITE);
|
||||
// helper.itemView.setBackgroundColor(Color.WHITE);
|
||||
helper.itemView.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r48_ffff);
|
||||
|
||||
}
|
||||
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -318,6 +318,7 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
mBinding.tvNickName.setText(userInfo.getNickname());
|
||||
mBinding.tvSex.setText(userInfo.getSex() == 1 ? "男" : "女");
|
||||
mBinding.tvSr.setText(userInfo.getBirthday());
|
||||
mBinding.tvJj.setText(userInfo.getProfile());
|
||||
uploadedUrls.clear();
|
||||
List<String> images = userInfo.getHome_bgimages() != null && !userInfo.getHome_bgimages().isEmpty() ? Arrays.asList(userInfo.getHome_bgimages().split(",")) : new ArrayList<>();
|
||||
for (int i = 0; i < images.size(); i++) {
|
||||
|
||||
@@ -23,12 +23,15 @@ import com.xscm.moduleutil.utils.SpUtil;
|
||||
*/
|
||||
public class GiftWallActivity extends BaseMvpActivity<GiftWallPresenter, ActivityGiftWallBinding> implements GiftWallConacts.View {
|
||||
SectionsGifPagerAdapter sectionsPagerAdapter;
|
||||
private int userId;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("礼物墙");
|
||||
mBinding.topBar.setColor(getResources().getColor(R.color.white));
|
||||
MvpPre.giftWall(SpUtil.getUserId()+"");
|
||||
userId=getIntent().getIntExtra("userId",0);
|
||||
|
||||
MvpPre.giftWall(userId+"");
|
||||
}
|
||||
|
||||
// 在获取到数据后调用此方法初始化 ViewPager
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.xscm.modulemain.activity.user.activity
|
||||
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import com.blankj.utilcode.util.SnackbarUtils.dismiss
|
||||
import com.xscm.modulemain.BaseMvpActivity
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.user.conacts.UserHomepageConacts
|
||||
import com.xscm.modulemain.activity.user.presenter.UserHomepagePresenter
|
||||
import com.xscm.modulemain.adapter.RelationshipAdapter
|
||||
import com.xscm.modulemain.databinding.ActivityRelationshipBinding
|
||||
import com.xscm.moduleutil.bean.CircleListBean
|
||||
import com.xscm.moduleutil.bean.RelationBean
|
||||
import com.xscm.moduleutil.bean.RelationshipBean
|
||||
import com.xscm.moduleutil.bean.UserInfo
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog
|
||||
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2025/11/21 14:02
|
||||
* @Description 关系页面详情
|
||||
*/
|
||||
class RelationshipActivity : BaseMvpActivity<UserHomepagePresenter?, ActivityRelationshipBinding>(),
|
||||
UserHomepageConacts.View {
|
||||
var adapter :RelationshipAdapter? = null
|
||||
var relationId: Int = 0
|
||||
var userId: Int = 0
|
||||
|
||||
override fun bindPresenter(): UserHomepagePresenter? {
|
||||
return UserHomepagePresenter(this, this)
|
||||
}
|
||||
|
||||
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mBinding.topBar.tvTitle.visibility= View.GONE
|
||||
mBinding.topBar.ivBack.setImageResource(R.mipmap.im_friend_back)
|
||||
mBinding.recycleView.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this)
|
||||
adapter = RelationshipAdapter()
|
||||
mBinding.recycleView.setAdapter(adapter)
|
||||
adapter?.setOnItemClickListener(RelationshipAdapter.OnItemClickListener { view: View?, data: RelationshipBean?, position: Int ->
|
||||
if (view!!.getId() == R.id.icon_cp_zd) {
|
||||
queren(1, data!!.getId(), "")
|
||||
} else if (view.getId() == R.id.icon_cp_dele) {
|
||||
queren(2, data!!.getId(), data.getDelete_me_coin())
|
||||
}
|
||||
})
|
||||
}
|
||||
private fun queren(type: Int, id: Int, num: String?) {
|
||||
if (type == 1) {
|
||||
// 创建并显示确认对话框
|
||||
ConfirmDialog(
|
||||
this,
|
||||
"提示",
|
||||
"您确定要置顶本关系吗?",
|
||||
"确认",
|
||||
"取消",
|
||||
View.OnClickListener { v: View? ->
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre!!.topRelationCard(id.toString() + "")
|
||||
dismiss()
|
||||
},
|
||||
View.OnClickListener { v: View? -> }, false, 0
|
||||
).show()
|
||||
} else if (type == 2) {
|
||||
// 创建并显示确认对话框
|
||||
ConfirmDialog(
|
||||
this,
|
||||
"提示",
|
||||
"您确定要删除本关系吗?解除关系需要" + num + "金币",
|
||||
"确认",
|
||||
"取消",
|
||||
View.OnClickListener { v: View? ->
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre!!.deleteRelationCard(id.toString() + "")
|
||||
dismiss()
|
||||
},
|
||||
View.OnClickListener { v: View? -> }, false, 0
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
|
||||
// 获取传递过来的参数
|
||||
relationId = intent.getIntExtra("relationId", -1)
|
||||
userId = intent.getStringExtra("userId")?.toInt() ?: -1
|
||||
|
||||
// 验证参数有效性
|
||||
if (relationId != -1 && userId != -1) {
|
||||
// 请求数据
|
||||
MvpPre?.getFriendListMore( userId.toString(),relationId.toString())
|
||||
} else {
|
||||
// 处理错误情况
|
||||
Toast.makeText(this, "参数错误", Toast.LENGTH_SHORT).show()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.activity_relationship
|
||||
}
|
||||
|
||||
override fun setUserDetails(data: UserInfo?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun setCircleList(list: List<CircleListBean?>?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun userGuanzSuccess(s: String?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun setLikeZone() {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun setFriendList(data: RelationBean?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun topRelationCard(s: String?) {
|
||||
MvpPre?.getFriendListMore( userId.toString(),relationId.toString())
|
||||
}
|
||||
|
||||
override fun deleteRelationCard(s: String?) {
|
||||
MvpPre?.getFriendListMore( userId.toString(),relationId.toString())
|
||||
}
|
||||
|
||||
override fun setFriendListMore(data: List<RelationshipBean?>?) {
|
||||
if (data != null && data.isNotEmpty()) {
|
||||
mBinding.tvHeartbeat.text = data[0]?.relation_name
|
||||
|
||||
adapter?.setNewData(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,10 @@ import static android.view.View.VISIBLE;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.media.MediaCodec;
|
||||
import android.media.MediaExtractor;
|
||||
import android.media.MediaFormat;
|
||||
import android.media.MediaMuxer;
|
||||
import android.media.MediaPlayer;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Environment;
|
||||
@@ -28,13 +32,25 @@ import com.xscm.modulemain.databinding.ActivitySingerVerificationBinding;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.file.Files;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioRecord;
|
||||
import android.media.AudioTrack;
|
||||
|
||||
|
||||
/**
|
||||
* 歌手认证
|
||||
* 该Activity用于处理用户进行歌手认证的相关功能,包括录音、试听、重新录制和提交认证等操作。
|
||||
@@ -56,6 +72,11 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
private boolean isPlaying = false; // 是否正在播放
|
||||
private long recordingDuration = 0L; // 录音时长
|
||||
private Timer timer; // 计时器
|
||||
private File tempRecordingFile; // 临时录音文件(用于追加录音)
|
||||
private boolean hasRecordedBefore = false; // 是否已经录制过内容
|
||||
private boolean isAppendRecording = false; // 是否为追加录音模式
|
||||
private File mergedRecordingFile; // 合并后的录音文件
|
||||
private java.util.List<File> recordingSegments = new java.util.ArrayList<>(); // 录音片段列表
|
||||
|
||||
private int isSinger;//传递过来的参数,
|
||||
/**
|
||||
@@ -98,8 +119,16 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
if (!isRecording && !isPlaying && recordingFile == null) {
|
||||
startRecording();
|
||||
if (!isRecording && !isPlaying) {
|
||||
// 如果之前已经录制过内容,则继续录制
|
||||
if (hasRecordedBefore && recordingFile != null && recordingFile.exists()) {
|
||||
isAppendRecording = true;
|
||||
startRecording();
|
||||
} else {
|
||||
// 首次录音或重录后
|
||||
isAppendRecording = false;
|
||||
startRecording();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case MotionEvent.ACTION_UP:
|
||||
@@ -196,21 +225,43 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
// 停止可能正在播放的音频
|
||||
stopPlaying();
|
||||
|
||||
// 创建录音文件
|
||||
try {
|
||||
recordingFile = createAudioFile();
|
||||
// 创建新的录音片段文件
|
||||
File segmentFile = createAudioFile();
|
||||
recordingSegments.add(segmentFile);
|
||||
|
||||
// 设置录音参数
|
||||
mediaRecorder = new MediaRecorder();
|
||||
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
|
||||
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
|
||||
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
|
||||
mediaRecorder.setOutputFile(recordingFile.getAbsolutePath());
|
||||
mediaRecorder.prepare();
|
||||
mediaRecorder.start();
|
||||
mediaRecorder.setOutputFile(segmentFile.getAbsolutePath());
|
||||
|
||||
try {
|
||||
mediaRecorder.prepare();
|
||||
mediaRecorder.start();
|
||||
|
||||
// 如果是第一次录音,初始化录音文件
|
||||
if (!isAppendRecording) {
|
||||
recordingFile = segmentFile;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e("SingerVerification", "录音失败: " + e.getMessage());
|
||||
// 从列表中移除失败的文件
|
||||
recordingSegments.remove(segmentFile);
|
||||
throw e;
|
||||
}
|
||||
|
||||
isRecording = true;
|
||||
recordingStartTime = System.currentTimeMillis();
|
||||
recordingDuration = 0L;
|
||||
|
||||
// 保存当前录音时长,用于累加
|
||||
final long previousDuration = isAppendRecording ? recordingDuration : 0L;
|
||||
|
||||
// 如果是追加录音,保持之前的录音时长
|
||||
if (!isAppendRecording) {
|
||||
recordingDuration = 0L;
|
||||
}
|
||||
|
||||
// 启动计时器
|
||||
timer = new Timer();
|
||||
@@ -218,10 +269,11 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
@Override
|
||||
public void run() {
|
||||
if (isRecording) {
|
||||
recordingDuration = System.currentTimeMillis() - recordingStartTime;
|
||||
// 累加录音时长 = 之前的时长 + 当前片段的时长
|
||||
recordingDuration = previousDuration + (System.currentTimeMillis() - recordingStartTime);
|
||||
|
||||
// 检查是否达到最大录音时间(5分钟)
|
||||
if (recordingDuration >= 5 * 60 * 1000) {
|
||||
if (recordingDuration >= 5 * 60 * 1000) { // 修正为5分钟
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -244,7 +296,7 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
|
||||
} catch (IOException e) {
|
||||
Log.e("SingerVerification", "录音失败: " + e.getMessage());
|
||||
Toast.makeText(this, "录音失败: " + e.getMessage() + ",请重试", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "录音失败: 请重试", Toast.LENGTH_SHORT).show();
|
||||
// 重置录音状态,允许重新录制
|
||||
isRecording = false;
|
||||
if (mediaRecorder != null) {
|
||||
@@ -274,24 +326,23 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
timer = null;
|
||||
}
|
||||
|
||||
// 检查录音时长是否达到最小要求(60秒)
|
||||
if (recordingDuration < 60 * 1000) {
|
||||
Toast.makeText(this, "录音时间太短,请至少录制60秒", Toast.LENGTH_SHORT).show();
|
||||
// 删除不符合要求的录音文件
|
||||
if (recordingFile != null && recordingFile.exists()) {
|
||||
recordingFile.delete();
|
||||
recordingFile = null;
|
||||
}
|
||||
recordingDuration = 0L;
|
||||
} else {
|
||||
Toast.makeText(this, "录音完成", Toast.LENGTH_SHORT).show();
|
||||
// 处理录音片段
|
||||
if (recordingSegments.size() > 1) {
|
||||
// 如果有多个录音片段,合并它们
|
||||
mergeAudioFiles();
|
||||
} else if (recordingSegments.size() == 1) {
|
||||
// 只有一个录音片段,直接使用
|
||||
recordingFile = recordingSegments.get(0);
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
hasRecordedBefore = true;
|
||||
|
||||
updateUI();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "停止录音失败: " + e.getMessage());
|
||||
Toast.makeText(this, "停止录音失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "停止录音失败: ", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// 发生异常时重置状态,允许重新录制
|
||||
isRecording = false;
|
||||
@@ -310,19 +361,41 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
|
||||
// 开始播放
|
||||
private void startPlaying() {
|
||||
// 如果有多个录音片段,先合并它们
|
||||
if (recordingSegments.size() > 1) {
|
||||
mergeAudioFiles();
|
||||
} else if (recordingSegments.size() == 1) {
|
||||
recordingFile = recordingSegments.get(0);
|
||||
}
|
||||
|
||||
if (recordingFile == null || !recordingFile.exists()) {
|
||||
Toast.makeText(this, "没有录制的文件", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查录音时长是否达到最小要求(60秒)
|
||||
if (recordingDuration < 5 * 1000) {
|
||||
Toast.makeText(this, "录音时间太短,请至少录制60秒", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
stopRecording();
|
||||
stopPlaying(); // 确保停止之前的播放
|
||||
|
||||
// 创建新的MediaPlayer实例
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setDataSource(recordingFile.getAbsolutePath());
|
||||
mediaPlayer.prepare();
|
||||
mediaPlayer.start();
|
||||
|
||||
// 设置音频流类型
|
||||
mediaPlayer.setAudioStreamType(android.media.AudioManager.STREAM_MUSIC);
|
||||
|
||||
// 设置数据源
|
||||
mediaPlayer.setDataSource(recordingFile.getAbsolutePath());
|
||||
|
||||
// 同步准备(使用同步方式更稳定)
|
||||
mediaPlayer.prepare();
|
||||
|
||||
// 设置监听器,在播放完成时重置UI
|
||||
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
@@ -336,32 +409,53 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
}
|
||||
});
|
||||
|
||||
// 设置错误监听器
|
||||
mediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {
|
||||
@Override
|
||||
public boolean onError(MediaPlayer mp, int what, int extra) {
|
||||
Log.e("SingerVerification", "MediaPlayer错误: what=" + what + ", extra=" + extra);
|
||||
isPlaying = false;
|
||||
updateUI();
|
||||
return true; // 错误已处理
|
||||
}
|
||||
});
|
||||
|
||||
// 开始播放
|
||||
isPlaying = true;
|
||||
mediaPlayer.start();
|
||||
updateUI();
|
||||
} catch (IOException e) {
|
||||
Log.e("SingerVerification", "播放失败: " + e.getMessage());
|
||||
Toast.makeText(this, "播放失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
isPlaying = false;
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
// 停止播放
|
||||
private void stopPlaying() {
|
||||
try {
|
||||
if (isPlaying && mediaPlayer != null) {
|
||||
isPlaying = false;
|
||||
mediaPlayer.stop();
|
||||
if (mediaPlayer != null) {
|
||||
// 先检查是否正在播放
|
||||
if (mediaPlayer.isPlaying()) {
|
||||
mediaPlayer.stop();
|
||||
}
|
||||
|
||||
// 释放资源
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
|
||||
// 恢复按钮状态
|
||||
mBinding.playButton.setText("试听");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_st, 0, 0);
|
||||
|
||||
updateUI();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "停止播放失败: " + e.getMessage());
|
||||
Toast.makeText(this, "停止播放失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} finally {
|
||||
// 无论是否出错,都重置状态
|
||||
isPlaying = false;
|
||||
|
||||
// 恢复按钮状态
|
||||
mBinding.playButton.setText("试听");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_st, 0, 0);
|
||||
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,21 +463,61 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
private void reRecord() {
|
||||
stopPlaying();
|
||||
stopRecording();
|
||||
|
||||
// 删除主录音文件
|
||||
if (recordingFile != null && recordingFile.exists()) {
|
||||
recordingFile.delete();
|
||||
}
|
||||
recordingFile = null;
|
||||
|
||||
// 删除合并后的录音文件
|
||||
if (mergedRecordingFile != null && mergedRecordingFile.exists()) {
|
||||
mergedRecordingFile.delete();
|
||||
}
|
||||
mergedRecordingFile = null;
|
||||
|
||||
// 删除所有录音片段
|
||||
for (File segment : recordingSegments) {
|
||||
if (segment.exists()) {
|
||||
segment.delete();
|
||||
}
|
||||
}
|
||||
recordingSegments.clear();
|
||||
|
||||
// 删除临时录音文件
|
||||
if (tempRecordingFile != null && tempRecordingFile.exists()) {
|
||||
tempRecordingFile.delete();
|
||||
tempRecordingFile = null;
|
||||
}
|
||||
|
||||
// 重置状态
|
||||
recordingDuration = 0L;
|
||||
hasRecordedBefore = false;
|
||||
isAppendRecording = false;
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
// 提交认证
|
||||
private void submitVerification() {
|
||||
// 如果有多个录音片段,先处理它们
|
||||
if (recordingSegments.size() > 1) {
|
||||
mergeAudioFiles();
|
||||
} else if (recordingSegments.size() == 1) {
|
||||
recordingFile = recordingSegments.get(0);
|
||||
}
|
||||
|
||||
if (recordingFile == null || !recordingFile.exists()) {
|
||||
Toast.makeText(this, "请先录制音频", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查录音时长是否达到最小要求(60秒)
|
||||
if (recordingDuration < 5 * 1000) {
|
||||
Toast.makeText(this, "录音时间太短,请至少录制60秒", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
MvpPre.uploadFile(recordingFile, 3);
|
||||
}
|
||||
|
||||
@@ -400,6 +534,19 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
);
|
||||
}
|
||||
|
||||
// 创建M4A格式的合并文件
|
||||
private File createM4AFile() throws IOException {
|
||||
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date());
|
||||
String audioFileName = "MERGED_" + timeStamp + "_";
|
||||
File storageDir = getExternalFilesDir(Environment.DIRECTORY_MUSIC);
|
||||
|
||||
return File.createTempFile(
|
||||
audioFileName,
|
||||
".m4a",
|
||||
storageDir
|
||||
);
|
||||
}
|
||||
|
||||
// 更新UI
|
||||
private void updateUI() {
|
||||
|
||||
@@ -419,6 +566,222 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
return String.format(Locale.getDefault(), "%02d:%02d", minutes, seconds);
|
||||
}
|
||||
|
||||
private static final int BUFFER_SIZE = 256 * 1024; // 256KB缓冲区
|
||||
private static final String AUDIO_MIME_PREFIX = "audio/";
|
||||
|
||||
private void mergeAudioFiles() {
|
||||
if (recordingSegments.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
MediaMuxer muxer = null;
|
||||
ByteBuffer buffer = null;
|
||||
List<File> processedSegments = new ArrayList<>(recordingSegments);
|
||||
|
||||
try {
|
||||
mergedRecordingFile = createM4AFile();
|
||||
muxer = new MediaMuxer(mergedRecordingFile.getAbsolutePath(),
|
||||
MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4);
|
||||
|
||||
// 获取音频格式并添加轨道
|
||||
MediaFormat audioFormat = getAudioFormat(processedSegments.get(0));
|
||||
int audioTrackIndex = muxer.addTrack(audioFormat);
|
||||
|
||||
muxer.start();
|
||||
buffer = ByteBuffer.allocateDirect(BUFFER_SIZE);
|
||||
MediaCodec.BufferInfo bufferInfo = new MediaCodec.BufferInfo();
|
||||
|
||||
// 修复:使用正确的累计时间戳
|
||||
long currentPresentationTimeUs = 0; // 当前写入的时间戳位置
|
||||
int segmentCount = 0;
|
||||
|
||||
for (File segment : processedSegments) {
|
||||
Log.d("SingerVerification", "开始处理第 " + (segmentCount + 1) + " 个片段: " + segment.getAbsolutePath());
|
||||
|
||||
long segmentDuration = processAudioSegment(muxer, segment, audioTrackIndex,
|
||||
buffer, bufferInfo, currentPresentationTimeUs);
|
||||
|
||||
if (segmentDuration > 0) {
|
||||
// 修复:累计当前时间戳,而不是替换
|
||||
currentPresentationTimeUs += segmentDuration;
|
||||
Log.d("SingerVerification", "片段 " + (segmentCount + 1) + " 处理完成,片段时长: " + segmentDuration + " us, 累计时间: " + currentPresentationTimeUs + " us");
|
||||
} else {
|
||||
Log.w("SingerVerification", "片段 " + (segmentCount + 1) + " 处理失败或为空");
|
||||
}
|
||||
|
||||
segmentCount++;
|
||||
}
|
||||
|
||||
Log.d("SingerVerification", "所有片段处理完成,总时长: " + currentPresentationTimeUs + " us,共处理 " + segmentCount + " 个片段");
|
||||
|
||||
// 更新最终录音文件
|
||||
updateRecordingFile();
|
||||
|
||||
} catch (Exception e) {
|
||||
handleMergeError(e);
|
||||
} finally {
|
||||
cleanupResources(muxer, buffer);
|
||||
cleanupSegments(processedSegments);
|
||||
}
|
||||
}
|
||||
|
||||
private MediaFormat getAudioFormat(File audioFile) throws IOException {
|
||||
MediaExtractor extractor = new MediaExtractor();
|
||||
try {
|
||||
extractor.setDataSource(audioFile.getAbsolutePath());
|
||||
for (int i = 0; i < extractor.getTrackCount(); i++) {
|
||||
MediaFormat format = extractor.getTrackFormat(i);
|
||||
String mime = format.getString(MediaFormat.KEY_MIME);
|
||||
if (mime != null && mime.startsWith(AUDIO_MIME_PREFIX)) {
|
||||
return format;
|
||||
}
|
||||
}
|
||||
throw new IOException("没有找到音频轨道");
|
||||
} finally {
|
||||
extractor.release();
|
||||
}
|
||||
}
|
||||
|
||||
private long processAudioSegment(MediaMuxer muxer, File segment, int trackIndex,
|
||||
ByteBuffer buffer, MediaCodec.BufferInfo bufferInfo, long baseTimeUs) throws IOException {
|
||||
MediaExtractor extractor = new MediaExtractor();
|
||||
long actualDuration = 0;
|
||||
|
||||
try {
|
||||
extractor.setDataSource(segment.getAbsolutePath());
|
||||
int audioTrackIndex = findAudioTrack(extractor);
|
||||
if (audioTrackIndex < 0) {
|
||||
Log.w("SingerVerification", "未找到音频轨道: " + segment.getAbsolutePath());
|
||||
return 0;
|
||||
}
|
||||
|
||||
extractor.selectTrack(audioTrackIndex);
|
||||
MediaFormat format = extractor.getTrackFormat(audioTrackIndex);
|
||||
long estimatedDuration = format.getLong(MediaFormat.KEY_DURATION);
|
||||
Log.d("SingerVerification", "处理片段: " + segment.getAbsolutePath() +
|
||||
", 估计时长: " + estimatedDuration + "us, 基准时间: " + baseTimeUs + "us");
|
||||
|
||||
long maxSampleTime = 0;
|
||||
int sampleCount = 0;
|
||||
|
||||
while (true) {
|
||||
int sampleSize = extractor.readSampleData(buffer, 0);
|
||||
if (sampleSize < 0) {
|
||||
break; // 没有更多样本
|
||||
}
|
||||
|
||||
long sampleTime = extractor.getSampleTime();
|
||||
if (sampleTime == -1) {
|
||||
// 如果没有时间戳,使用估计值(不推荐)
|
||||
sampleTime = sampleCount * 1000000 / 44100; // 假设44.1kHz
|
||||
}
|
||||
|
||||
// 记录最大样本时间作为实际持续时间
|
||||
if (sampleTime > maxSampleTime) {
|
||||
maxSampleTime = sampleTime;
|
||||
}
|
||||
|
||||
bufferInfo.offset = 0;
|
||||
bufferInfo.size = sampleSize;
|
||||
bufferInfo.presentationTimeUs = baseTimeUs + sampleTime;
|
||||
bufferInfo.flags = extractor.getSampleFlags();
|
||||
|
||||
// 确保时间戳是递增的
|
||||
if (bufferInfo.presentationTimeUs < baseTimeUs) {
|
||||
bufferInfo.presentationTimeUs = baseTimeUs + sampleCount * 1000; // 安全回退
|
||||
}
|
||||
|
||||
muxer.writeSampleData(trackIndex, buffer, bufferInfo);
|
||||
extractor.advance();
|
||||
sampleCount++;
|
||||
}
|
||||
|
||||
// 修复:使用实际的最大样本时间 + 最后一个样本的持续时间估计
|
||||
if (maxSampleTime > 0) {
|
||||
// 添加最后一个样本的估计持续时间(假设20ms)
|
||||
actualDuration = maxSampleTime + 20000;
|
||||
} else {
|
||||
// 如果没有样本,使用格式的估计值
|
||||
actualDuration = estimatedDuration;
|
||||
}
|
||||
|
||||
Log.d("SingerVerification", "片段处理完成,实际时长: " + actualDuration + "us, 样本数: " + sampleCount);
|
||||
return actualDuration;
|
||||
|
||||
} finally {
|
||||
extractor.release();
|
||||
}
|
||||
}
|
||||
|
||||
private int findAudioTrack(MediaExtractor extractor) {
|
||||
for (int i = 0; i < extractor.getTrackCount(); i++) {
|
||||
MediaFormat format = extractor.getTrackFormat(i);
|
||||
String mime = format.getString(MediaFormat.KEY_MIME);
|
||||
if (mime != null && mime.startsWith(AUDIO_MIME_PREFIX)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private void updateRecordingFile() {
|
||||
// 确保合并文件存在且不为空
|
||||
if (mergedRecordingFile != null && mergedRecordingFile.exists() && mergedRecordingFile.length() > 0) {
|
||||
recordingFile = mergedRecordingFile;
|
||||
Log.d("SingerVerification", "音频文件合并完成,文件大小: " + mergedRecordingFile.length() + " bytes");
|
||||
} else {
|
||||
Log.e("SingerVerification", "合并文件不存在或为空,使用第一个录音片段");
|
||||
if (!recordingSegments.isEmpty()) {
|
||||
recordingFile = recordingSegments.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
// 清理录音片段列表
|
||||
recordingSegments.clear();
|
||||
}
|
||||
|
||||
private void handleMergeError(Exception e) {
|
||||
Log.e("SingerVerification", "处理音频文件失败: " + e.getMessage(), e);
|
||||
Toast.makeText(this, "处理音频文件失败,使用第一段录音", Toast.LENGTH_SHORT).show();
|
||||
if (!recordingSegments.isEmpty()) {
|
||||
recordingFile = recordingSegments.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanupResources(MediaMuxer muxer, ByteBuffer buffer) {
|
||||
try {
|
||||
if (muxer != null) {
|
||||
muxer.stop();
|
||||
muxer.release();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "释放MediaMuxer失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanupSegments(List<File> segments) {
|
||||
// 延迟删除片段,确保合并文件已经完全写入
|
||||
new Handler().postDelayed(() -> {
|
||||
for (File segment : segments) {
|
||||
try {
|
||||
if (segment.exists()) {
|
||||
boolean deleted = segment.delete();
|
||||
if (!deleted) {
|
||||
Log.w("SingerVerification", "删除音频片段失败: " + segment.getAbsolutePath());
|
||||
} else {
|
||||
Log.d("SingerVerification", "成功删除音频片段: " + segment.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "删除音频片段失败: " + segment.getAbsolutePath(), e);
|
||||
}
|
||||
}
|
||||
}, 2000); // 延迟2秒删除,确保合并文件已经完全写入
|
||||
}
|
||||
|
||||
|
||||
// 这些WAV处理方法已不再需要,因为我们现在使用MediaMuxer处理M4A文件
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.xscm.modulemain.activity.user.presenter.UserHomepagePresenter;
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.RelationBean;
|
||||
import com.xscm.moduleutil.bean.RelationshipBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.XBannerData;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
@@ -149,6 +151,26 @@ public class UserHomepageActivity extends BaseMvpActivity<UserHomepagePresenter,
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFriendList(RelationBean data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFriendListMore(List<RelationshipBean> data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
// 清理 ViewPager
|
||||
|
||||
@@ -0,0 +1,337 @@
|
||||
package com.xscm.modulemain.activity.user.activity.ui.main
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.blankj.utilcode.util.SnackbarUtils.dismiss
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.user.activity.RelationshipActivity
|
||||
import com.xscm.modulemain.activity.user.activity.UserHomepageActivity
|
||||
import com.xscm.modulemain.activity.user.conacts.UserHomepageConacts
|
||||
import com.xscm.modulemain.activity.user.presenter.UserHomepagePresenter
|
||||
import com.xscm.modulemain.adapter.BosomFriendAdapter
|
||||
import com.xscm.modulemain.databinding.FragmentBosomFriendBinding
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment
|
||||
import com.xscm.moduleutil.bean.CircleListBean
|
||||
import com.xscm.moduleutil.bean.RelationBean
|
||||
import com.xscm.moduleutil.bean.RelationshipBean
|
||||
import com.xscm.moduleutil.bean.UserInfo
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.utils.SpUtil
|
||||
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2025/11/20 11:43
|
||||
* @Description 这是挚友的
|
||||
*/
|
||||
class BosomFriendFragment : BaseMvpFragment<UserHomepagePresenter?, FragmentBosomFriendBinding>(),
|
||||
UserHomepageConacts.View {
|
||||
@JvmField
|
||||
var userId: String = ""
|
||||
var page: Int = 1
|
||||
var isLoading: Boolean = false
|
||||
var adapter: BosomFriendAdapter? = null
|
||||
|
||||
var type: Int = 0//这是判断是从哪里进入的,在用户主页进入,要添加背景,等于1的时候,是从用户主页进入的,
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance() = BosomFriendFragment()
|
||||
|
||||
/**
|
||||
* 创建实例并设置userId
|
||||
*/
|
||||
@JvmStatic
|
||||
fun newInstance(userId: String, type: Int): BosomFriendFragment {
|
||||
val fragment = BosomFriendFragment()
|
||||
val bundle = Bundle()
|
||||
bundle.putString("userId", userId)
|
||||
bundle.putInt("type", type)
|
||||
fragment.arguments = bundle
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置用户ID
|
||||
*/
|
||||
fun setUserId(userId: String) {
|
||||
this.userId = userId
|
||||
page = 1 // 重置页码
|
||||
// 如果已经初始化完成,立即获取数据
|
||||
if (isAdded) {
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10") // 获取第一页数据
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: BosomFriendViewModel by viewModels()
|
||||
|
||||
|
||||
override fun initData() {
|
||||
// 根据userId获取挚友列表数据
|
||||
if (userId.isNotEmpty()) {
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10") // 初始加载第一页数据
|
||||
}
|
||||
|
||||
// 观察ViewModel中的数据变化
|
||||
viewModel.bosomFriendList.observe(viewLifecycleOwner) { relationBean ->
|
||||
relationBean?.let { data ->
|
||||
// 更新适配器数据
|
||||
updateAdapter(data, false) // false表示不是加载更多
|
||||
}
|
||||
}
|
||||
|
||||
// 观察加载状态
|
||||
viewModel.isLoading.observe(viewLifecycleOwner) { isLoading ->
|
||||
// 显示或隐藏加载进度条
|
||||
|
||||
// 更新刷新状态
|
||||
mBinding.smartRefreshLayout.finishRefresh()
|
||||
mBinding.smartRefreshLayout.finishLoadMore()
|
||||
}
|
||||
|
||||
// 观察错误信息
|
||||
viewModel.errorMessage.observe(viewLifecycleOwner) { errorMsg ->
|
||||
if (errorMsg.isNotEmpty()) {
|
||||
// 显示错误信息
|
||||
Toast.makeText(context, errorMsg, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
if (type == 1) {
|
||||
mBinding.root.setBackgroundResource(R.mipmap.bj_intimate)
|
||||
}
|
||||
|
||||
mBinding.rvMyRelationship.layoutManager =
|
||||
androidx.recyclerview.widget.LinearLayoutManager(context)
|
||||
|
||||
// 初始化适配器
|
||||
val adapter = BosomFriendAdapter(mutableListOf<MultiItemEntity>())
|
||||
mBinding.rvMyRelationship.adapter = adapter
|
||||
|
||||
// 设置点击事件监听器
|
||||
adapter.onItemClickListener = object : BosomFriendAdapter.OnItemClickListener {
|
||||
override fun onUserClick(userId: String) {
|
||||
// 处理用户点击事件,例如跳转到用户详情页
|
||||
// 这里可以根据需求实现具体的跳转逻辑
|
||||
|
||||
//用户主页
|
||||
val intent = Intent(activity, UserHomepageActivity::class.java)
|
||||
intent.putExtra("userId", userId)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
override fun onDeleteClick(relation: RelationshipBean) {
|
||||
// 处理删除关系点击事件
|
||||
// 这里可以调用删除关系的接口
|
||||
queren(2, relation.getId(), relation.getDelete_me_coin())
|
||||
}
|
||||
|
||||
override fun onTopClick(relation: RelationshipBean) {
|
||||
// 处理置顶关系点击事件
|
||||
// 这里可以调用置顶关系的接口
|
||||
queren(1, relation.getId(), "")
|
||||
}
|
||||
|
||||
override fun onDetailsClick(relationId: Int) {//点击更多按钮
|
||||
val intent = Intent(activity, RelationshipActivity::class.java).apply {
|
||||
putExtra("relationId", relationId)
|
||||
putExtra("userId", userId) // 假设 currentUserId 是你当前页面的用户ID
|
||||
}
|
||||
activity?.startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
// 设置下拉刷新
|
||||
mBinding.smartRefreshLayout.setOnRefreshListener {
|
||||
page = 1 // 重置页码
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10")
|
||||
}
|
||||
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(object :
|
||||
OnRefreshLoadMoreListener {
|
||||
override fun onLoadMore(refreshLayout: RefreshLayout) {
|
||||
page++
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10")
|
||||
}
|
||||
|
||||
override fun onRefresh(refreshLayout: RefreshLayout) {
|
||||
page = 1 // 重置页码
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10")
|
||||
}
|
||||
})
|
||||
|
||||
mBinding.llLeft.setOnClickListener { //跳转到个人主页
|
||||
val intent = Intent(activity, UserHomepageActivity::class.java)
|
||||
intent.putExtra("userId", cpBean.user_info1?.user_id)
|
||||
startActivity(intent)
|
||||
}
|
||||
mBinding.llRight.setOnClickListener {//跳转到个人主页
|
||||
val intent = Intent(activity, UserHomepageActivity::class.java)
|
||||
intent.putExtra("userId", cpBean.user_info2?.user_id)
|
||||
startActivity(intent)
|
||||
}
|
||||
mBinding.llMiddle.setOnClickListener { //跳转到心动空间
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun queren(type: Int, id: Int, num: String?) {
|
||||
if (type == 1) {
|
||||
// 创建并显示确认对话框
|
||||
ConfirmDialog(
|
||||
getActivity(),
|
||||
"提示",
|
||||
"您确定要置顶本关系吗?",
|
||||
"确认",
|
||||
"取消",
|
||||
View.OnClickListener { v: View? ->
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre?.topRelationCard(id.toString() + "")
|
||||
dismiss()
|
||||
},
|
||||
View.OnClickListener { v: View? -> }, false, 0
|
||||
).show()
|
||||
} else if (type == 2) {
|
||||
// 创建并显示确认对话框
|
||||
ConfirmDialog(
|
||||
getActivity(),
|
||||
"提示",
|
||||
"您确定要删除本关系吗?解除关系需要" + num + "金币",
|
||||
"确认",
|
||||
"取消",
|
||||
View.OnClickListener { v: View? ->
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre?.deleteRelationCard(id.toString() + "")
|
||||
dismiss()
|
||||
},
|
||||
View.OnClickListener { v: View? -> }, false, 0
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_bosom_friend
|
||||
}
|
||||
|
||||
override fun bindPresenter(): UserHomepagePresenter? {
|
||||
return UserHomepagePresenter(this, activity)
|
||||
}
|
||||
|
||||
override fun setUserDetails(data: UserInfo?) {
|
||||
}
|
||||
|
||||
override fun setCircleList(list: List<CircleListBean?>?) {
|
||||
}
|
||||
|
||||
override fun userGuanzSuccess(s: String?) {
|
||||
}
|
||||
|
||||
override fun setLikeZone() {
|
||||
}
|
||||
|
||||
override fun setFriendList(data: RelationBean?) {
|
||||
// 停止刷新动画
|
||||
mBinding.smartRefreshLayout.finishRefresh()
|
||||
mBinding.smartRefreshLayout.finishLoadMore()
|
||||
// 重置加载状态
|
||||
isLoading = false
|
||||
|
||||
data?.let {
|
||||
// 判断是否是第一页数据
|
||||
val isLoadMore = page > 1
|
||||
updateAdapter(it, isLoadMore)
|
||||
}
|
||||
}
|
||||
|
||||
override fun topRelationCard(s: String?) {
|
||||
page = 1 // 重置页码
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10")
|
||||
}
|
||||
|
||||
override fun deleteRelationCard(s: String?) {
|
||||
page = 1 // 重置页码
|
||||
MvpPre?.getFriendList(userId, page.toString(), "10")
|
||||
}
|
||||
|
||||
override fun setFriendListMore(data: List<RelationshipBean?>?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
var cpBean: UserInfo.CpInfo = UserInfo.CpInfo()
|
||||
|
||||
/**
|
||||
* 更新适配器数据
|
||||
* @param data 关系数据
|
||||
* @param isLoadMore 是否是加载更多
|
||||
*/
|
||||
private fun updateAdapter(data: RelationBean, isLoadMore: Boolean) {
|
||||
// 创建数据列表
|
||||
val dataList = mutableListOf<MultiItemEntity>()
|
||||
|
||||
// 只有在第一页或刷新时才更新cp数据
|
||||
if (!isLoadMore) {
|
||||
if (data.cp != null) {
|
||||
mBinding.tvHeartbeat.text =
|
||||
if (data.cp?.name.isNullOrEmpty()) "心动" else data.cp.name
|
||||
cpBean = data.cp
|
||||
if (data.cp.user_info1 != null && data.cp.user_info2 != null) {
|
||||
mBinding.llCp.visibility = View.VISIBLE
|
||||
mBinding.tvHeartbeatTs.visibility = View.GONE
|
||||
|
||||
ImageUtils.loadHead(data.cp.user_info1?.avatar, mBinding.userNav1)
|
||||
mBinding.tvNickname1.text = data.cp.user_info1?.nickname
|
||||
mBinding.tvNickname2.text = data.cp.user_info2?.nickname
|
||||
mBinding.tvCpLv.text = "LV" + data.cp.level + " " + data.cp.name
|
||||
ImageUtils.loadHead(data.cp.user_info2?.avatar, mBinding.userNav2)
|
||||
val xd = data.cp.exp.toLong() // 更安全的类型转换
|
||||
val formattedNum = if (xd >= 10000) {
|
||||
String.format("%.2fw", xd / 10000.0)
|
||||
} else {
|
||||
xd.toString()
|
||||
}
|
||||
mBinding.tvCpNum.text = formattedNum
|
||||
}
|
||||
} else {
|
||||
mBinding.tvHeartbeat.text = "心动"
|
||||
mBinding.llCp.visibility = View.GONE
|
||||
mBinding.tvHeartbeatTs.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 添加no_cp数据
|
||||
dataList.addAll(data.no_cp)
|
||||
|
||||
// 更新适配器
|
||||
adapter = mBinding.rvMyRelationship.adapter as BosomFriendAdapter
|
||||
if (isLoadMore) {
|
||||
// 加载更多时追加数据
|
||||
adapter?.addData(dataList)
|
||||
} else {
|
||||
// 刷新或首次加载时替换数据
|
||||
adapter?.setNewData(dataList)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 从onCreate中获取userId参数
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
userId = it.getString("userId", "")
|
||||
type = it.getInt("type", 0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.xscm.modulemain.activity.user.activity.ui.main
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.xscm.moduleutil.bean.RelationBean
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class BosomFriendViewModel : ViewModel() {
|
||||
// 好友列表数据
|
||||
private val _bosomFriendList = MutableLiveData<RelationBean>()
|
||||
val bosomFriendList: LiveData<RelationBean> = _bosomFriendList
|
||||
|
||||
// 加载状态
|
||||
private val _isLoading = MutableLiveData<Boolean>()
|
||||
val isLoading: LiveData<Boolean> = _isLoading
|
||||
|
||||
// 错误信息
|
||||
private val _errorMessage = MutableLiveData<String>()
|
||||
val errorMessage: LiveData<String> = _errorMessage
|
||||
|
||||
// 当前页码
|
||||
private var currentPage = 1
|
||||
|
||||
// 是否还有更多数据
|
||||
private var hasMoreData = true
|
||||
|
||||
/**
|
||||
* 获取挚友列表
|
||||
* @param userId 用户ID
|
||||
* @param isRefresh 是否是刷新
|
||||
*/
|
||||
fun getFriendList(userId: String, isRefresh: Boolean = false) {
|
||||
if (isRefresh) {
|
||||
currentPage = 1
|
||||
hasMoreData = true
|
||||
}
|
||||
|
||||
if (!hasMoreData) {
|
||||
return
|
||||
}
|
||||
|
||||
_isLoading.value = true
|
||||
|
||||
// 使用协程进行网络请求
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
// 模拟网络请求,实际项目中替换为真实的API调用
|
||||
val result = fetchFriendListFromApi(userId, currentPage)
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
_isLoading.value = false
|
||||
|
||||
if (result != null) {
|
||||
_bosomFriendList.value = result
|
||||
|
||||
// 判断是否还有更多数据
|
||||
hasMoreData = result.no_cp.size >= 10 // 假设每页10条数据
|
||||
currentPage++
|
||||
} else {
|
||||
_errorMessage.value = "获取好友列表失败"
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
withContext(Dispatchers.Main) {
|
||||
_isLoading.value = false
|
||||
_errorMessage.value = "网络请求错误: ${e.message}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟API请求获取好友列表
|
||||
* 实际项目中替换为真实的API调用
|
||||
*/
|
||||
private suspend fun fetchFriendListFromApi(userId: String, page: Int): RelationBean? {
|
||||
// 这里应该是实际的API调用
|
||||
// return apiService.getFriendList(userId, page)
|
||||
|
||||
// 模拟延迟
|
||||
kotlinx.coroutines.delay(1000)
|
||||
|
||||
// 返回模拟数据
|
||||
return RelationBean()
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载更多数据
|
||||
*/
|
||||
fun loadMore(userId: String) {
|
||||
getFriendList(userId, false)
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据
|
||||
*/
|
||||
fun refresh(userId: String) {
|
||||
getFriendList(userId, true)
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import android.app.Activity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.RelationBean;
|
||||
import com.xscm.moduleutil.bean.RelationshipBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,6 +19,13 @@ public class UserHomepageConacts {
|
||||
|
||||
void userGuanzSuccess(String s);
|
||||
void setLikeZone();
|
||||
|
||||
void setFriendList(RelationBean data);
|
||||
|
||||
void topRelationCard(String s);
|
||||
void deleteRelationCard(String s);
|
||||
|
||||
void setFriendListMore(List<RelationshipBean> data);
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
@@ -27,5 +36,12 @@ public class UserHomepageConacts {
|
||||
|
||||
void userGuanz(String userId,String type);
|
||||
void deleteZone(int idx,String zone_id);
|
||||
|
||||
void getFriendList(String user_id,String page,String page_limit);
|
||||
|
||||
void topRelationCard(String id);
|
||||
void deleteRelationCard(String id);
|
||||
|
||||
void getFriendListMore(String user_id,String relation_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ import com.xscm.modulemain.manager.RoomManager;
|
||||
import com.xscm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.RelationBean;
|
||||
import com.xscm.moduleutil.bean.RelationshipBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
@@ -160,4 +162,24 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
public void setLikeZone() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFriendList(RelationBean data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFriendListMore(List<RelationshipBean> data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,14 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.google.android.flexbox.FlexboxLayout;
|
||||
import com.xscm.modulemain.Application;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.ui.main.BosomFriendFragment;
|
||||
import com.xscm.modulemain.databinding.FragmentUserHompageBinding;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||
@@ -36,9 +39,12 @@ import com.xscm.modulemain.manager.RoomManager;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.MyBagBean;
|
||||
import com.xscm.moduleutil.bean.RelationBean;
|
||||
import com.xscm.moduleutil.bean.RelationshipBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.UserTagBean;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
@@ -84,6 +90,26 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFriendList(RelationBean data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFriendListMore(List<RelationshipBean> data) {
|
||||
|
||||
}
|
||||
|
||||
public static UserHomepageFragment newInstance(UserInfo userInfo, int type) {
|
||||
UserHomepageFragment fragment = new UserHomepageFragment();
|
||||
Bundle args = new Bundle();
|
||||
@@ -112,7 +138,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
}
|
||||
list = new ArrayList<>();
|
||||
list.add(new MyBagBean("动态", "1"));
|
||||
list.add(new MyBagBean("礼物墙", "2"));
|
||||
list.add(new MyBagBean("挚友", "2"));
|
||||
list.add(new MyBagBean("我的相册", "3"));
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list, userInfo.getUser_id() + ""));
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
@@ -203,6 +229,8 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
}
|
||||
|
||||
showCp();
|
||||
|
||||
mBinding.headerInfo.imGiftW.setOnClickListener(this::onClick);
|
||||
}
|
||||
private void showCp() {
|
||||
if (userInfo.getCp_info() != null) {
|
||||
@@ -327,6 +355,10 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("roomId", userInfo.getRoom_id()).navigation();
|
||||
}
|
||||
}else if (view.getId() == R.id.im_gift_w) {
|
||||
Intent intent=new Intent(getContext(), GiftWallActivity.class);
|
||||
intent.putExtra("userId",userInfo.getUser_id());
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,7 +390,8 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
if ("1".equals(model.getMyBagType())) {
|
||||
return CirleListFragment.newInstance(userId);
|
||||
} else if ("2".equals(model.getMyBagType())) {
|
||||
return UserGiftWallFragment.newInstance(userId);
|
||||
// return UserGiftWallFragment.newInstance(userId);
|
||||
return BosomFriendFragment.newInstance(userId,1);
|
||||
} else {
|
||||
return MyAlbumFragment.newInstance(userId);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.tencent.mm.opensdk.modelbiz.WXOpenCustomerServiceChat;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.user.activity.BosomFriendActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.NobleTitleActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.RechargeActivity;
|
||||
@@ -122,6 +123,7 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
mBinding.clNobleTitle.setOnClickListener(this::onClick);
|
||||
mBinding.llSinger.setOnClickListener(this::onClick);
|
||||
mBinding.llPlaylist.setOnClickListener(this::onClick);
|
||||
mBinding.llMeZy.setOnClickListener(this::onClick);
|
||||
|
||||
mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
@Override
|
||||
@@ -266,7 +268,11 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
req.url = "https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7"; // 客服URL
|
||||
api.sendReq(req);
|
||||
} else if (id == R.id.ll_gift_wall) {//我的页面的礼物墙
|
||||
startActivity(new Intent(getContext(), GiftWallActivity.class));
|
||||
|
||||
Intent intent=new Intent(getContext(), GiftWallActivity.class);
|
||||
intent.putExtra("userId",userInfo.getUser_id());
|
||||
startActivity(intent);
|
||||
|
||||
} else if (id == R.id.cl_noble_title) {//爵位展示页面
|
||||
startActivity(new Intent(getContext(), NobleTitleActivity.class));
|
||||
} else if (id == R.id.ll_singer) {//歌手认证
|
||||
@@ -277,6 +283,9 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
} else if (id == R.id.ll_playlist) {//我的歌单
|
||||
Intent intent = new Intent(getContext(), UserPlaylistActivity.class);
|
||||
startActivity(intent);
|
||||
}else if (id == R.id.ll_me_zy) {
|
||||
Intent intent=new Intent(getContext(), BosomFriendActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,11 @@ import android.content.Context;
|
||||
|
||||
import com.xscm.modulemain.activity.user.conacts.UserHomepageConacts;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.RelationBean;
|
||||
import com.xscm.moduleutil.bean.RelationshipBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
@@ -93,4 +96,84 @@ public class UserHomepagePresenter extends BasePresenter<UserHomepageConacts.Vie
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFriendList(String user_id, String page, String page_limit) {
|
||||
api.getFriendList(user_id, page, page_limit, new BaseObserver<RelationBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(RelationBean relationBean) {
|
||||
if (MvpRef == null)
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
MvpRef.get().setFriendList(relationBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String id) {
|
||||
if (api==null){
|
||||
api= RetrofitClient.getInstance();
|
||||
}
|
||||
api.topRelationCard(id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().topRelationCard(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String id) {
|
||||
if (api==null){
|
||||
api= RetrofitClient.getInstance();
|
||||
}
|
||||
api.deleteRelationCard(id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().deleteRelationCard(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getFriendListMore(String user_id, String relation_id) {
|
||||
api.getFriendListMore(user_id, relation_id, new BaseObserver<List<RelationshipBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<RelationshipBean> relationshipBeans) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setFriendListMore(relationshipBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,338 @@
|
||||
package com.xscm.modulemain.adapter
|
||||
|
||||
import android.view.View
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.moduleutil.bean.RelationBean
|
||||
import com.xscm.moduleutil.bean.RelationshipBean
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.utils.MeHeadView
|
||||
import com.xscm.moduleutil.utils.SpUtil
|
||||
import com.xscm.moduleutil.utils.TimeUtils
|
||||
|
||||
/**
|
||||
* 挚友列表适配器
|
||||
*/
|
||||
class BosomFriendAdapter(data: MutableList<MultiItemEntity>) : BaseMultiItemQuickAdapter<MultiItemEntity, BaseViewHolder>(data) {
|
||||
|
||||
// 点击事件监听器
|
||||
var onItemClickListener: OnItemClickListener? = null
|
||||
|
||||
interface OnItemClickListener {
|
||||
fun onUserClick(userId: String)
|
||||
fun onDeleteClick(relation: RelationshipBean)
|
||||
fun onTopClick(relation: RelationshipBean)
|
||||
|
||||
fun onDetailsClick(relationId: Int)
|
||||
}
|
||||
|
||||
companion object {
|
||||
// 类型常量
|
||||
const val TYPE_NOCP_WITH_NAME = 3 // no_cp集合,relation_name不等于"",并且relation_list的大小是1
|
||||
const val TYPE_NOCP_WITH_NAME_AND_LIST = 5 // no_cp集合,relation_name不等于"",并且relation_list的大小大于1
|
||||
}
|
||||
|
||||
init {
|
||||
// 添加item类型
|
||||
// addItemType(TYPE_CP_WITH_NAME, R.layout.item_relationship_list)
|
||||
// addItemType(TYPE_CP_WITH_LIST, R.layout.item_bosom_cp)
|
||||
addItemType(TYPE_NOCP_WITH_NAME, R.layout.item_relationship_list) // 修改为使用item_bosom_friend布局
|
||||
// addItemType(TYPE_NOCP_WITH_LIST, R.layout.item_bosom_cp_friend)
|
||||
addItemType(TYPE_NOCP_WITH_NAME_AND_LIST, R.layout.item_bosom_friend_details)
|
||||
// addItemType(TYPE_NOCP_WITH_LIST_MORE, R.layout.item_bosom_friend_details)
|
||||
}
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
val data = getItem(position) // 假设你使用的是ListAdapter
|
||||
|
||||
when (data) {
|
||||
|
||||
is RelationBean.NoCpBean -> {
|
||||
// 情况3:no_cp集合,relation_name不等于"",并且relation_list的大小是1
|
||||
if (data.relation_name.isNotEmpty() && data.relation_list.size == 1) {
|
||||
return TYPE_NOCP_WITH_NAME
|
||||
}
|
||||
|
||||
// 情况5:no_cp集合,relation_name不等于"",并且relation_list的大小大于1
|
||||
if (data.relation_name.isNotEmpty() && data.relation_list.size > 1) {
|
||||
return TYPE_NOCP_WITH_NAME_AND_LIST
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 其他情况返回默认值
|
||||
return TYPE_NOCP_WITH_NAME
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换NoCp类型数据
|
||||
*/
|
||||
private fun convertNoCp(holder: BaseViewHolder, noCpBean: RelationBean.NoCpBean, viewType: Int) {
|
||||
// 根据viewType设置不同的UI
|
||||
when (viewType) {
|
||||
TYPE_NOCP_WITH_NAME -> {
|
||||
// 显示关系名称
|
||||
holder.setText(R.id.tv_heartbeat, noCpBean.relation_name)
|
||||
|
||||
// 显示关系名称
|
||||
holder.setText(R.id.tv_cp_lv, noCpBean.relation_name)
|
||||
var meHeadView: MeHeadView
|
||||
var meHeadView2: MeHeadView
|
||||
meHeadView = holder.getView(R.id.user_nav1)
|
||||
meHeadView2 = holder.getView(R.id.user_nav2)
|
||||
meHeadView.setSex(noCpBean.relation_list[0].sex1,noCpBean.relation_list[0].avatar1)
|
||||
meHeadView2.setSex(noCpBean.relation_list[0].sex2,noCpBean.relation_list[0].avatar2)
|
||||
|
||||
// 显示relation_list内容
|
||||
// ImageUtils.loadHead(noCpBean.relation_list[0].avatar1, holder.getView(R.id.user_nav1))
|
||||
holder.setText(R.id.tv_nickname1, noCpBean.relation_list[0].nickname1)
|
||||
// ImageUtils.loadHead(noCpBean.relation_list[0].avatar2, holder.getView(R.id.user_nav2))
|
||||
holder.setText(R.id.tv_nickname2, noCpBean.relation_list[0].nickname2)
|
||||
if (noCpBean.relation_list[0].user_id1 == SpUtil.getUserId() || noCpBean.relation_list[0].user_id2 == SpUtil.getUserId()) {
|
||||
holder.setVisible(R.id.icon_cp_zd, true)
|
||||
holder.setVisible(R.id.icon_cp_dele, true)
|
||||
} else {
|
||||
holder.setVisible(R.id.icon_cp_zd, false)
|
||||
holder.setVisible(R.id.icon_cp_dele, false)
|
||||
}
|
||||
// 设置点击事件
|
||||
holder.getView<View>(R.id.user_nav1).setOnClickListener {
|
||||
// 点击第一个用户头像
|
||||
onItemClickListener?.onUserClick(noCpBean.relation_list[0].user_id1.toString())
|
||||
}
|
||||
|
||||
holder.getView<View>(R.id.user_nav2).setOnClickListener {
|
||||
// 点击第二个用户头像
|
||||
onItemClickListener?.onUserClick(noCpBean.relation_list[0].user_id2.toString())
|
||||
}
|
||||
|
||||
// 设置删除按钮点击事件
|
||||
holder.getView<View>(R.id.icon_cp_dele).setOnClickListener {
|
||||
onItemClickListener?.onDeleteClick(noCpBean.relation_list[0])
|
||||
}
|
||||
|
||||
// 设置置顶按钮点击事件
|
||||
holder.getView<View>(R.id.icon_cp_zd).setOnClickListener {
|
||||
onItemClickListener?.onTopClick(noCpBean.relation_list[0])
|
||||
}
|
||||
|
||||
// 计算并显示剩余时间
|
||||
val endTimeStr = noCpBean.relation_list[0].end_time
|
||||
if (!endTimeStr.isNullOrEmpty()) {
|
||||
try {
|
||||
val endTime = endTimeStr.toLong()
|
||||
val currentTime = System.currentTimeMillis() / 1000 // 当前时间戳(秒)
|
||||
val remainingSeconds = endTime - currentTime
|
||||
|
||||
if (remainingSeconds > 0) {
|
||||
val days = remainingSeconds / (24 * 60 * 60)
|
||||
val hours = (remainingSeconds % (24 * 60 * 60)) / (60 * 60)
|
||||
val timeText = if (days > 0) {
|
||||
"${days}天${hours}小时"
|
||||
} else {
|
||||
"${hours}小时"
|
||||
}
|
||||
holder.setText(R.id.tv_cp_num, timeText)
|
||||
}
|
||||
} catch (e: NumberFormatException) {
|
||||
// 时间戳格式错误
|
||||
holder.setVisible(R.id.tv_cp_num, false)
|
||||
}
|
||||
} else {
|
||||
// end_time为空
|
||||
holder.setVisible(R.id.tv_cp_num, false)
|
||||
}
|
||||
}
|
||||
|
||||
TYPE_NOCP_WITH_NAME_AND_LIST -> {
|
||||
|
||||
// 显示关系名称
|
||||
holder.setText(R.id.tvRelationName, noCpBean.relation_name)
|
||||
holder.setVisible(R.id.im_gd, true)
|
||||
// 设置置顶按钮点击事件
|
||||
holder.getView<View>(R.id.im_gd).setOnClickListener {
|
||||
onItemClickListener?.onDetailsClick(noCpBean.relation_list[0].relation_id)
|
||||
}
|
||||
// 显示relation_list内容,只显示前三个关系
|
||||
if (noCpBean.relation_list.isNotEmpty()) {
|
||||
// 获取前三个关系,如果不足三个则显示全部
|
||||
val displayCount = minOf(3, noCpBean.relation_list.size)
|
||||
|
||||
// 根据显示数量设置不同的布局
|
||||
when (displayCount) {
|
||||
|
||||
2 -> {
|
||||
|
||||
holder.setVisible(R.id.rlRelation1,true)
|
||||
holder.setVisible(R.id.rlRelation2,true)
|
||||
holder.setVisible(R.id.rlRelation3,false)
|
||||
|
||||
// 显示两个关系
|
||||
val relation1 = noCpBean.relation_list[0]
|
||||
val relation2 = noCpBean.relation_list[1]
|
||||
var meHeadView : MeHeadView
|
||||
var meHeadView2 : MeHeadView
|
||||
meHeadView=holder.getView(R.id.user_nav1)
|
||||
meHeadView2=holder.getView(R.id.user_nav2)
|
||||
|
||||
if (relation1.user_id1== SpUtil.getUserId()){
|
||||
meHeadView.setSex(relation1.sex2,relation1.avatar2)
|
||||
holder.setText(R.id.tv_nickname1, relation1.nickname2)
|
||||
|
||||
}else{
|
||||
meHeadView.setSex(relation1.sex1,relation1.avatar1)
|
||||
holder.setText(R.id.tv_nickname1, relation1.nickname1)
|
||||
}
|
||||
|
||||
if (relation2.user_id1== SpUtil.getUserId()){
|
||||
meHeadView2.setSex(relation2.sex2,relation2.avatar2)
|
||||
holder.setText(R.id.tv_nickname2, relation2.nickname2)
|
||||
}else{
|
||||
meHeadView2.setSex(relation2.sex1,relation2.avatar1)
|
||||
holder.setText(R.id.tv_nickname2, relation2.nickname1)
|
||||
}
|
||||
|
||||
|
||||
// ImageUtils.loadHead(relation1.avatar1, holder.getView(R.id.user_nav1))
|
||||
// holder.setText(R.id.tv_nickname1, relation1.nickname1)
|
||||
|
||||
// ImageUtils.loadHead(relation2.avatar1, holder.getView(R.id.user_nav2))
|
||||
// holder.setText(R.id.tv_nickname2, relation2.nickname1)
|
||||
holder.setText(R.id.tv_gx_time, TimeUtils.formatDurationDaysOnly(noCpBean.relation_list[0].end_time.toLong()))
|
||||
holder.setText(R.id.tv_gx_time2, TimeUtils.formatDurationDaysOnly(noCpBean.relation_list[1].end_time.toLong()))
|
||||
|
||||
holder.getView<View>(R.id.user_nav1).setOnClickListener {
|
||||
if (relation1.user_id1== SpUtil.getUserId()){
|
||||
// 点击第一个用户头像
|
||||
onItemClickListener?.onUserClick(relation1.user_id2.toString())
|
||||
}else {
|
||||
// 点击第一个用户头像
|
||||
onItemClickListener?.onUserClick(relation1.user_id1.toString())
|
||||
}
|
||||
}
|
||||
|
||||
holder.getView<View>(R.id.user_nav2).setOnClickListener {
|
||||
if (relation2.user_id1== SpUtil.getUserId()) {
|
||||
// 点击第二个用户头像
|
||||
onItemClickListener?.onUserClick(relation2.user_id2.toString())
|
||||
}else{
|
||||
onItemClickListener?.onUserClick(relation2.user_id1.toString())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
3 -> {
|
||||
holder.setVisible(R.id.rlRelation1,true)
|
||||
holder.setVisible(R.id.rlRelation2,true)
|
||||
holder.setVisible(R.id.rlRelation3,true)
|
||||
// 显示三个关系
|
||||
val relation1 = noCpBean.relation_list[0]
|
||||
val relation2 = noCpBean.relation_list[1]
|
||||
val relation3 = noCpBean.relation_list[2]
|
||||
|
||||
var meHeadView : MeHeadView
|
||||
var meHeadView2 : MeHeadView
|
||||
var meHeadView3 : MeHeadView
|
||||
meHeadView=holder.getView(R.id.user_nav1)
|
||||
meHeadView2=holder.getView(R.id.user_nav2)
|
||||
meHeadView3=holder.getView(R.id.user_nav3)
|
||||
|
||||
if (relation1.user_id1== SpUtil.getUserId()){
|
||||
meHeadView.setSex(relation1.sex2,relation1.avatar2)
|
||||
holder.setText(R.id.tv_nickname1, relation1.nickname2)
|
||||
}else{
|
||||
meHeadView.setSex(relation1.sex1,relation1.avatar1)
|
||||
holder.setText(R.id.tv_nickname1, relation1.nickname1)
|
||||
}
|
||||
|
||||
if (relation2.user_id1== SpUtil.getUserId()){
|
||||
meHeadView2.setSex(relation2.sex2,relation2.avatar2)
|
||||
holder.setText(R.id.tv_nickname2, relation2.nickname2)
|
||||
}else{
|
||||
meHeadView2.setSex(relation2.sex1,relation2.avatar1)
|
||||
holder.setText(R.id.tv_nickname2, relation2.nickname1)
|
||||
}
|
||||
|
||||
if (relation3.user_id1== SpUtil.getUserId()){
|
||||
meHeadView3.setSex(relation3.sex2,relation3.avatar2)
|
||||
holder.setText(R.id.tv_nickname3, relation3.nickname2)
|
||||
}else{
|
||||
meHeadView3.setSex(relation3.sex1,relation3.avatar1)
|
||||
holder.setText(R.id.tv_nickname3, relation3.nickname1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ImageUtils.loadHead(relation1.avatar1, holder.getView(R.id.user_nav1))
|
||||
// holder.setText(R.id.tv_nickname1, relation1.nickname1)
|
||||
//
|
||||
// ImageUtils.loadHead(relation2.avatar1, holder.getView(R.id.user_nav2))
|
||||
// holder.setText(R.id.tv_nickname2, relation2.nickname1)
|
||||
//
|
||||
// ImageUtils.loadHead(relation3.avatar1, holder.getView(R.id.user_nav3))
|
||||
// holder.setText(R.id.tv_nickname3, relation3.nickname1)
|
||||
|
||||
holder.setText(R.id.tv_gx_time, TimeUtils.formatDurationDaysOnly(noCpBean.relation_list[0].end_time.toLong()))
|
||||
holder.setText(R.id.tv_gx_time2, TimeUtils.formatDurationDaysOnly(noCpBean.relation_list[1].end_time.toLong()))
|
||||
holder.setText(R.id.tv_gx_time3, TimeUtils.formatDurationDaysOnly(noCpBean.relation_list[2].end_time.toLong()))
|
||||
|
||||
holder.getView<View>(R.id.user_nav1).setOnClickListener {
|
||||
if (relation1.user_id1== SpUtil.getUserId()){
|
||||
// 点击第一个用户头像
|
||||
onItemClickListener?.onUserClick(relation1.user_id2.toString())
|
||||
}else {
|
||||
// 点击第一个用户头像
|
||||
onItemClickListener?.onUserClick(relation1.user_id1.toString())
|
||||
}
|
||||
}
|
||||
|
||||
holder.getView<View>(R.id.user_nav2).setOnClickListener {
|
||||
if (relation2.user_id1== SpUtil.getUserId()) {
|
||||
// 点击第二个用户头像
|
||||
onItemClickListener?.onUserClick(relation2.user_id2.toString())
|
||||
}else{
|
||||
onItemClickListener?.onUserClick(relation2.user_id1.toString())
|
||||
}
|
||||
}
|
||||
holder.getView<View>(R.id.user_nav3).setOnClickListener {
|
||||
if (relation3.user_id1== SpUtil.getUserId()) {
|
||||
// 点击第三个用户头像
|
||||
onItemClickListener?.onUserClick(relation3.user_id2.toString())
|
||||
}else{
|
||||
onItemClickListener?.onUserClick(relation3.user_id1.toString())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
override fun convert(
|
||||
holder: BaseViewHolder,
|
||||
item: MultiItemEntity?
|
||||
) {
|
||||
val viewType = getItemViewType(holder.layoutPosition - headerLayoutCount)
|
||||
|
||||
when (viewType) {
|
||||
|
||||
TYPE_NOCP_WITH_NAME,
|
||||
TYPE_NOCP_WITH_NAME_AND_LIST-> {
|
||||
val noCpItem = item as RelationBean.NoCpBean
|
||||
convertNoCp(holder, noCpItem, viewType)
|
||||
}
|
||||
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.RelationshipBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.MeHeadView;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.xscm.moduleutil.utils.TimeUtils;
|
||||
|
||||
@@ -26,26 +27,23 @@ public class RelationshipAdapter extends BaseQuickAdapter<RelationshipBean, com.
|
||||
|
||||
@Override
|
||||
protected void convert(com.chad.library.adapter.base.BaseViewHolder helper, RelationshipBean item) {
|
||||
if (item.getType() == 1){
|
||||
helper.getView(R.id.ll).setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_k);
|
||||
}else if (item.getType() == 2){
|
||||
helper.getView(R.id.ll).setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_w);
|
||||
}
|
||||
ImageUtils.loadHeadCC(item.getAvatar1(), helper.getView(R.id.user_nav1));
|
||||
ImageUtils.loadHeadCC(item.getAvatar2(), helper.getView(R.id.user_nav2));
|
||||
// ImageUtils.loadHeadCC(item.getAvatar1(), helper.getView(R.id.user_nav1));
|
||||
MeHeadView meHeadView = helper.getView(R.id.user_nav1);
|
||||
meHeadView.setSex(item.getSex1(),item.getAvatar1());
|
||||
MeHeadView meHeadView2 = helper.getView(R.id.user_nav2);
|
||||
meHeadView2.setSex(item.getSex2(),item.getAvatar2());
|
||||
// ImageUtils.loadHeadCC(item.getAvatar2(), helper.getView(R.id.user_nav2));
|
||||
helper.setText(R.id.tv_nickname1, item.getNickname1());
|
||||
helper.setText(R.id.tv_nickname2, item.getNickname2());
|
||||
helper.setText(R.id.tv_relation, item.getRelation_name());
|
||||
LogUtils.e("lxj",Long.parseLong(item.getEnd_time())-System.currentTimeMillis());
|
||||
helper.setText(R.id.tv_time, TimeUtils.formatDuration2(Long.parseLong(item.getEnd_time())*1000-System.currentTimeMillis()));
|
||||
helper.setText(R.id.tv_cp_num, TimeUtils.formatDuration2(Long.parseLong(item.getEnd_time())));
|
||||
if (item.getUser_id1()== SpUtil.getUserId() || item.getUser_id2() == SpUtil.getUserId()){
|
||||
helper.getView(R.id.im_zhid).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.im_shanchu).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.icon_cp_zd).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.icon_cp_dele).setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
helper.getView(R.id.im_zhid).setVisibility(View.GONE);
|
||||
helper.getView(R.id.im_shanchu).setVisibility(View.GONE);
|
||||
helper.getView(R.id.icon_cp_zd).setVisibility(View.GONE);
|
||||
helper.getView(R.id.icon_cp_dele).setVisibility(View.GONE);
|
||||
}
|
||||
helper.getView(R.id.im_shanchu).setOnClickListener(new View.OnClickListener() {
|
||||
helper.getView(R.id.icon_cp_dele).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -54,7 +52,7 @@ public class RelationshipAdapter extends BaseQuickAdapter<RelationshipBean, com.
|
||||
}
|
||||
}
|
||||
});
|
||||
helper.getView(R.id.im_zhid).setOnClickListener(new View.OnClickListener() {
|
||||
helper.getView(R.id.icon_cp_zd).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
@@ -233,7 +233,9 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
MvpPre.addBlackList(user_id);
|
||||
} else if (id == R.id.room_rl_gift) {
|
||||
// ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id() + "").withInt("type", 1).navigation();
|
||||
startActivity(new Intent(getContext(), GiftWallActivity.class));
|
||||
Intent intent=new Intent(getContext(), GiftWallActivity.class);
|
||||
intent.putExtra("userId",userInfo.getUser_id());
|
||||
startActivity(intent);
|
||||
} else if (id == R.id.room_jb) {
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_REPORT_URL(), SpUtil.getToken(), 1, user_id));
|
||||
|
||||
33
MainModule/src/main/res/layout/activity_bosom_friend.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/container"
|
||||
tools:context=".BosomFriendActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bj_intimate"
|
||||
>
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@@ -11,7 +11,8 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F8F8F8">
|
||||
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
|
||||
64
MainModule/src/main/res/layout/activity_relationship.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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/main"
|
||||
tools:context=".activity.user.activity.RelationshipActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bj_intimate"
|
||||
>
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_intimate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_initimate_ts"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_heartbeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@mipmap/icon_heartbeat"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="center"
|
||||
android:text="心动"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_intimate" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_heartbeat"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:paddingHorizontal="@dimen/dp_24"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</layout>
|
||||
259
MainModule/src/main/res/layout/fragment_bosom_friend.xml
Normal file
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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/bosom_friend"
|
||||
tools:context=".ui.main.BosomFriendFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_intimate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_initimate_ts"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_intimate">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_heartbeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_54"
|
||||
android:background="@mipmap/icon_heartbeat"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="center"
|
||||
android:text="心动"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_cp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@mipmap/icon_dialog_u_cp_bg"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_heartbeat">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_dialog_u_cp_left_top"
|
||||
android:gravity="center"
|
||||
android:text="CP"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@+id/ll_middle"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_middle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_dialog_u_cp_lv"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:textColor="#FFFFEAB9"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="LV8 情缘一定" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_dialog_u_cp_" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#FFFF0088"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="100.35w" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/ll_middle"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:text="用户昵称"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_reqit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@mipmap/regit_t"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
tools:text="开始使用" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_9"
|
||||
android:visibility="gone"
|
||||
tools:text="5天" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_heartbeat_ts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@mipmap/bj_heartbeat_ts"
|
||||
android:gravity="center"
|
||||
android:text="暂无关系,前往房间互送特殊礼物打成关系吧"
|
||||
android:textColor="#624E79"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_heartbeat" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cc"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<!-- 关系列表-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_my_relationship"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_relationship_list" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_15">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".fragment.MyAlbumFragment">
|
||||
|
||||
<data>
|
||||
<data>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/dy_image_recyc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
/>
|
||||
android:paddingHorizontal="@dimen/dp_15" />
|
||||
|
||||
</layout>
|
||||
@@ -84,7 +84,7 @@
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="上周"
|
||||
android:text="本月"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
163
MainModule/src/main/res/layout/item_bosom_cp.xml
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_cp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@mipmap/icon_dialog_u_cp_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_dialog_u_cp_left_top"
|
||||
android:gravity="center"
|
||||
android:text="CP"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@+id/ll_middle"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_middle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_dialog_u_cp_lv"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:textColor="#FFFFEAB9"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="LV8 情缘一定" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_dialog_u_cp_" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#FFFF0088"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="100.35w" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/ll_middle"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:text="用户昵称"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_reqit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@mipmap/regit_t"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
tools:text="开始使用" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_9"
|
||||
android:visibility="gone"
|
||||
tools:text="5天" />
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
152
MainModule/src/main/res/layout/item_bosom_cp_friend.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_92">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_cp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@mipmap/icon_u_cp_bg"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:background="@mipmap/icon_dialog_u_cp_left_top"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="CP"-->
|
||||
<!-- android:textColor="@color/white" />-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="40dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_middle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="关系天数"
|
||||
android:textColor="#FFB77CDA"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_r11_effef8"
|
||||
android:backgroundTint="#D598F9"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="100.35w" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:text="用户昵称"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="@dimen/dp_12">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_cp_dele"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_cp_dele" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_cp_zd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_cp_zd" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
44
MainModule/src/main/res/layout/item_bosom_friend.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_heartbeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_heartbeat"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="center"
|
||||
tools:text="心动"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_heartbeat"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_heartbeat"
|
||||
android:src="@mipmap/icon_gd"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_bosom_friend"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_heartbeat"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
282
MainModule/src/main/res/layout/item_bosom_friend_details.xml
Normal file
@@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginTop="@dimen/dp_16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRelationName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_heartbeat"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="center"
|
||||
tools:text="闺蜜"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_10" />
|
||||
|
||||
<!-- 关系列表容器 -->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/ll_relations"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginHorizontal="@dimen/dp_16"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/tvRelationName"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent">-->
|
||||
|
||||
<!-- <!– 第一个关系 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_5">-->
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/user_nav1"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:background="@drawable/shape_circle"-->
|
||||
<!-- android:src="@mipmap/default_avatar"-->
|
||||
<!-- app:riv_oval="true" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_nickname1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:ellipsize="end"-->
|
||||
<!-- android:lines="1"-->
|
||||
<!-- android:maxWidth="@dimen/dp_70"-->
|
||||
<!-- android:textColor="#FF624E79"-->
|
||||
<!-- android:textSize="@dimen/sp_10"-->
|
||||
<!-- tools:text="用户昵称1" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <!– 第二个关系 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:layout_marginHorizontal="@dimen/dp_5">-->
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/user_nav2"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:background="@drawable/shape_circle"-->
|
||||
<!-- android:src="@mipmap/default_avatar"-->
|
||||
<!-- app:riv_oval="true" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_nickname2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:ellipsize="end"-->
|
||||
<!-- android:lines="1"-->
|
||||
<!-- android:maxWidth="@dimen/dp_70"-->
|
||||
<!-- android:textColor="#FF624E79"-->
|
||||
<!-- android:textSize="@dimen/sp_10"-->
|
||||
<!-- tools:text="用户昵称2" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <!– 第三个关系 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_5">-->
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/user_nav3"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:background="@drawable/shape_circle"-->
|
||||
<!-- android:src="@mipmap/default_avatar"-->
|
||||
<!-- app:riv_oval="true" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_nickname3"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:ellipsize="end"-->
|
||||
<!-- android:lines="1"-->
|
||||
<!-- android:maxWidth="@dimen/dp_70"-->
|
||||
<!-- android:textColor="#FF624E79"-->
|
||||
<!-- android:textSize="@dimen/sp_10"-->
|
||||
<!-- tools:text="用户昵称3" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvRelationName"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvRelationName"
|
||||
android:src="@mipmap/icon_gd"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rlRelation1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_115"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvRelationName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@mipmap/icon_gx_bj">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gx_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
tools:text="22天"/>
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rlRelation2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_115"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvRelationName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@mipmap/icon_gx_bj">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gx_time2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
tools:text="22天"/>
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rlRelation3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_115"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvRelationName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@mipmap/icon_gx_bj">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gx_time3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
tools:text="22天"/>
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav3"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -3,118 +3,253 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/ll"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_140"-->
|
||||
<!-- android:background="@mipmap/guxi_k"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- >-->
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/user_nav1"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:layout_alignParentStart="true"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_47"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_60"-->
|
||||
<!-- android:src="@mipmap/default_avatar"-->
|
||||
<!-- app:riv_oval="true" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_nickname1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_below="@+id/user_nav1"-->
|
||||
<!-- android:layout_alignStart="@+id/user_nav1"-->
|
||||
<!-- android:layout_alignEnd="@+id/user_nav1"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- tools:text="用户昵称"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_10" />-->
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_50"-->
|
||||
<!-- android:background="@mipmap/regit_t">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_relation"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_40"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- tools:text="开始使用"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- android:textStyle="bold" />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/user_nav2"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_60"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_47"-->
|
||||
<!-- android:src="@mipmap/default_avatar"-->
|
||||
<!-- app:riv_oval="true" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_nickname2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_below="@+id/user_nav2"-->
|
||||
<!-- android:layout_alignStart="@+id/user_nav2"-->
|
||||
<!-- android:layout_alignEnd="@+id/user_nav2"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="用户昵称"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_10" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_time"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_43"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_22"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:paddingStart="5dp"-->
|
||||
<!-- android:paddingEnd="5dp"-->
|
||||
<!-- android:background="@drawable/bg_r53_33333"-->
|
||||
<!-- tools:text="5天"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_9" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_zhid"-->
|
||||
<!-- android:layout_width="@dimen/dp_23"-->
|
||||
<!-- android:layout_height="@dimen/dp_23"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:src="@mipmap/zhid"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_73"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_22"-->
|
||||
<!-- />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_shanchu"-->
|
||||
<!-- android:layout_width="@dimen/dp_23"-->
|
||||
<!-- android:layout_height="@dimen/dp_23"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:src="@mipmap/shanchu"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_103"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_22"-->
|
||||
<!-- />-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll"
|
||||
android:id="@+id/ll_cp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:background="@mipmap/guxi_k"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
android:layout_height="@dimen/dp_92"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@mipmap/icon_u_cp_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_heartbeat">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="@dimen/dp_47"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
android:gravity="center"
|
||||
tools:text="用户昵称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
android:src="@mipmap/default_avatar"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_middle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="关系天数"
|
||||
android:textColor="#FFB77CDA"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_r11_effef8"
|
||||
android:backgroundTint="#D598F9"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="100.35w" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_35"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:text="用户昵称"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@mipmap/regit_t">
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
<ImageView
|
||||
android:id="@+id/icon_cp_dele"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"
|
||||
tools:text="开始使用"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold" />
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_cp_dele" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_cp_zd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_cp_zd" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_47"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav2"
|
||||
android:layout_alignStart="@+id/user_nav2"
|
||||
android:layout_alignEnd="@+id/user_nav2"
|
||||
android:gravity="center"
|
||||
android:text="用户昵称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_43"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
tools:text="5天"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_9" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_zhid"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/zhid"
|
||||
android:layout_marginTop="@dimen/dp_73"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_shanchu"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/shanchu"
|
||||
android:layout_marginTop="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
161
MainModule/src/main/res/layout/item_relationship_list.xml
Normal file
@@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_heartbeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_heartbeat"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="center"
|
||||
tools:text="心动"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_cp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_92"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@mipmap/icon_u_cp_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_heartbeat">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="用户昵称" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_middle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_lv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:text="关系天数"
|
||||
android:textColor="#FFB77CDA"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_r11_effef8"
|
||||
android:backgroundTint="#D598F9"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="100.35w" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xscm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:padding="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxWidth="@dimen/dp_70"
|
||||
android:text="用户昵称"
|
||||
android:textColor="#FF624E79"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="@dimen/dp_12">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_cp_dele"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_cp_dele" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_cp_zd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_cp_zd" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -5,7 +5,8 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_margin="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r8_262431">
|
||||
android:background="@drawable/bg_r8_c51a0c"
|
||||
android:backgroundTint="#12bbb9c6">
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/iv_song_cover"
|
||||
|
||||
41
MainModule/src/main/res/layout/item_user.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="8dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="60dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="#333"
|
||||
android:textSize="12sp"
|
||||
tools:text="用户昵称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp"
|
||||
tools:text="兄弟" />
|
||||
</LinearLayout>
|
||||
@@ -309,7 +309,8 @@
|
||||
android:background="@mipmap/icon_dialog_u_cp_bg"
|
||||
app:layout_constraintBottom_toTopOf="@+id/view"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout">
|
||||
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -455,5 +456,14 @@
|
||||
tools:text="5天" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gift_w"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/image_gift_w"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_8" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
BIN
MainModule/src/main/res/mipmap-hdpi/bj_heartbeat_ts.webp
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/bj_intimate.webp
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_cl.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_corner.webp
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_ly.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_me_playlist.webp
Normal file
|
After Width: | Height: | Size: 920 B |
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_singer.webp
Normal file
|
After Width: | Height: | Size: 956 B |
|
Before Width: | Height: | Size: 3.9 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_st.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_tz.webp
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 19 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/card_corner_background.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_corner_status.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_cp_dele.webp
Normal file
|
After Width: | Height: | Size: 558 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_cp_zd.webp
Normal file
|
After Width: | Height: | Size: 424 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_gd.webp
Normal file
|
After Width: | Height: | Size: 964 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_gx_bj.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heartbeat.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_initimate_ts.webp
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_u_cp_bg.webp
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/im_friend_back.webp
Normal file
|
After Width: | Height: | Size: 578 B |
BIN
MainModule/src/main/res/mipmap-hdpi/image_gift_w.webp
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/jukebox_room_mask.webp
Normal file
|
After Width: | Height: | Size: 870 B |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/me_corner.webp
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/me_corner_bj.webp
Normal file
|
After Width: | Height: | Size: 770 B |
|
Before Width: | Height: | Size: 317 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/singer_bj.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/bj_heartbeat_ts.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/bj_intimate.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_cl.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_corner.webp
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 20 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_ly.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_me_playlist.webp
Normal file
|
After Width: | Height: | Size: 986 B |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_singer.webp
Normal file
|
After Width: | Height: | Size: 930 B |
|
Before Width: | Height: | Size: 5.8 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_st.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/but_tz.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/card_corner_background.webp
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_corner_status.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_cp_dele.webp
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_cp_zd.png
Normal file
|
After Width: | Height: | Size: 380 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_gd.webp
Normal file
|
After Width: | Height: | Size: 1.5 KiB |