pk房完成,剩余禁止对方麦未完成
拍卖房完成 点歌房完成,音乐播放需要测试
This commit is contained in:
@@ -10,9 +10,6 @@
|
||||
<activity
|
||||
android:name=".activity.AlbumDetailActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.Setting1Activity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.SettingActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -38,7 +38,7 @@ import com.example.modulevocal.conacts.AlbumDetailConacts;
|
||||
import com.example.modulevocal.databinding.ActivityAlbumDetailBinding;
|
||||
import com.example.modulevocal.presenter.AlbumDetailPresenter;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
@@ -170,7 +170,7 @@ public class AlbumDetailActivity extends BaseMvpActivity<AlbumDetailPresenter, A
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.im_cr_album) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, false, 9);
|
||||
startChoosePhoto(1, PictureConfig.REQUEST_CAMERA, false, 9);
|
||||
} else if (view.getId() == R.id.tv_bj) {
|
||||
ARouter.getInstance().build(ARouteConstants.CREATE_ALBUM).withSerializable("albumBean", albumBean1).navigation();
|
||||
finish();
|
||||
@@ -190,7 +190,7 @@ public class AlbumDetailActivity extends BaseMvpActivity<AlbumDetailPresenter, A
|
||||
} else if (adapter.getSelectedItems().isEmpty()) {
|
||||
ToastUtils.showShort("请选择图片");
|
||||
} else {
|
||||
ShareDialog shareDialog = new ShareDialog(this, "", adapter.getSelectedItems().get(0).getImage(), "", 2);
|
||||
ShareDialog shareDialog = new ShareDialog(this, "", adapter.getSelectedItems().get(0).getImage(), "", 2, userId);
|
||||
shareDialog.show();
|
||||
}
|
||||
} else if (view.getId() == R.id.rl_transfer) {
|
||||
@@ -202,17 +202,28 @@ public class AlbumDetailActivity extends BaseMvpActivity<AlbumDetailPresenter, A
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode, boolean isVideo, int type) {
|
||||
|
||||
// PictureSelector.create(this)
|
||||
// .openGallery(mimeType)
|
||||
// .isGif(isVideo)
|
||||
// .imageEngine(GlideEngine.createGlideEngine())
|
||||
// .isPreviewImage(true)
|
||||
// .isCamera(true)
|
||||
// .setOutputCameraPath(Constants.FILE_PATH)
|
||||
// .isCompress(true)
|
||||
// .setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
// .forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(mimeType)
|
||||
.isGif(isVideo)
|
||||
.imageEngine(GlideEngine.createGlideEngine())
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(type)
|
||||
.isPreviewImage(true)
|
||||
.isCamera(true)
|
||||
.setOutputCameraPath(Constants.FILE_PATH)
|
||||
.isCompress(true)
|
||||
.setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
.isDisplayCamera(true)
|
||||
.setOutputCameraDir(Constants.FILE_PATH)
|
||||
.isOriginalSkipCompress(true)
|
||||
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -222,7 +233,7 @@ public class AlbumDetailActivity extends BaseMvpActivity<AlbumDetailPresenter, A
|
||||
switch (requestCode) {
|
||||
|
||||
case PictureConfig.REQUEST_CAMERA:
|
||||
List<LocalMedia> localMediaList = PictureSelector.obtainMultipleResult(data);
|
||||
List<LocalMedia> localMediaList = PictureSelector.obtainSelectorList(data);
|
||||
|
||||
if (localMediaList != null && !localMediaList.isEmpty()) {
|
||||
List<File> imageFiles = new ArrayList<>();
|
||||
|
||||
@@ -11,9 +11,13 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.adapter.BlackAdapter;
|
||||
import com.example.modulevocal.conacts.BlacklistConacts;
|
||||
import com.example.modulevocal.databinding.ActivityBlacklistBinding;
|
||||
import com.example.modulevocal.presenter.BlacklistPresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseAppCompatActivity;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.bean.UserFollowBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -23,7 +27,7 @@ import java.util.List;
|
||||
*@data
|
||||
*@description: 黑名单
|
||||
*/
|
||||
public class BlacklistActivity extends BaseAppCompatActivity<ActivityBlacklistBinding> {
|
||||
public class BlacklistActivity extends BaseMvpActivity<BlacklistPresenter,ActivityBlacklistBinding> implements BlacklistConacts.View{
|
||||
|
||||
private static final String TAG = "BlacklistActivity";
|
||||
private int type;//关注--黑名单--粉丝
|
||||
@@ -33,16 +37,15 @@ public class BlacklistActivity extends BaseAppCompatActivity<ActivityBlacklistBi
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
blackUserBeans=new ArrayList<>();
|
||||
for (int i = 0; i < 10; i++){
|
||||
BlackUserBean bean=new BlackUserBean();
|
||||
bean.setUserName("用户"+i);
|
||||
bean.setUserId(i+"");
|
||||
bean.setUserAvatar("");
|
||||
bean.setType(type);
|
||||
blackUserBeans.add(bean);
|
||||
if (MvpPre==null){
|
||||
MvpPre=new BlacklistPresenter(this,this);
|
||||
}
|
||||
blackAdapter.setNewData(blackUserBeans);
|
||||
MvpPre.getUserFollowList(String.valueOf(type), "1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlacklistPresenter bindPresenter() {
|
||||
return new BlacklistPresenter(this,this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,22 +62,68 @@ public class BlacklistActivity extends BaseAppCompatActivity<ActivityBlacklistBi
|
||||
|
||||
if (item.getType() == 0 || item.getType() == 2) {
|
||||
// 类型为 关注 或 粉丝:切换 status
|
||||
item.setStatus(item.getStatus() == 0 ? 1 : 0);
|
||||
item.setStatus(item.getIs_follow() == 0 ? 1 : 0);
|
||||
blackAdapter.notifyItemChanged(position);
|
||||
// updateStatusOnServer(item); // 调用网络请求更新服务器
|
||||
MvpPre.userGuanz(String.valueOf(item.getUser_id()),"1");
|
||||
} else if (item.getType() == 1) {
|
||||
// 类型为 黑名单:移除当前项
|
||||
blackAdapter.getData().remove(position);
|
||||
blackAdapter.notifyItemRemoved(position);
|
||||
blackAdapter.notifyItemRangeChanged(position, blackAdapter.getItemCount());
|
||||
// removeItemFromServer(item); // 调用网络请求删除
|
||||
MvpPre.removeBlackList(String.valueOf(item.getUser_id()));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_blacklist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getUserFollowList(List<BlackUserBean> list, String type) {
|
||||
if (type.equals("0")){
|
||||
if (list!=null){
|
||||
List<BlackUserBean> blackUserBeans = new ArrayList<>();
|
||||
for (BlackUserBean item:list){
|
||||
item.setType(0);
|
||||
blackUserBeans.add(item);
|
||||
}
|
||||
blackAdapter.setNewData(blackUserBeans);
|
||||
}
|
||||
}else if (type.equals("1")){
|
||||
if (list!=null){
|
||||
List<BlackUserBean> blackUserBeans = new ArrayList<>();
|
||||
for (BlackUserBean item:list){
|
||||
item.setType(1);
|
||||
blackUserBeans.add(item);
|
||||
}
|
||||
blackAdapter.setNewData(blackUserBeans);
|
||||
}
|
||||
}else if (type.equals("2")){
|
||||
if (list!=null){
|
||||
List<BlackUserBean> blackUserBeans = new ArrayList<>();
|
||||
for (BlackUserBean item:list){
|
||||
item.setType(2);
|
||||
blackUserBeans.add(item);
|
||||
}
|
||||
blackAdapter.setNewData(blackUserBeans);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userGuanzSuccess(String s) {
|
||||
MvpPre.getUserFollowList(String.valueOf(type), "1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBlackList() {
|
||||
MvpPre.getUserFollowList(String.valueOf(type), "1", "10");
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.conacts.MyAlbumConacts;
|
||||
import com.example.modulevocal.databinding.ActivityCreateAlbumBinding;
|
||||
import com.example.modulevocal.presenter.MyAlbumPresenter;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
@@ -94,7 +94,7 @@ public class CreateAlbumActivity extends BaseMvpActivity<MyAlbumPresenter, Activ
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.riv_album) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.CHOOSE_REQUEST, false, 1);
|
||||
startChoosePhoto(1, PictureConfig.CHOOSE_REQUEST, false, 1);
|
||||
} else if (view.getId() == R.id.tv_confirm) {
|
||||
if (!Objects.requireNonNull(mBinding.edAlbumName.getText()).toString().trim().isEmpty() || !imageUrl.equals("")) {
|
||||
if (mBinding.edAlbumName.getText().toString().length() < 4) {
|
||||
@@ -172,16 +172,28 @@ public class CreateAlbumActivity extends BaseMvpActivity<MyAlbumPresenter, Activ
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode, boolean isVideo, int type) {
|
||||
|
||||
// PictureSelector.create(this)
|
||||
// .openGallery(mimeType)
|
||||
// .isGif(isVideo)
|
||||
// .imageEngine(GlideEngine.createGlideEngine())
|
||||
// .maxSelectNum(type)
|
||||
// .isPreviewImage(true)
|
||||
// .isCamera(true)
|
||||
// .setOutputCameraPath(Constants.FILE_PATH)
|
||||
// .isCompress(true)
|
||||
// .setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
// .forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(mimeType)
|
||||
.isGif(isVideo)
|
||||
.imageEngine(GlideEngine.createGlideEngine())
|
||||
.maxSelectNum(type)
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(type)
|
||||
.isPreviewImage(true)
|
||||
.isCamera(true)
|
||||
.setOutputCameraPath(Constants.FILE_PATH)
|
||||
.isCompress(true)
|
||||
.setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
.isDisplayCamera(true)
|
||||
.setOutputCameraDir(Constants.FILE_PATH)
|
||||
.isOriginalSkipCompress(true)
|
||||
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
}
|
||||
@@ -192,7 +204,7 @@ public class CreateAlbumActivity extends BaseMvpActivity<MyAlbumPresenter, Activ
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
switch (requestCode) {
|
||||
case PictureConfig.CHOOSE_REQUEST:
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainMultipleResult(data);
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia != null && localMedia.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia.get(0);
|
||||
String url;
|
||||
@@ -205,7 +217,7 @@ public class CreateAlbumActivity extends BaseMvpActivity<MyAlbumPresenter, Activ
|
||||
}
|
||||
break;
|
||||
case PictureConfig.REQUEST_CAMERA:
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainMultipleResult(data);
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia1 != null && localMedia1.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia1.get(0);
|
||||
MvpPre.uploadFile(new File(imgMedia.getRealPath()), 3);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -18,6 +19,8 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.PermissionUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.modulevocal.R;
|
||||
@@ -26,22 +29,27 @@ import com.example.modulevocal.databinding.ActivityCreatedRoomBinding;
|
||||
import com.example.modulevocal.presenter.CreatedRoomPresenter;
|
||||
import com.example.zhouwei.library.CustomPopWindow;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.CheckTxtResp;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.utils.PermissionCallback;
|
||||
import com.qxcm.moduleutil.utils.PermissionUtil;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author
|
||||
*@data 2025/5/15
|
||||
*@description: 创建房间
|
||||
* @author
|
||||
* @data 2025/5/15
|
||||
* @description: 创建房间
|
||||
*/
|
||||
public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, ActivityCreatedRoomBinding> implements CreatedRoomConactos.View {
|
||||
|
||||
@@ -61,7 +69,7 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
public void run() {
|
||||
if (isShowing) {
|
||||
// 隐藏 PopupWindow
|
||||
if (popupWindow != null ) {
|
||||
if (popupWindow != null) {
|
||||
popupWindow.dissmiss();
|
||||
}
|
||||
isShowing = false;
|
||||
@@ -92,7 +100,7 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
// roomTypeInfos.add(new RoomTypeInfo("K歌", 21));
|
||||
// mRoomTypeAdapter.setNewData(roomTypeInfos);
|
||||
|
||||
MvpPre.roomLabel("create");
|
||||
// MvpPre.roomLabel("create");
|
||||
handler.post(showPopupRunnable);
|
||||
}
|
||||
|
||||
@@ -102,7 +110,7 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
mBinding.topBar.setTitle("创建房间");
|
||||
mBinding.tvSave.setOnClickListener(this::onClick);
|
||||
mBinding.ivTrendContent.setOnClickListener(this::onClick);
|
||||
mBinding.tvSz.setText("0/"+maxNum);
|
||||
mBinding.tvSz.setText("0/" + maxNum);
|
||||
mBinding.etG.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
@@ -116,23 +124,25 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (s.length()==maxNum){
|
||||
if (s.length() == maxNum) {
|
||||
mBinding.tvSz.setText("您输入的字数已超过限制");
|
||||
}else {
|
||||
mBinding.tvSz.setText((maxNum - s.length())+"/"+maxNum);
|
||||
} else {
|
||||
mBinding.tvSz.setText((maxNum - s.length()) + "/" + maxNum);
|
||||
}
|
||||
}
|
||||
});
|
||||
popupWindow = new CustomPopWindow.PopupWindowBuilder(this)
|
||||
.setView(R.layout.pop_layout1)//显示的布局
|
||||
.setFocusable(false) // 关键点:不要抢占焦点
|
||||
.create();//创建PopupWindow
|
||||
mBinding.tvSave.post(() -> {
|
||||
if (!isFinishing() && !isDestroyed()) {
|
||||
popupWindow.showAsDropDown(mBinding.tvSave);
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.tvSujRoomName.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -148,60 +158,58 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
}
|
||||
|
||||
|
||||
private long lastSaveClickTime=0;
|
||||
private long lastSaveClickTime = 0;
|
||||
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.tv_save) {
|
||||
if (roomUrl==null || roomUrl.isEmpty()){
|
||||
if (roomUrl == null || roomUrl.isEmpty()) {
|
||||
ToastUtils.show("请选择封面");
|
||||
return;
|
||||
}
|
||||
long l = System.currentTimeMillis();
|
||||
if(l-lastSaveClickTime>500){
|
||||
lastSaveClickTime=l;
|
||||
if (l - lastSaveClickTime > 500) {
|
||||
lastSaveClickTime = l;
|
||||
roomName = mBinding.edNickName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(roomName)) {
|
||||
ToastUtils.show("请输入房间名");
|
||||
return;
|
||||
}
|
||||
MvpPre.checkTxt(roomName);
|
||||
MvpPre.checkTxt(roomName, roomUrl, mBinding.etG.getText().toString());
|
||||
}
|
||||
}else if (id == R.id.iv_trend_content) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.CHOOSE_REQUEST);
|
||||
} else if (id == R.id.iv_trend_content) {
|
||||
startChoosePhoto(1, PictureConfig.CHOOSE_REQUEST);
|
||||
} else if (id == R.id.tv_suj_room_name) {
|
||||
MvpPre.roomName();
|
||||
}
|
||||
}
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode) {
|
||||
|
||||
// PictureSelector.create(this)
|
||||
// .openGallery(mimeType)
|
||||
// .isGif(false)
|
||||
// .imageEngine(GlideEngine.createGlideEngine())
|
||||
// .maxSelectNum(1)
|
||||
// .isPreviewImage(true)
|
||||
// .isCamera(true)
|
||||
// .setOutputCameraPath(Constants.FILE_PATH)
|
||||
// .isCompress(true)
|
||||
// .setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
// .forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(mimeType)
|
||||
.isGif(false)
|
||||
.imageEngine(GlideEngine.createGlideEngine())
|
||||
.maxSelectNum(1)
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(1)
|
||||
.isPreviewImage(true)
|
||||
.isCamera(true)
|
||||
.setOutputCameraPath(Constants.FILE_PATH)
|
||||
.isCompress(true)
|
||||
.setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
.isDisplayCamera(true)
|
||||
.setOutputCameraDir(Constants.FILE_PATH)
|
||||
.isOriginalSkipCompress(true)
|
||||
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
// PictureSelector.create(this)
|
||||
// .openGallery(mimeType)
|
||||
// .selectionMode(PictureConfig.SINGLE)
|
||||
// .maxSelectNum(1)//最大选择数量
|
||||
// .minSelectNum(1)//最小选择数量
|
||||
// .previewImage(false)//是否预览图片
|
||||
// .isCamera(true)//是否允许使用相机
|
||||
// .imageEngine(GlideEngine.createGlideEngine())
|
||||
// .sizeMultiplier(0.5f)//大小倍数
|
||||
// .setOutputCameraPath(Constants.FILE_PATH)//设置拍照照片存储路径
|
||||
// .compress(true)//是否开启压缩
|
||||
// .withAspectRatio(1, 1)
|
||||
// .cropCompressQuality(Constants.CROP_COMPRESS_SIZE)// 裁剪压缩质量 默认90 int
|
||||
// .minimumCompressSize(Constants.COMPRESS_INGNORE)// 小于100kb的图片不压缩
|
||||
// .compressSavePath(ImageUtils.getImagePath())//压缩图保存路径
|
||||
// .setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
// .isDragFrame(true)//是否允许拖动窗体
|
||||
// .forResult(requestCode);//结果回调onActivityResult code
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +219,7 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
switch (requestCode) {
|
||||
case PictureConfig.CHOOSE_REQUEST:
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainMultipleResult(data);
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia != null && localMedia.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia.get(0);
|
||||
String url;
|
||||
@@ -227,15 +235,10 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void checkTxtSuccess(CheckTxtResp result) {
|
||||
if (result.getResult() == 0) {
|
||||
// RoomTypeInfo roomTypeInfo = mRoomTypeAdapter.getSelect();
|
||||
// MvpPre.addUserRoom(roomName, String.valueOf(roomTypeInfo.getId()),roomUrl);
|
||||
} else {
|
||||
ToastUtils.show("房间名称包含敏感词汇请重新输入");
|
||||
}
|
||||
public void checkTxtSuccess(String result) {
|
||||
ARouter.getInstance().build(ARouteConstants.MY_ROOM).navigation();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -248,9 +251,14 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type) {
|
||||
if (type == 0) {
|
||||
roomUrl=url;
|
||||
Glide.with(this).load(roomUrl).into(mBinding.ivTrendContent);
|
||||
roomUrl = url;
|
||||
ImageUtils.loadHeadCC(url, mBinding.ivTrendContent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void suijiRoomName(String s) {
|
||||
mBinding.edNickName.setText(s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.example.modulevocal.adapter.UserPhotoWallAdapter;
|
||||
import com.example.modulevocal.conacts.EditUserConactos;
|
||||
import com.example.modulevocal.databinding.ActivityEditUserBinding;
|
||||
import com.example.modulevocal.presenter.EditUserPresenter;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
@@ -95,7 +95,7 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
}else {
|
||||
if (item.equals(UserPhotoWallAdapter.ADD_PHOTO)) {
|
||||
// 点击的是“+”号,启动图片选择
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, false, 9);
|
||||
startChoosePhoto(1, PictureConfig.REQUEST_CAMERA, false, 9);
|
||||
} else {
|
||||
// 查看大图或其他操作
|
||||
FullScreenUtil.showFullScreenDialog(EditUserInfoActivity.this, position, list);
|
||||
@@ -128,7 +128,7 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.rv_user_head) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.PREVIEW_VIDEO_CODE, false, 1);
|
||||
startChoosePhoto(1, PictureConfig.REQUEST_GO_SETTING, false, 1);
|
||||
} else if (view.getId() == R.id.rl_1) {
|
||||
startActivity(new Intent(this, ChangeNicknameActivity.class));
|
||||
} else if (view.getId() == R.id.rl_3) {
|
||||
@@ -154,16 +154,28 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode, boolean isVideo, int type) {
|
||||
|
||||
// PictureSelector.create(this)
|
||||
// .openGallery(mimeType)
|
||||
// .isGif(isVideo)
|
||||
// .imageEngine(GlideEngine.createGlideEngine())
|
||||
// .maxSelectNum(type)
|
||||
// .isPreviewImage(true)
|
||||
// .isCamera(true)
|
||||
// .setOutputCameraPath(Constants.FILE_PATH)
|
||||
// .isCompress(true)
|
||||
// .setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
// .forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(mimeType)
|
||||
.isGif(isVideo)
|
||||
.imageEngine(GlideEngine.createGlideEngine())
|
||||
.maxSelectNum(type)
|
||||
.isGif(false)
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(type)
|
||||
.isPreviewImage(true)
|
||||
.isCamera(true)
|
||||
.setOutputCameraPath(Constants.FILE_PATH)
|
||||
.isCompress(true)
|
||||
.setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
.isDisplayCamera(true)
|
||||
.setOutputCameraDir(Constants.FILE_PATH)
|
||||
.isOriginalSkipCompress(true)
|
||||
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
}
|
||||
@@ -173,8 +185,8 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
switch (requestCode) {
|
||||
case PictureConfig.PREVIEW_VIDEO_CODE:
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainMultipleResult(data);
|
||||
case PictureConfig.REQUEST_GO_SETTING:
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia1 != null && localMedia1.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia1.get(0);
|
||||
String url;
|
||||
@@ -188,7 +200,7 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
break;
|
||||
|
||||
case PictureConfig.CHOOSE_REQUEST:
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainMultipleResult(data);
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia != null && localMedia.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia.get(0);
|
||||
String url;
|
||||
@@ -201,7 +213,7 @@ public class EditUserInfoActivity extends BaseMvpActivity<EditUserPresenter, Act
|
||||
}
|
||||
break;
|
||||
case PictureConfig.REQUEST_CAMERA:
|
||||
List<LocalMedia> localMediaList = PictureSelector.obtainMultipleResult(data);
|
||||
List<LocalMedia> localMediaList = PictureSelector.obtainSelectorList(data);
|
||||
|
||||
if (localMediaList != null && !localMediaList.isEmpty()) {
|
||||
List<File> imageFiles = new ArrayList<>();
|
||||
|
||||
@@ -15,6 +15,8 @@ import com.example.modulevocal.conacts.MyMoneyConactos;
|
||||
import com.example.modulevocal.databinding.ActivityMyMoneyBinding;
|
||||
import com.example.modulevocal.presenter.MyMoneyPresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.WalletBean;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/5/21
|
||||
@@ -32,6 +34,7 @@ public class MyMoneyActivity extends BaseMvpActivity<MyMoneyPresenter, ActivityM
|
||||
mBinding.r1.setOnClickListener(this::onClick);
|
||||
mBinding.r2.setOnClickListener(this::onClick);
|
||||
|
||||
MvpPre.wallet();
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
@@ -61,4 +64,10 @@ public class MyMoneyActivity extends BaseMvpActivity<MyMoneyPresenter, ActivityM
|
||||
protected MyMoneyPresenter bindPresenter() {
|
||||
return new MyMoneyPresenter(this,this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallet(WalletBean walletBean) {
|
||||
mBinding.tv1.setText(walletBean.getCoin());
|
||||
mBinding.tv2.setText(walletBean.getEarnings());
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
@@ -17,6 +18,7 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.conacts.MyRoomListContacts;
|
||||
import com.example.modulevocal.databinding.RoomActivityMyRoomBinding;
|
||||
@@ -29,8 +31,15 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.AttentionResp;
|
||||
import com.qxcm.moduleutil.bean.ManageRoomResp;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.PermissionCallback;
|
||||
import com.qxcm.moduleutil.utils.PermissionUtil;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.CustomTopBar;
|
||||
|
||||
import java.util.List;
|
||||
@@ -39,6 +48,7 @@ import java.util.List;
|
||||
*@data 2025/5/15
|
||||
*@description: 我的房间
|
||||
*/
|
||||
@Route(path = ARouteConstants.MY_ROOM)
|
||||
public class MyRoomActivity extends BaseMvpActivity<MyRoomPresenter, RoomActivityMyRoomBinding> implements MyRoomListContacts.View {
|
||||
public String from;
|
||||
public int auth_status;
|
||||
@@ -89,6 +99,8 @@ public class MyRoomActivity extends BaseMvpActivity<MyRoomPresenter, RoomActivit
|
||||
mBinding.vLine2.setVisibility(View.GONE);
|
||||
mBinding.vLine3.setVisibility(View.GONE);
|
||||
mBinding.vLine4.setVisibility(View.GONE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void resetTab(int index) {
|
||||
@@ -194,6 +206,10 @@ public class MyRoomActivity extends BaseMvpActivity<MyRoomPresenter, RoomActivit
|
||||
// }
|
||||
// startActivity(new Intent(MyRoomActivity.this,CreatedRoomActivity.class));
|
||||
// }
|
||||
if (!SpUtil.getRealName()){
|
||||
ToastUtils.show("实名认证后才能创建直播间");
|
||||
return;
|
||||
}
|
||||
startActivity(new Intent(MyRoomActivity.this,CreatedRoomActivity.class));
|
||||
finish();
|
||||
}
|
||||
@@ -210,6 +226,7 @@ public class MyRoomActivity extends BaseMvpActivity<MyRoomPresenter, RoomActivit
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void delfootSuccess() {
|
||||
|
||||
@@ -235,6 +252,11 @@ public class MyRoomActivity extends BaseMvpActivity<MyRoomPresenter, RoomActivit
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myCpRoom(List<MyCpRoom> list) {
|
||||
|
||||
}
|
||||
|
||||
private static class MyFragmentAdapter extends FragmentStatePagerAdapter {
|
||||
private SparseArray<Fragment> fragments = new SparseArray<>();
|
||||
private String[] titles = new String[]{"我创建的", "我主持的", "我管理的", "我关注的"};
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.adapter.BalanceRechargeAdapter;
|
||||
import com.qxcm.moduleutil.adapter.BalanceRechargeAdapter;
|
||||
import com.example.modulevocal.conacts.RechargeConactos;
|
||||
import com.example.modulevocal.databinding.ActivityRechargeBinding;
|
||||
import com.example.modulevocal.presenter.RechargePresenter;
|
||||
|
||||
@@ -14,18 +14,19 @@ import com.example.modulevocal.databinding.ActivitySettingBinding;
|
||||
import com.example.modulevocal.presenter.SettingPresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.ConfigBean;
|
||||
import com.qxcm.moduleutil.dialog.RealNameDialog;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.config.ConfigManager;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentEnum;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentPrefs;
|
||||
import com.qxcm.moduleutil.widget.CommonAppConfig;
|
||||
|
||||
public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivitySettingBinding> implements SettingConacts.View {
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
mBinding.tvBbh.setText(CommonAppConfig.getInstance().getVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.qxcm.moduleutil.bean.RechargeBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 充值adapter
|
||||
*/
|
||||
public class BalanceRechargeAdapter extends BaseMultiItemQuickAdapter<RechargeBean, BaseViewHolder> {
|
||||
private int selectedPosition = -1;
|
||||
private OnRechargeItemClickListener listener;
|
||||
private InputBoxVisibilityListener inputBoxVisibilityListener;
|
||||
|
||||
public static final int ITEM_TYPE_NORMAL = 0;
|
||||
public static final int ITEM_TYPE_FOOTER = 1;
|
||||
|
||||
public BalanceRechargeAdapter(@NonNull List<RechargeBean> data) {
|
||||
super(data);
|
||||
// 初始化 item 类型
|
||||
addItemType(ITEM_TYPE_NORMAL, R.layout.rv_item_balance_recharge);
|
||||
addItemType(ITEM_TYPE_FOOTER, R.layout.rv_item_footer);
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
RechargeBean item = getData().get(position);
|
||||
return item.getItemViewType(); // 使用 bean 中的 itemViewType
|
||||
}
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, RechargeBean item) {
|
||||
int type = helper.getItemViewType();
|
||||
|
||||
if (type == ITEM_TYPE_NORMAL) {
|
||||
// 正常 item 显示逻辑
|
||||
helper.setText(R.id.tv_gold_num, item.getGoldNum());
|
||||
helper.setText(R.id.tv_money, String.format("¥%s", item.getMoney()));
|
||||
if (selectedPosition == helper.getAdapterPosition()) {
|
||||
helper.setBackgroundRes(R.id.cl_item, com.qxcm.moduleutil.R.drawable.bg_10_white_sele);
|
||||
} else {
|
||||
helper.setBackgroundRes(R.id.cl_item, com.qxcm.moduleutil.R.drawable.bg_r10_white);
|
||||
}
|
||||
|
||||
helper.getView(R.id.cl_item).setOnClickListener(v -> {
|
||||
selectedPosition = helper.getAdapterPosition();
|
||||
if (listener != null) {
|
||||
listener.onClick(item);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
|
||||
// 隐藏输入框
|
||||
if (inputBoxVisibilityListener != null) {
|
||||
inputBoxVisibilityListener.onInputBoxVisibilityChanged(false);
|
||||
}
|
||||
});
|
||||
} else if (type == ITEM_TYPE_FOOTER) {
|
||||
helper.setText(R.id.tv_gold_num, "自定义");
|
||||
helper.getView(R.id.tv_gold_num).setOnClickListener(v -> {
|
||||
clearSelect(); // 清除所有选中状态
|
||||
notifyDataSetChanged();
|
||||
|
||||
// 显示输入框
|
||||
if (inputBoxVisibilityListener != null) {
|
||||
inputBoxVisibilityListener.onInputBoxVisibilityChanged(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnRechargeItemClickListener {
|
||||
void onClick(RechargeBean rechargeBean);
|
||||
}
|
||||
|
||||
public void setListener(OnRechargeItemClickListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public interface InputBoxVisibilityListener {
|
||||
void onInputBoxVisibilityChanged(boolean isVisible);
|
||||
}
|
||||
|
||||
public void setInputBoxVisibilityListener(InputBoxVisibilityListener listener) {
|
||||
this.inputBoxVisibilityListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消所有选中
|
||||
*/
|
||||
public void clearSelect() {
|
||||
selectedPosition = -1;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import static com.qxcm.moduleutil.utils.UtilConfig.getContext;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -12,6 +15,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MeHeadView;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
@@ -38,13 +42,15 @@ public class BlackAdapter extends BaseQuickAdapter<BlackUserBean, BaseViewHolder
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, BlackUserBean item) {
|
||||
ImageUtils.loadHeadCC(item.getUserAvatar(), helper.getView(R.id.im_user));
|
||||
helper.setText(R.id.tv_nick_name, item.getUserName());
|
||||
MeHeadView headView = helper.getView(R.id.im_user);
|
||||
headView.setData(item.getAvatar(), "", item.getSex() + "");
|
||||
helper.setText(R.id.tv_nick_name, item.getNickname());
|
||||
ImageView imageView= helper.getView(R.id.im_g);
|
||||
helper.setText(R.id.tv_oline, item.getIs_online() == 1 ? "[在线]" : "[离线]");
|
||||
// 根据 type 设置图片资源
|
||||
// 根据 type 和 status 设置图片资源
|
||||
if (item.getType() == 0) { // 关注
|
||||
if (item.getStatus() == 0) {
|
||||
if (item.getIs_follow() == 1) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.yigz);
|
||||
} else {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.gz);
|
||||
@@ -52,19 +58,41 @@ public class BlackAdapter extends BaseQuickAdapter<BlackUserBean, BaseViewHolder
|
||||
} else if (item.getType() == 1) { // 黑名单
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.yic);
|
||||
} else if (item.getType() == 2) { // 粉丝
|
||||
if (item.getStatus() == 0) {
|
||||
if (item.getIs_follow() == 1) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.hg);
|
||||
} else {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.yigz);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置点击事件
|
||||
imageView.setOnClickListener(v -> {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(item);
|
||||
}
|
||||
});
|
||||
LinearLayout llContainer =helper.getView(R.id.ll_in);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_37),
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_15)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ChatRoomMyFootAdapter extends BaseQuickAdapter<MyFootResp, BaseView
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, MyFootResp item) {
|
||||
ImageUtils.loadHeadCC(item.getRoomPicture(), helper.getView(R.id.iv_follow_bg));
|
||||
ImageUtils.loadHeadCC(item.getRoom_cover(), helper.getView(R.id.iv_follow_bg));
|
||||
// if (TextUtils.isEmpty(item.getLabel_icon())) {
|
||||
// helper.setGone(R.id.iv_room_labe, false);
|
||||
// } else {
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import static com.blankj.utilcode.util.ActivityUtils.startActivity;
|
||||
import static com.qxcm.moduleutil.utils.UtilConfig.getContext;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.text.SpannableString;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.activity.RoomDetailsActivity;
|
||||
import com.example.modulevocal.fragment.MyRoomListFragment;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.qxcm.moduleutil.RoomAutionTimeBean;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.bean.RoomRelationBean;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.ViewItem;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.widget.GifAvatarOvalView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MyCreateAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
private List<ViewItem> viewItems = new ArrayList<>();
|
||||
private int selectedRelationPosition = -1;
|
||||
private int selectedTimePosition = -1;
|
||||
private int selectedGiftPosition = -1;
|
||||
|
||||
// public void submitList(List<ViewItem> items) {
|
||||
// viewItems.clear();
|
||||
// viewItems.addAll(items);
|
||||
// notifyDataSetChanged();
|
||||
// }
|
||||
|
||||
public void submitList(List<ViewItem> items) {
|
||||
if (items == null || items.isEmpty()) {
|
||||
viewItems.clear();
|
||||
notifyDataSetChanged();
|
||||
return;
|
||||
}
|
||||
|
||||
List<ViewItem> filteredList = new ArrayList<>();
|
||||
for (ViewItem item : items) {
|
||||
int type = item.getType();
|
||||
Object data = item.getData();
|
||||
|
||||
// 判断是否为空数据
|
||||
boolean isValid = true;
|
||||
|
||||
switch (type) {
|
||||
case ViewItem.TYPE_TEXT:
|
||||
// 文本类型直接展示(字符串不会为 null)
|
||||
break;
|
||||
|
||||
case ViewItem.TYPE_RELATION:
|
||||
isValid = data instanceof MyRoomBean && ((MyRoomBean) data).getRoom_name() != null; // 假设你有一个 isValid() 方法判断是否为空
|
||||
break;
|
||||
|
||||
case ViewItem.TYPE_GIFT:
|
||||
isValid = data instanceof MyCpRoom && !TextUtils.isEmpty(((MyCpRoom) data).getRoom_name()); // 示例判断字段非空
|
||||
break;
|
||||
|
||||
case ViewItem.TYPE_IMAGE_SELECTION:
|
||||
isValid = data instanceof MyFootResp && !TextUtils.isEmpty(((MyFootResp) data).getRoom_name());
|
||||
break;
|
||||
|
||||
default:
|
||||
isValid = false; // 默认不展示未知类型
|
||||
break;
|
||||
}
|
||||
|
||||
if (isValid) {
|
||||
filteredList.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
viewItems.clear();
|
||||
viewItems.addAll(filteredList);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return viewItems.get(position).getType();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||
|
||||
switch (viewType) {
|
||||
case ViewItem.TYPE_TEXT:
|
||||
return new TextViewHolder(inflater.inflate(R.layout.room_li_bu, parent, false));
|
||||
case ViewItem.TYPE_RELATION:
|
||||
return new RelationViewHolder(inflater.inflate(R.layout.room_fragment_my_room_list, parent, false));
|
||||
case ViewItem.TYPE_GIFT:
|
||||
return new RelationViewTimHolder(inflater.inflate(R.layout.room_fragment_my_room_cp_list, parent, false));
|
||||
case ViewItem.TYPE_IMAGE_SELECTION:
|
||||
return new GiftViewHolder(inflater.inflate(R.layout.room_index_item_chatroom_my_foot, parent, false));
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown view type");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||
ViewItem item = viewItems.get(position);
|
||||
|
||||
switch (item.getType()) {
|
||||
case ViewItem.TYPE_TEXT:
|
||||
((TextViewHolder) holder).bind((String) item.getData());
|
||||
break;
|
||||
case ViewItem.TYPE_RELATION:
|
||||
MyRoomBean relationBean = (MyRoomBean) item.getData();
|
||||
((RelationViewHolder) holder).bind(relationBean);
|
||||
|
||||
break;
|
||||
case ViewItem.TYPE_IMAGE_SELECTION:
|
||||
MyFootResp myFootResp = (MyFootResp) item.getData();
|
||||
((GiftViewHolder) holder).bind(myFootResp);
|
||||
break;
|
||||
case ViewItem.TYPE_GIFT:
|
||||
|
||||
MyCpRoom roomAutionTimeBean = (MyCpRoom) item.getData();
|
||||
((RelationViewTimHolder) holder).bind(roomAutionTimeBean);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public interface OnItemSelectedListener {
|
||||
void onItemSelected(int viewType, int position);
|
||||
}
|
||||
|
||||
private OnItemSelectedListener listener;
|
||||
|
||||
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public RoomRelationBean getSelectedRelation() {
|
||||
if (selectedRelationPosition != -1) {
|
||||
ViewItem item = viewItems.get(selectedRelationPosition);
|
||||
if (item.getData() instanceof RoomRelationBean) {
|
||||
return (RoomRelationBean) item.getData();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RoomAutionTimeBean getSelectedTime() {
|
||||
if (selectedTimePosition != -1) {
|
||||
ViewItem item = viewItems.get(selectedTimePosition);
|
||||
if (item.getData() instanceof RoomAutionTimeBean) {
|
||||
return (RoomAutionTimeBean) item.getData();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RoonGiftModel getSelectedGift() {
|
||||
if (selectedGiftPosition != -1) {
|
||||
ViewItem item = viewItems.get(selectedGiftPosition);
|
||||
if (item.getData() instanceof RoonGiftModel) {
|
||||
return (RoonGiftModel) item.getData();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return viewItems.size();
|
||||
}
|
||||
|
||||
static class TextViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView textView;
|
||||
|
||||
TextViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
textView = itemView.findViewById(R.id.tv_name);
|
||||
}
|
||||
|
||||
void bind(String text) {
|
||||
textView.setText(text);
|
||||
}
|
||||
}
|
||||
|
||||
static class RelationViewHolder extends RecyclerView.ViewHolder {
|
||||
RoundedImageView riv;
|
||||
ImageView iv_play, im_sh;
|
||||
TextView tv_name;
|
||||
TextView tv_sy;
|
||||
TextView tv_user_id, tv_gz, tv_zx, tv_fw, rl_mx, tv_room_bt;
|
||||
ConstraintLayout cl_my_room_list;
|
||||
|
||||
RelationViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
riv = itemView.findViewById(R.id.riv);
|
||||
iv_play = itemView.findViewById(R.id.iv_play);
|
||||
tv_name = itemView.findViewById(R.id.tv_name);
|
||||
tv_sy = itemView.findViewById(R.id.tv_sy);
|
||||
tv_user_id = itemView.findViewById(R.id.tv_user_id);
|
||||
tv_gz = itemView.findViewById(R.id.tv_gz);
|
||||
tv_zx = itemView.findViewById(R.id.tv_zx);
|
||||
tv_fw = itemView.findViewById(R.id.tv_fw);
|
||||
rl_mx = itemView.findViewById(R.id.rl_mx);
|
||||
tv_room_bt = itemView.findViewById(R.id.tv_room_bt);
|
||||
im_sh = itemView.findViewById(R.id.im_sh);
|
||||
cl_my_room_list = itemView.findViewById(R.id.cl_my_room_list);
|
||||
}
|
||||
|
||||
void bind(MyRoomBean item) {
|
||||
ImageUtils.loadImageView(item.getRoom_cover(), riv);
|
||||
if (item.getLabel_icon() != null) {
|
||||
ImageUtils.loadImageView(item.getLabel_icon(), iv_play);
|
||||
}
|
||||
tv_name.setText(item.getRoom_name());
|
||||
tv_sy.setText(item.getToday_profit() + "");
|
||||
tv_user_id.setText("ID: " + item.getRoom_id());
|
||||
|
||||
String concernText = "关注:" + item.getFollow_num();
|
||||
SpannableString spannableString = new SpannableString(concernText);
|
||||
// 设置关注数字部分的颜色为黑色
|
||||
spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
tv_gz.setText(spannableString);
|
||||
|
||||
String concernText1 = "在线:" + item.getOnline_num();
|
||||
SpannableString spannableString1 = new SpannableString(concernText1);
|
||||
// 设置关注数字部分的颜色为黑色
|
||||
spannableString1.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText1.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
tv_zx.setText(spannableString1);
|
||||
|
||||
String concernText2 = "访问:" + item.getVisit_num();
|
||||
SpannableString spannableString2 = new SpannableString(concernText2);
|
||||
// 设置关注数字部分的颜色为黑色
|
||||
spannableString2.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText2.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
tv_fw.setText(spannableString2);
|
||||
|
||||
rl_mx.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 跳转到房间详情页面
|
||||
|
||||
startActivity(new Intent(getContext(), RoomDetailsActivity.class));
|
||||
// ARouter.getInstance().build(ARouteConstants.MY_ROOM_DETAIL).withString("roomId", item.getRoom_id() + "").withInt("type",type ).navigation();
|
||||
}
|
||||
});
|
||||
cl_my_room_list.setOnClickListener(new View.OnClickListener() {//跳转房间
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 跳转到房间
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", item.getRoom_id() + "").navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static class RelationViewTimHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
ConstraintLayout cl_my_room_list;
|
||||
GifAvatarOvalView user_avatar1, user_avatar2;
|
||||
TextView tv_gx, tv_name, tv_sy, tv_user_id, room_head_top2, room_head_top3, rl_mx, tv_time;
|
||||
ImageView iv_play;
|
||||
|
||||
RelationViewTimHolder(View itemView) {
|
||||
super(itemView);
|
||||
cl_my_room_list = itemView.findViewById(R.id.cl_my_room_list);
|
||||
user_avatar1 = itemView.findViewById(R.id.user_avatar1);
|
||||
user_avatar2 = itemView.findViewById(R.id.user_avatar2);
|
||||
tv_gx = itemView.findViewById(R.id.tv_gx);
|
||||
iv_play = itemView.findViewById(R.id.iv_play);
|
||||
tv_name = itemView.findViewById(R.id.tv_name);
|
||||
tv_sy = itemView.findViewById(R.id.tv_sy);
|
||||
tv_user_id = itemView.findViewById(R.id.tv_user_id);
|
||||
room_head_top2 = itemView.findViewById(R.id.room_head_top2);
|
||||
room_head_top3 = itemView.findViewById(R.id.room_head_top3);
|
||||
rl_mx = itemView.findViewById(R.id.rl_mx);
|
||||
tv_time = itemView.findViewById(R.id.tv_time);
|
||||
}
|
||||
|
||||
void bind(MyCpRoom item) {
|
||||
ImageUtils.loadImageView(item.getUser1_avatar(), user_avatar1);
|
||||
ImageUtils.loadImageView(item.getUser2_avatar(), user_avatar2);
|
||||
tv_gx.setText(item.getRelation());
|
||||
tv_name.setText(item.getRoom_name());
|
||||
tv_sy.setText(item.getEarnings() + "");
|
||||
tv_user_id.setText("ID: " + item.getRoom_number());
|
||||
// room_head_top2.setText();
|
||||
tv_time.setText(formatTimestampToDaysHours(Long.parseLong(item.getEnd_time())));
|
||||
rl_mx.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 跳转到房间详情页面
|
||||
|
||||
startActivity(new Intent(getContext(), RoomDetailsActivity.class));
|
||||
// ARouter.getInstance().build(ARouteConstants.MY_ROOM_DETAIL).withString("roomId", item.getRoom_id() + "").withInt("type",type ).navigation();
|
||||
}
|
||||
});
|
||||
cl_my_room_list.setOnClickListener(new View.OnClickListener() {//跳转房间
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 跳转到房间
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", item.getRoom_id() + "").navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
public static String formatTimestampToDaysHours(long timestamp) {
|
||||
// 获取当前时间戳(秒)
|
||||
long currentTimestamp = System.currentTimeMillis() / 1000;
|
||||
|
||||
// 计算时间差(秒)
|
||||
long timeDifferenceSeconds = Math.abs(currentTimestamp - timestamp);
|
||||
|
||||
// 转换为天数和小时数
|
||||
long days = timeDifferenceSeconds / (24 * 60 * 60);
|
||||
long remainingSecondsAfterDays = timeDifferenceSeconds % (24 * 60 * 60);
|
||||
long hours = remainingSecondsAfterDays / (60 * 60);
|
||||
|
||||
return days + "天 " + hours + "小时";
|
||||
}
|
||||
|
||||
static class GiftViewHolder extends RecyclerView.ViewHolder {
|
||||
RoundedImageView iv_follow_bg;
|
||||
ImageView iv_type, iv_play;
|
||||
TextView tv_name, tv_num;
|
||||
ConstraintLayout rl_root;
|
||||
|
||||
GiftViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
iv_follow_bg = itemView.findViewById(R.id.iv_follow_bg);
|
||||
iv_type = itemView.findViewById(R.id.iv_type);
|
||||
tv_name = itemView.findViewById(R.id.tv_name);
|
||||
iv_play = itemView.findViewById(R.id.iv_play);
|
||||
tv_num = itemView.findViewById(R.id.tv_num);
|
||||
rl_root = itemView.findViewById(R.id.rl_root);
|
||||
}
|
||||
|
||||
void bind(MyFootResp item) {
|
||||
ImageUtils.loadHeadCC(item.getRoom_cover(), iv_follow_bg);
|
||||
// if (item.getLabel_id().equals("23")){
|
||||
// helper.setImageResource(R.id.iv_type, com.qxcm.moduleutil.R.mipmap.diang_c);
|
||||
// }else if (item.getLabel_id().equals("108")){
|
||||
// helper.setImageResource(R.id.iv_type, com.qxcm.moduleutil.R.mipmap.youxi);
|
||||
// }else if (item.getLabel_id().equals("101")){
|
||||
// helper.setImageResource(R.id.iv_type, com.qxcm.moduleutil.R.mipmap.youxi);
|
||||
// } else if (item.getLabel_id().equals("120")){//女神
|
||||
// helper.setImageResource(R.id.iv_type, com.qxcm.moduleutil.R.mipmap.nvshen);
|
||||
// }else if (item.getLabel_id().equals("121")){//男神
|
||||
// helper.setImageResource(R.id.iv_type, com.qxcm.moduleutil.R.mipmap.nans);
|
||||
// }
|
||||
|
||||
ImageUtils.loadHeadCC(item.getLabel_icon(), iv_type);
|
||||
|
||||
tv_name.setText(item.getRoom_name());
|
||||
tv_num.setText(item.getPopularity());
|
||||
|
||||
ImageUtils.loadRes(com.qxcm.moduleutil.R.drawable.voice_play, iv_play);
|
||||
rl_root.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", item.getRoom_id() + "").navigation();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,9 +15,9 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<GiftBean, BaseViewHold
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, GiftBean item) {
|
||||
ImageLoader.loadImage(mContext, helper.getView(R.id.riv_user_head), item.getPicture());
|
||||
helper.setText(R.id.tv_gift_name, item.getName()).setText(R.id.tv_number, "x"+item.getNumber());
|
||||
helper.setText(R.id.tv_price33, item.getPrice());
|
||||
// ImageLoader.loadImage(mContext, helper.getView(R.id.riv_user_head), item.getPicture());
|
||||
// helper.setText(R.id.tv_gift_name, item.getName()).setText(R.id.tv_number, "x"+item.getNumber());
|
||||
// helper.setText(R.id.tv_price33, item.getPrice());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.example.modulevocal.conacts;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.bean.UserFollowBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlacklistConacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void getUserFollowList(List<BlackUserBean> list, String type);
|
||||
|
||||
void userGuanzSuccess(String s);
|
||||
void removeBlackList();
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
void getUserFollowList(String type, String page, String page_limit);
|
||||
|
||||
void userGuanz(String userId,String type);
|
||||
|
||||
void removeBlackList(String userId);
|
||||
}
|
||||
}
|
||||
@@ -14,22 +14,26 @@ public final class CreatedRoomConactos {
|
||||
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
void checkTxtSuccess(CheckTxtResp result);
|
||||
void checkTxtSuccess(String result);
|
||||
|
||||
void addUserRoomSuccess(String roomId);
|
||||
|
||||
|
||||
void upLoadSuccess(String url, int type);
|
||||
|
||||
void suijiRoomName(String s);
|
||||
}
|
||||
|
||||
|
||||
public interface ICreatedRoomPre extends IPresenter {
|
||||
void checkTxt(String content);
|
||||
void checkTxt(String room_name,String room_cover,String room_intro);
|
||||
|
||||
void addUserRoom(String roomName, String labelId,String cover_picture);
|
||||
|
||||
void roomLabel(String from);
|
||||
|
||||
void uploadFile(File file, int type);
|
||||
|
||||
void roomName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,17 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.WalletBean;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public final class MyMoneyConactos {
|
||||
public interface View extends IView<Activity> {
|
||||
void wallet(WalletBean walletBean);
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
|
||||
void wallet();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.AttentionResp;
|
||||
import com.qxcm.moduleutil.bean.ManageRoomResp;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.bean.RoomDetails;
|
||||
@@ -22,12 +23,14 @@ public final class MyRoomListContacts {
|
||||
|
||||
void delfootSuccess();
|
||||
|
||||
void setMyFootData(List<MyFootResp> data, int page);
|
||||
void setMyFootData(List<MyFootResp> data,int page);
|
||||
void finishRefresh();
|
||||
|
||||
void setManageData(List<ManageRoomResp> data);
|
||||
|
||||
void setAttentionListData(List<AttentionResp> attentionResps);
|
||||
|
||||
void myCpRoom(List<MyCpRoom> list);
|
||||
}
|
||||
|
||||
public interface IRankingListPre extends IPresenter {
|
||||
@@ -45,6 +48,8 @@ public final class MyRoomListContacts {
|
||||
void getManageLists();
|
||||
|
||||
void getAttentionList();
|
||||
|
||||
void myCpRoom();
|
||||
}
|
||||
|
||||
public interface DeatilsView extends IView<Activity> {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
cirleListAdapter = new CirleListAdapter();
|
||||
cirleListAdapter = new CirleListAdapter(CirleListAdapter.PAGE_SEARCH);
|
||||
mBinding.recyclerView.setAdapter(cirleListAdapter);
|
||||
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@@ -89,7 +89,7 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
cirleListAdapter.notifyItemChanged(position);
|
||||
cirleListAdapter.updateLikeStatusOnly(position, item.getIs_like());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,12 +101,12 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), getChildFragmentManager());
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()),item.getUser_id()+"", getChildFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getTopic_id(),1);
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getTopic_id(),1,item.getUser_id()+"");
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
@@ -130,6 +130,12 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
public void onRelaClick(CircleListBean item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGensui(CircleListBean item) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form","首页热门列表").withString("roomId", item.getRoom_id()).navigation();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.qxcm.moduleutil.bean.UserImgList;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -75,6 +76,7 @@ public class MyAlbumFragment extends BaseMvpFragment<MyAlbumPresenter, FragmentM
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
mAdapter = new MyAlbumListAdapter();
|
||||
mBinding.dyImageRecyc.setLayoutManager(new GridLayoutManager(getActivity(), 2));
|
||||
mBinding.dyImageRecyc.setAdapter(mAdapter);
|
||||
@@ -98,6 +100,13 @@ public class MyAlbumFragment extends BaseMvpFragment<MyAlbumPresenter, FragmentM
|
||||
}
|
||||
}
|
||||
});
|
||||
List<AlbumBean> list = new ArrayList<>();
|
||||
if (userId.equals(SpUtil.getUserId()+"")){
|
||||
AlbumBean albumBean = new AlbumBean();
|
||||
albumBean.setId("0");
|
||||
list.add(albumBean);
|
||||
mAdapter.setNewData(list);
|
||||
}
|
||||
}
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"})
|
||||
private void showPasswordInputDialog(AlbumBean item) {
|
||||
|
||||
@@ -12,20 +12,28 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.activity.RoomDetailsActivity;
|
||||
import com.example.modulevocal.adapter.ChatRoomMyFootAdapter;
|
||||
import com.example.modulevocal.adapter.MyCreateAdapter;
|
||||
import com.example.modulevocal.conacts.MyRoomListContacts;
|
||||
import com.example.modulevocal.databinding.RoomFragmentMyCreateBinding;
|
||||
import com.example.modulevocal.presenter.MyRoomPresenter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.RoomAutionTimeBean;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.AttentionResp;
|
||||
import com.qxcm.moduleutil.bean.ManageRoomResp;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.bean.RoomRelationBean;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.ViewItem;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.widget.CommonEmptyView;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommonDialog;
|
||||
@@ -34,10 +42,11 @@ import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*我创建的房间列表和足迹列表
|
||||
* 我创建的房间列表和足迹列表
|
||||
*/
|
||||
public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragmentMyCreateBinding> implements MyRoomListContacts.View {
|
||||
public static final int TYPE_CREATE = 0;
|
||||
@@ -46,6 +55,11 @@ public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
private BaseQuickAdapter<MyRoomBean, BaseViewHolder> mAdapter;
|
||||
private int page = 1;
|
||||
private ChatRoomMyFootAdapter mChatRoomMyFootAdapter;
|
||||
|
||||
private MyCreateAdapter adapter;
|
||||
|
||||
private List<ViewItem> viewItems = new ArrayList<>();
|
||||
|
||||
public static MyCreateFragment newInstance(int type) {
|
||||
MyCreateFragment fragment = new MyCreateFragment();
|
||||
Bundle args = new Bundle();
|
||||
@@ -58,20 +72,23 @@ public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
protected MyRoomPresenter bindPresenter() {
|
||||
return new MyRoomPresenter(this, getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initArgs(Bundle arguments) {
|
||||
super.initArgs(arguments);
|
||||
type = arguments.getInt("type", MyCreateFragment.TYPE_CREATE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
if (type == MyCreateFragment.TYPE_CREATE) {
|
||||
MvpPre.getCharmList(0);//我创建的
|
||||
MvpPre.getMyFoot(page);
|
||||
|
||||
} else if (type == MyCreateFragment.TYPE_HOST) {
|
||||
MvpPre.getWealthList(1);
|
||||
MvpPre.getCharmList(1);
|
||||
}
|
||||
}
|
||||
|
||||
private void showDelFootDialog() {
|
||||
if (isAdded() && getActivity() != null) {
|
||||
CommonDialog commonDialog = new CommonDialog(getActivity());
|
||||
@@ -90,122 +107,147 @@ public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
commonDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getMyFoot(page);
|
||||
}
|
||||
// mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
// @Override
|
||||
// public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
// page++;
|
||||
// MvpPre.getMyFoot(page);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
//// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
// page = 1;
|
||||
// MvpPre.getMyFoot(page);
|
||||
// }
|
||||
// });
|
||||
// mBinding.ivDeleteFoot.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// showDelFootDialog();
|
||||
// //A0404点击删除我的足迹
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// mBinding.recycleViewFoot.setLayoutManager(new GridLayoutManager(getContext(), 2));
|
||||
// mBinding.recycleViewFoot.setAdapter(mChatRoomMyFootAdapter = new ChatRoomMyFootAdapter());
|
||||
// mChatRoomMyFootAdapter.bindToRecyclerView(mBinding.recycleViewFoot);
|
||||
// CommonEmptyView commonEmptyView = new CommonEmptyView(getContext());
|
||||
// commonEmptyView.setEmptyText("亲亲,你还没去过任何房间哦~赶快动起来吧!");
|
||||
// commonEmptyView.setTextColor(getResources().getColor(com.qxcm.moduleutil.R.color.color_FFBDBDBC));
|
||||
// mChatRoomMyFootAdapter.setEmptyView(commonEmptyView);
|
||||
//
|
||||
//
|
||||
// mChatRoomMyFootAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
// @Override
|
||||
// public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
// MyFootResp item = mChatRoomMyFootAdapter.getItem(position);
|
||||
// if (item != null) {
|
||||
//// ARouter.getInstance().build(ARouteConstants.LIVE_ROOM).withString("form", "历史记录列表").withString("roomId", item.getRoom_id()).navigation();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getMyFoot(page);
|
||||
}
|
||||
});
|
||||
mBinding.ivDeleteFoot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showDelFootDialog();
|
||||
//A0404点击删除我的足迹
|
||||
}
|
||||
});
|
||||
// mBinding.rvMyRoomList.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
// mAdapter = new BaseQuickAdapter<MyRoomBean, BaseViewHolder>(R.layout.room_fragment_my_room_list, null) {
|
||||
// @Override
|
||||
// protected void convert(BaseViewHolder helper, MyRoomBean item) {
|
||||
// if (item.getRoom_cover() == null || item.getRoom_cover().equals("")) {
|
||||
// helper.setImageResource(R.id.riv, com.qxcm.moduleutil.R.mipmap.default_avatar);
|
||||
// } else {
|
||||
// ImageUtils.loadImageView(item.getRoom_cover(), helper.getView(R.id.riv));
|
||||
// }
|
||||
// if (item.getLabel_icon() != null) {
|
||||
// ImageUtils.loadImageView(item.getLabel_icon(), helper.getView(R.id.iv_play));
|
||||
// }
|
||||
//
|
||||
// helper.setText(R.id.tv_name, item.getRoom_name());
|
||||
// helper.setText(R.id.tv_sy, item.getToday_profit() + "");
|
||||
// helper.setText(R.id.tv_user_id, "ID: " + item.getRoom_id());
|
||||
// if (type == MyRoomListFragment.TYPE_CREATE) {
|
||||
// helper.setText(R.id.tv_bl, "今日收益");
|
||||
// } else if (type == MyRoomListFragment.TYPE_HOST) {
|
||||
// helper.setText(R.id.tv_bl, "收益分成比例: " + item.getEarnings_ratio() + "%");
|
||||
// }
|
||||
//
|
||||
// String concernText = "关注:" + item.getFollow_num();
|
||||
// SpannableString spannableString = new SpannableString(concernText);
|
||||
// // 设置关注数字部分的颜色为黑色
|
||||
// spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// helper.setText(R.id.tv_gz, spannableString);
|
||||
//
|
||||
// String concernText1 = "在线:" + item.getOnline_num();
|
||||
// SpannableString spannableString1 = new SpannableString(concernText1);
|
||||
// // 设置关注数字部分的颜色为黑色
|
||||
// spannableString1.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText1.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// helper.setText(R.id.tv_zx, spannableString1);
|
||||
//
|
||||
// String concernText2 = "访问:" + item.getVisit_num();
|
||||
// SpannableString spannableString2 = new SpannableString(concernText2);
|
||||
// // 设置关注数字部分的颜色为黑色
|
||||
// spannableString2.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText2.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
// helper.setText(R.id.tv_fw, spannableString2);
|
||||
//
|
||||
// helper.getView(R.id.rl_mx).setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// // TODO: 跳转到房间详情页面
|
||||
//
|
||||
// startActivity(new Intent(getContext(), RoomDetailsActivity.class));
|
||||
//// ARouter.getInstance().build(ARouteConstants.MY_ROOM_DETAIL).withString("roomId", item.getRoom_id() + "").withInt("type",type ).navigation();
|
||||
// }
|
||||
// });
|
||||
// helper.getView(R.id.cl_my_room_list).setOnClickListener(new View.OnClickListener() {//跳转房间
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// // TODO: 跳转到房间
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", item.getRoom_id() + "").navigation();
|
||||
// }
|
||||
// });
|
||||
// switch (helper.getLayoutPosition() % 3) {
|
||||
// case 0:
|
||||
// helper.getView(R.id.cl_my_room_list).setBackgroundResource(com.qxcm.moduleutil.R.drawable.bg_room_cr_f4ff6);
|
||||
// break;
|
||||
// case 1:
|
||||
// helper.getView(R.id.cl_my_room_list).setBackgroundResource(com.qxcm.moduleutil.R.drawable.bg_room_cr_f4ff6);
|
||||
// break;
|
||||
// case 2:
|
||||
// helper.getView(R.id.cl_my_room_list).setBackgroundResource(com.qxcm.moduleutil.R.drawable.bg_room_cr_f4ff6);
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// };
|
||||
// mBinding.rvMyRoomList.setAdapter(mAdapter);
|
||||
// mAdapter.bindToRecyclerView(mBinding.rvMyRoomList);
|
||||
|
||||
mBinding.recycleViewFoot.setLayoutManager(new GridLayoutManager(getContext(),2));
|
||||
mBinding.recycleViewFoot.setAdapter(mChatRoomMyFootAdapter = new ChatRoomMyFootAdapter());
|
||||
mChatRoomMyFootAdapter.bindToRecyclerView(mBinding.recycleViewFoot);
|
||||
CommonEmptyView commonEmptyView = new CommonEmptyView(getContext());
|
||||
commonEmptyView.setEmptyText("亲亲,你还没去过任何房间哦~赶快动起来吧!");
|
||||
commonEmptyView.setTextColor(getResources().getColor(com.qxcm.moduleutil.R.color.color_FFBDBDBC));
|
||||
mChatRoomMyFootAdapter.setEmptyView(commonEmptyView);
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(requireContext(), 2); // 最大支持 4 列
|
||||
mBinding.rvMyRoomList.setLayoutManager(layoutManager);
|
||||
mBinding.rvMyRoomList.setAdapter(adapter = new MyCreateAdapter());
|
||||
|
||||
|
||||
mChatRoomMyFootAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
// 设置 SpanSizeLookup 控制不同 item 占据的列数
|
||||
layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
MyFootResp item = mChatRoomMyFootAdapter.getItem(position);
|
||||
if (item != null) {
|
||||
// ARouter.getInstance().build(ARouteConstants.LIVE_ROOM).withString("form", "历史记录列表").withString("roomId", item.getRoom_id()).navigation();
|
||||
public int getSpanSize(int position) {
|
||||
int viewType = adapter.getItemViewType(position);
|
||||
switch (viewType) {
|
||||
case ViewItem.TYPE_TEXT:
|
||||
case ViewItem.TYPE_RELATION:
|
||||
case ViewItem.TYPE_GIFT:
|
||||
return 2; // 占满一行
|
||||
case ViewItem.TYPE_IMAGE_SELECTION:
|
||||
return 1; // 每行两个
|
||||
default:
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
});
|
||||
// mBinding.rvMyRoomList.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
mBinding.rvMyRoomList.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
mAdapter = new BaseQuickAdapter<MyRoomBean, BaseViewHolder>(R.layout.room_fragment_my_room_list, null) {
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, MyRoomBean item) {
|
||||
if (item.getCover_picture() == null||item.getCover_picture().equals("")) {
|
||||
helper.setImageResource(R.id.riv, com.qxcm.moduleutil.R.mipmap.default_avatar);
|
||||
} else {
|
||||
ImageUtils.loadImageView(item.getCover_picture(), helper.getView(R.id.riv));
|
||||
}
|
||||
if (item.getLabel_icon()!=null) {
|
||||
ImageUtils.loadImageView(item.getLabel_icon(), helper.getView(R.id.iv_play));
|
||||
}
|
||||
|
||||
helper.setText(R.id.tv_name, item.getRoom_name());
|
||||
helper.setText(R.id.tv_sy, item.getToday_income()+"");
|
||||
helper.setText(R.id.tv_user_id, "ID: " + item.getRoom_id());
|
||||
if (type == MyRoomListFragment.TYPE_CREATE) {
|
||||
helper.setText(R.id.tv_bl, "今日收益");
|
||||
} else if (type == MyRoomListFragment.TYPE_HOST) {
|
||||
helper.setText(R.id.tv_bl, "收益分成比例: " + item.getEarnings_ratio() + "%");
|
||||
}
|
||||
|
||||
String concernText = "关注:" + item.getFavorite_count();
|
||||
SpannableString spannableString = new SpannableString(concernText);
|
||||
// 设置关注数字部分的颜色为黑色
|
||||
spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
helper.setText(R.id.tv_gz, spannableString);
|
||||
|
||||
String concernText1 = "在线:" + item.getOnline_num();
|
||||
SpannableString spannableString1 = new SpannableString(concernText1);
|
||||
// 设置关注数字部分的颜色为黑色
|
||||
spannableString1.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText1.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
helper.setText(R.id.tv_zx, spannableString1);
|
||||
|
||||
String concernText2 = "访问:" + item.getCome_count();
|
||||
SpannableString spannableString2 = new SpannableString(concernText2);
|
||||
// 设置关注数字部分的颜色为黑色
|
||||
spannableString2.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), android.R.color.black)), 2, concernText2.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
helper.setText(R.id.tv_fw, spannableString2);
|
||||
|
||||
helper.getView(R.id.rl_mx).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 跳转到房间详情页面
|
||||
|
||||
startActivity(new Intent(getContext(),RoomDetailsActivity.class));
|
||||
// ARouter.getInstance().build(ARouteConstants.MY_ROOM_DETAIL).withString("roomId", item.getRoom_id() + "").withInt("type",type ).navigation();
|
||||
}
|
||||
});
|
||||
helper.getView(R.id.cl_my_room_list).setOnClickListener(new View.OnClickListener() {//跳转房间
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO: 跳转到房间
|
||||
// ARouter.getInstance().build(ARouteConstants.LIVE_ROOM).withString("from", "我的界面").withString("roomId", item.getRoom_id() + "").navigation();
|
||||
}
|
||||
});
|
||||
switch (helper.getLayoutPosition() % 3) {
|
||||
case 0:
|
||||
helper.getView(R.id.cl_my_room_list).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.my_cr_room1);
|
||||
break;
|
||||
case 1:
|
||||
helper.getView(R.id.cl_my_room_list).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.my_croom2);
|
||||
break;
|
||||
case 2:
|
||||
helper.getView(R.id.cl_my_room_list).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.my_croom3);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
mBinding.rvMyRoomList.setAdapter(mAdapter);
|
||||
mAdapter.bindToRecyclerView(mBinding.rvMyRoomList);
|
||||
|
||||
// adapter.bindToRecyclerView(mBinding.rvMyRoomList);
|
||||
|
||||
}
|
||||
|
||||
@@ -222,27 +264,39 @@ public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
@Override
|
||||
public void setList(List<MyRoomBean> list, int type) {
|
||||
// TODO: 刷新列表
|
||||
if (type == MyCreateFragment.TYPE_CREATE) {
|
||||
if (list.isEmpty()) {
|
||||
mBinding.rvMyRoomList.setVisibility(View.GONE);
|
||||
mBinding.tvNoData.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.rvMyRoomList.setVisibility(View.VISIBLE);
|
||||
mBinding.tvNoData.setVisibility(View.GONE);
|
||||
mAdapter.setNewData(list);
|
||||
}
|
||||
// if (type == MyCreateFragment.TYPE_CREATE) {
|
||||
// if (list.isEmpty()) {
|
||||
// mBinding.rvMyRoomList.setVisibility(View.GONE);
|
||||
// mBinding.tvNoData.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.rvMyRoomList.setVisibility(View.VISIBLE);
|
||||
// mBinding.tvNoData.setVisibility(View.GONE);
|
||||
// mAdapter.setNewData(list);
|
||||
// }
|
||||
//
|
||||
// } else if (type == MyCreateFragment.TYPE_HOST) {
|
||||
// if (list.isEmpty()) {
|
||||
// mBinding.rvMyRoomList.setVisibility(View.GONE);
|
||||
// mBinding.tvNoData.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.rvMyRoomList.setVisibility(View.VISIBLE);
|
||||
// mBinding.tvNoData.setVisibility(View.GONE);
|
||||
// mAdapter.setNewData(list);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
} else if (type == MyCreateFragment.TYPE_HOST) {
|
||||
if (list.isEmpty()) {
|
||||
mBinding.rvMyRoomList.setVisibility(View.GONE);
|
||||
mBinding.tvNoData.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.rvMyRoomList.setVisibility(View.VISIBLE);
|
||||
mBinding.tvNoData.setVisibility(View.GONE);
|
||||
mAdapter.setNewData(list);
|
||||
}
|
||||
if (list != null) {
|
||||
|
||||
mBinding.rvMyRoomList.setVisibility(View.VISIBLE);
|
||||
mBinding.tvNoData.setVisibility(View.GONE);
|
||||
for (MyRoomBean item : list) {
|
||||
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_RELATION, item));
|
||||
}
|
||||
// adapter.submitList(viewItems);
|
||||
}
|
||||
MvpPre.myCpRoom();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -252,22 +306,23 @@ public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
ToastUtils.show("清空足迹成功");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setMyFootData(List<MyFootResp> data, int page) {
|
||||
// if (data == null || data.size() == 0) {
|
||||
// mBinding.ivDeleteFoot.setVisibility(View.GONE);
|
||||
// if (page == 1) {
|
||||
// mChatRoomMyFootAdapter.setNewData(data);
|
||||
// } else {
|
||||
// mBinding.ivDeleteFoot.setVisibility(View.VISIBLE);
|
||||
// if (data == null || data.size() == 0) {
|
||||
// mBinding.smartRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||
// } else {
|
||||
// mChatRoomMyFootAdapter.addData(data);
|
||||
// }
|
||||
// }
|
||||
if (page == 1) {
|
||||
mChatRoomMyFootAdapter.setNewData(data);
|
||||
} else {
|
||||
if (data == null || data.size() == 0) {
|
||||
mBinding.smartRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||
} else {
|
||||
mChatRoomMyFootAdapter.addData(data);
|
||||
}
|
||||
|
||||
for (MyFootResp item : data) {
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_IMAGE_SELECTION, item));
|
||||
}
|
||||
adapter.submitList(viewItems);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -285,4 +340,42 @@ public class MyCreateFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
public void setAttentionListData(List<AttentionResp> attentionResps) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myCpRoom(List<MyCpRoom> list) {
|
||||
if (list != null) {
|
||||
for (MyCpRoom item : list) {
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_GIFT, item));
|
||||
}
|
||||
}
|
||||
MvpPre.getMyFoot(1);
|
||||
}
|
||||
|
||||
|
||||
// private void upList(){
|
||||
// if (roomAuctionABean != null) {
|
||||
// // 添加文本项
|
||||
// viewItems.add(new ViewItem(ViewItem.TYPE_TEXT, ""));
|
||||
//
|
||||
// // 添加关系列表
|
||||
// for (RoomRelationBean bean : roomAuctionABean.getRoomRelationBeanList()) {
|
||||
// viewItems.add(new ViewItem(ViewItem.TYPE_RELATION, bean));
|
||||
// }
|
||||
//
|
||||
// if (type.equals("2")){
|
||||
// viewItems.add(new ViewItem(ViewItem.TYPE_TEXT, "选择时长"));
|
||||
// for (RoomAutionTimeBean bean : getDefaultTimeOptions()) {
|
||||
// viewItems.add(new ViewItem(ViewItem.TYPE_IMAGE_SELECTION, bean));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// viewItems.add(new ViewItem(ViewItem.TYPE_TEXT, "选择礼物"));
|
||||
// // 添加礼物列表
|
||||
// for (RoonGiftModel bean : roomAuctionABean.getRoomGiftBeanList()) {
|
||||
// viewItems.add(new ViewItem(ViewItem.TYPE_GIFT, bean));
|
||||
// }
|
||||
//
|
||||
// adapter.submitList(viewItems);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.example.modulevocal.presenter.MyRoomPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.AttentionResp;
|
||||
import com.qxcm.moduleutil.bean.ManageRoomResp;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.widget.CommonEmptyView;
|
||||
@@ -50,7 +51,7 @@ public class MyFollowFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
@Override
|
||||
protected void initData() {
|
||||
if (type == MyFollowFragment.TYPE_GZ) {
|
||||
MvpPre.getAttentionList();
|
||||
MvpPre.getCharmList(4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,4 +115,9 @@ public class MyFollowFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
public void setAttentionListData(List<AttentionResp> attentionResps) {
|
||||
followAdapter.setNewData(attentionResps);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myCpRoom(List<MyCpRoom> list) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.example.modulevocal.presenter.MyRoomPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.AttentionResp;
|
||||
import com.qxcm.moduleutil.bean.ManageRoomResp;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.widget.CommonEmptyView;
|
||||
@@ -53,7 +54,7 @@ public class MyManageFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
@Override
|
||||
protected void initData() {
|
||||
if (type == MyManageFragment.TYPE_GL) {
|
||||
MvpPre.getManageLists();
|
||||
MvpPre.getCharmList(3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,4 +117,9 @@ public class MyManageFragment extends BaseMvpFragment<MyRoomPresenter, RoomFragm
|
||||
public void setAttentionListData(List<AttentionResp> attentionResps) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myCpRoom(List<MyCpRoom> list) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import com.example.modulevocal.presenter.MyRoomPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.AttentionResp;
|
||||
import com.qxcm.moduleutil.bean.ManageRoomResp;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
@@ -86,10 +87,10 @@ public class MyRoomListFragment extends BaseMvpFragment<MyRoomPresenter, RoomFra
|
||||
mAdapter = new BaseQuickAdapter<MyRoomBean, BaseViewHolder>(R.layout.room_fragment_my_room_list, null) {
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, MyRoomBean item) {
|
||||
if (item.getCover_picture() == null||item.getCover_picture().equals("")) {
|
||||
if (item.getRoom_cover() == null||item.getRoom_cover().equals("")) {
|
||||
helper.setImageResource(R.id.riv, com.qxcm.moduleutil.R.mipmap.default_avatar);
|
||||
} else {
|
||||
ImageUtils.loadImageView(item.getCover_picture(), helper.getView(R.id.riv));
|
||||
ImageUtils.loadImageView(item.getRoom_cover(), helper.getView(R.id.riv));
|
||||
}
|
||||
if (item.getLabel_icon()!=null) {
|
||||
ImageUtils.loadImageView(item.getLabel_icon(), helper.getView(R.id.iv_play));
|
||||
@@ -217,4 +218,9 @@ public class MyRoomListFragment extends BaseMvpFragment<MyRoomPresenter, RoomFra
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myCpRoom(List<MyCpRoom> list) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ 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.example.modulevocal.R;
|
||||
@@ -26,6 +27,7 @@ import com.qxcm.moduleutil.bean.MyBagBean;
|
||||
import com.qxcm.moduleutil.bean.UserHomeResp;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserTagBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
@@ -59,11 +61,11 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
|
||||
@Override
|
||||
public void userGuanzSuccess(String s) {
|
||||
if (userInfo.getIs_follow().equals("1")) {
|
||||
userInfo.setIs_follow("0");
|
||||
if (userInfo.getIs_follow()==1) {
|
||||
userInfo.setIs_follow(0);
|
||||
SpUtil.saveUserInfo(userInfo);
|
||||
} else {
|
||||
userInfo.setIs_follow("1");
|
||||
userInfo.setIs_follow(1);
|
||||
SpUtil.saveUserInfo(userInfo);
|
||||
}
|
||||
refreshView();
|
||||
@@ -105,7 +107,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
mBinding.headerInfo.rivUserHead.setData(userInfo.getAvatar(), "", userInfo.getSex() + "");
|
||||
mBinding.headerInfo.tvNickName.setText(userInfo.getNickname());
|
||||
mBinding.headerInfo.tvUserId.setText(userInfo.getId() + "");
|
||||
mBinding.headerInfo.tvUserId.setText(userInfo.getUser_id() + "");
|
||||
mBinding.headerInfo.tvAge.setText(userInfo.getAge() + "");
|
||||
mBinding.headerInfo.tvJj.setText(userInfo.getProfile());
|
||||
LinearLayout llContainer = mBinding.headerInfo.llImageContainer;
|
||||
@@ -161,16 +163,16 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
} else {
|
||||
mBinding.headerInfo.tvGsSx.setVisibility(View.VISIBLE);
|
||||
mBinding.headerInfo.tvGz.setVisibility(View.VISIBLE);
|
||||
if (userInfo.getIs_follow().equals("0")) {
|
||||
if (userInfo.getIs_follow()==1) {
|
||||
mBinding.headerInfo.tvGz.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.gz));
|
||||
|
||||
} else {
|
||||
mBinding.headerInfo.tvGz.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.yigz));
|
||||
}
|
||||
if (userInfo.getIs_room().equals("0")) {
|
||||
mBinding.headerInfo.tvGsSx.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.gsui));
|
||||
} else {
|
||||
if (userInfo.getRoom_id()==null||userInfo.getRoom_id().equals("0")) {
|
||||
mBinding.headerInfo.tvGsSx.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.six));
|
||||
} else {
|
||||
mBinding.headerInfo.tvGsSx.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.gsui));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -178,13 +180,15 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.tv_gz) {
|
||||
MvpPre.userGuanz(userInfo.getId() + "", "1");
|
||||
MvpPre.userGuanz(userInfo.getUser_id() + "", "1");
|
||||
} else if (view.getId() == R.id.tv_gs_sx) {
|
||||
if (userInfo.getIs_room().equals("0")){
|
||||
if (userInfo.getRoom_id()==null||userInfo.getRoom_id().equals("0")){
|
||||
Intent intent=new Intent(getActivity(), TUIC2CChatActivity.class);
|
||||
intent.putExtra(TUIConstants.TUIChat.CHAT_ID, "u"+userInfo.getId());
|
||||
intent.putExtra(TUIConstants.TUIChat.CHAT_ID, "u"+userInfo.getUser_id());
|
||||
intent.putExtra(TUIConstants.TUIChat.CHAT_TYPE, V2TIMConversation.V2TIM_C2C);
|
||||
startActivity(intent);
|
||||
}else {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("room_id", userInfo.getRoom_id()).navigation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,9 +302,9 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
@Override
|
||||
public void myInfoSuccess(UserInfo data) {
|
||||
SpUtil.saveUserInfo(data);
|
||||
mBinding.rivUserHead.setData(data.getAvatar(), "", String.valueOf(data.getSex()));
|
||||
mBinding.rivUserHead.setData(data.getAvatar(), data.getDress(), String.valueOf(data.getSex()));
|
||||
mBinding.tvNickName.setText(data.getNickname());
|
||||
mBinding.beautifulView.setText("ID:"+data.getId());
|
||||
mBinding.beautifulView.setText("ID:"+data.getUser_code());
|
||||
mBinding.tvFollow.setText(data.getFollow_num()+"");
|
||||
mBinding.tvFans.setText(data.getFans_num()+"");
|
||||
mBinding.tvFriends.setText(data.getLook_me_num()+"");
|
||||
|
||||
@@ -80,10 +80,10 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
|
||||
|
||||
if ("svga".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
|
||||
// imageBg.playSVGA(list.get(position).getPlay_image());
|
||||
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.SVGA,1);
|
||||
imageBg.setSource(list.get(position).getPlay_image(),1);
|
||||
} else if ("mp4".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
|
||||
// imageBg.playMP4(Uri.parse(list.get(position).getPlay_image()));
|
||||
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.MP4,1);
|
||||
imageBg.setSource(list.get(position).getPlay_image(),1);
|
||||
}
|
||||
} else if (pSelect != -1 && pSelect == position) {
|
||||
list.get(position).setIs_select(false);
|
||||
@@ -99,10 +99,10 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
|
||||
// ImageUtils.loadDecorationAvatar(list.get(position).getPlay_image(), imageBg);
|
||||
// imageBg.load(list.get(position).getPlay_image());
|
||||
if ("svga".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
|
||||
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.SVGA,1);
|
||||
imageBg.setSource(list.get(position).getPlay_image(),1);
|
||||
// imageBg.playSVGA(list.get(position).getPlay_image());
|
||||
} else if ("mp4".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
|
||||
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.MP4,1);
|
||||
imageBg.setSource(list.get(position).getPlay_image(), 1);
|
||||
// imageBg.playMP4(Uri.parse(list.get(position).getPlay_image()));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.example.modulevocal.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulevocal.conacts.BlacklistConacts;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.bean.UserFollowBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class BlacklistPresenter extends BasePresenter<BlacklistConacts.View> implements BlacklistConacts.IMePre{
|
||||
public BlacklistPresenter(BlacklistConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getUserFollowList(String type, String page, String page_limit) {
|
||||
if (type.equals("0")){
|
||||
api.getUserFollowList(page, page_limit, new BaseObserver<List<BlackUserBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<BlackUserBean> userFollowBeans) {
|
||||
MvpRef.get().getUserFollowList(userFollowBeans, type);
|
||||
}
|
||||
});
|
||||
}else if (type.equals("2")){
|
||||
api.getUserFansList(page, page_limit, new BaseObserver<List<BlackUserBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<BlackUserBean> userFollowBeans) {
|
||||
MvpRef.get().getUserFollowList(userFollowBeans, type);
|
||||
}
|
||||
});
|
||||
}else if (type.equals("1")){
|
||||
api.getBlacklist(page, page_limit, new BaseObserver<List<BlackUserBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<BlackUserBean> userFollowBeans) {
|
||||
MvpRef.get().getUserFollowList(userFollowBeans, type);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userGuanz(String userId, String type) {
|
||||
api.userGuanz(userId,type, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().userGuanzSuccess(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBlackList(String userId) {
|
||||
api.removeBlackList(userId, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
MvpRef.get().removeBlackList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.bean.CheckTxtResp;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
import com.qxcm.moduleutil.utils.oss.OSSOperUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -20,24 +21,18 @@ public class CreatedRoomPresenter extends BasePresenter<CreatedRoomConactos.View
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkTxt(String content) {
|
||||
// MvpRef.get().showLoadings();
|
||||
// api.checkTxt(content,"2", new BaseObserver<CheckTxtResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(CheckTxtResp checkTxtResp) {
|
||||
// MvpRef.get().checkTxtSuccess(checkTxtResp);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
public void checkTxt(String room_name, String room_cover, String room_intro) {
|
||||
api.checkTxt(room_name, room_cover, room_intro, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().checkTxtSuccess(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,24 +81,38 @@ public class CreatedRoomPresenter extends BasePresenter<CreatedRoomConactos.View
|
||||
@Override
|
||||
public void uploadFile(File file, int type) {
|
||||
// MvpRef.get().showLoadings("上传中...");
|
||||
// String url = OSSOperUtils.getPath(file, type);
|
||||
// OSSOperUtils.newInstance().putObjectMethod(url, file.getPath(), new OSSOperUtils.OssCallback() {
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
// if (isViewAttach()) {
|
||||
// MvpRef.get().disLoadings();
|
||||
// MvpRef.get().upLoadSuccess(OSSOperUtils.AliYunOSSURLFile + url, type);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFail() {
|
||||
// if (isViewAttach()) {
|
||||
// ToastUtils.show("上传失败");
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
String url = OSSOperUtils.getPath(file, type);
|
||||
OSSOperUtils.newInstance().putObjectMethod(url, file.getPath(), new OSSOperUtils.OssCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (isViewAttach()) {
|
||||
MvpRef.get().disLoadings();
|
||||
MvpRef.get().upLoadSuccess(OSSOperUtils.AliYunOSSURLFile + url, type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail() {
|
||||
if (isViewAttach()) {
|
||||
ToastUtils.show("上传失败");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void roomName() {
|
||||
api.sjRoomName(new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().suijiRoomName(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,29 @@ package com.example.modulevocal.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulevocal.conacts.MyMoneyConactos;
|
||||
import com.qxcm.moduleutil.bean.WalletBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class MyMoneyPresenter extends BasePresenter<MyMoneyConactos.View> implements MyMoneyConactos.IMePre {
|
||||
public MyMoneyPresenter(MyMoneyConactos.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallet() {
|
||||
api.wallet(new BaseObserver<WalletBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(WalletBean walletBean) {
|
||||
MvpRef.get().wallet(walletBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import android.content.Context;
|
||||
|
||||
|
||||
import com.example.modulevocal.conacts.MyRoomListContacts;
|
||||
import com.qxcm.moduleutil.bean.MyCpRoom;
|
||||
import com.qxcm.moduleutil.bean.MyFootResp;
|
||||
import com.qxcm.moduleutil.bean.MyRoomBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
@@ -25,23 +27,18 @@ public class MyRoomPresenter extends BasePresenter<MyRoomListContacts.View> impl
|
||||
@Override
|
||||
public void getCharmList(int type) {
|
||||
|
||||
// MvpRef.get().showLoadings();
|
||||
// ApiClient.getInstance().getMyRoom(new BaseObserver<List<MyRoomBean>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(List<MyRoomBean> myRoomBeans) {
|
||||
// MvpRef.get().setList(myRoomBeans,type);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// });
|
||||
api.getMyRoom(type+"", new BaseObserver<List<MyRoomBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<MyRoomBean> myRoomBeans) {
|
||||
MvpRef.get().setList(myRoomBeans,type);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -138,22 +135,18 @@ public class MyRoomPresenter extends BasePresenter<MyRoomListContacts.View> impl
|
||||
// TODO: 2025/4/15 我的足迹
|
||||
@Override
|
||||
public void getMyFoot(int page) {
|
||||
// com.qpyy.module.index.api.ApiClient.getInstance().getMyFoot(new com.qpyy.libcommon.http.BaseObserver<List<MyFootResp>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(List<MyFootResp> myFootResps) {
|
||||
// MvpRef.get().setMyFootData(myFootResps,page);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// MvpRef.get().finishRefresh();
|
||||
// }
|
||||
// },page);
|
||||
api.getMyFoot(page+"",new BaseObserver<List<MyFootResp>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<MyFootResp> myFootResps) {
|
||||
MvpRef.get().setMyFootData(myFootResps,page);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -194,4 +187,19 @@ public class MyRoomPresenter extends BasePresenter<MyRoomListContacts.View> impl
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myCpRoom() {
|
||||
api.myCpRoom(new BaseObserver<List<MyCpRoom>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<MyCpRoom> myCpRooms) {
|
||||
MvpRef.get().myCpRoom(myCpRooms);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,33 +42,17 @@ public class RealNamePresenter extends BasePresenter<RealNameConacts.View> imple
|
||||
|
||||
@Override
|
||||
public void realNameResult(String orderNo) {
|
||||
Retrofit retrofit = new Retrofit.Builder().baseUrl(CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl())
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build();
|
||||
|
||||
Call<BaseModel<String>> call=retrofit.create(ApiServer.class).getRealNameResult(orderNo);
|
||||
call.enqueue(new Callback<BaseModel<String>>() {
|
||||
api.getRealNameResult(orderNo, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code()==200){
|
||||
BaseModel<String> string=response.body();
|
||||
if (string!=null){
|
||||
int code=string.getCode();
|
||||
if (code==1){
|
||||
MvpRef.get().sendCodeSuccess();
|
||||
}else {
|
||||
ToastUtils.showShort(string.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort("上传失败");
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().sendCodeSuccess();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ public class UserGiftWallPresenter extends BasePresenter<UserGiftWallConacts.Vie
|
||||
for (int i = 0; i < 5; i++) {
|
||||
GiftBean giftBean = new GiftBean();
|
||||
giftBean.setGift_id(""+i);
|
||||
giftBean.setName("礼物"+i);
|
||||
giftBean.setPicture("");
|
||||
giftBean.setPrice(""+i);
|
||||
giftBean.setNumber("x"+i);
|
||||
// giftBean.setName("礼物"+i);
|
||||
// giftBean.setPicture("");
|
||||
// giftBean.setPrice(""+i);
|
||||
// giftBean.setNumber("x"+i);
|
||||
giftBeans.add(giftBean);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:background="@color/white"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp"/>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:id="@+id/tv_suj_room_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2"
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="#E2E2E2" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
|
||||
@@ -144,9 +144,9 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bbh"
|
||||
@@ -158,15 +158,18 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/version_number" />
|
||||
<TextView
|
||||
android:id="@+id/tv_bbh"
|
||||
style="@style/My_Info_Item_Subtitle_Style"
|
||||
android:hint="1.0.0" />
|
||||
|
||||
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_zhyjaq"
|
||||
@@ -185,10 +188,10 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5"
|
||||
android:visibility="gone"/>
|
||||
android:background="@color/color_e2e2e2"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_sjsq"
|
||||
@@ -209,7 +212,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qhch"
|
||||
style="@style/My_Info_Item_LL_Style"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r15_white">
|
||||
|
||||
<TextView
|
||||
@@ -221,40 +224,40 @@
|
||||
style="@style/My_Info_Item_Subtitle_Style"
|
||||
android:hint="0M" />
|
||||
|
||||
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qhdz"
|
||||
style="@style/My_Info_Item_LL_Style"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r15_white">
|
||||
|
||||
<TextView
|
||||
style="@style/My_Info_Item_Title_Style"
|
||||
android:text="@string/change_address" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="right"
|
||||
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||
<Switch
|
||||
android:id="@+id/swit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center"
|
||||
android:gravity="right"
|
||||
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qhzh"
|
||||
@@ -269,11 +272,12 @@
|
||||
|
||||
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_smrz"
|
||||
@@ -288,11 +292,12 @@
|
||||
|
||||
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_zhxiao"
|
||||
@@ -307,11 +312,12 @@
|
||||
|
||||
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/color_FFE5E5E5" />
|
||||
android:background="@color/color_e2e2e2" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tcdl"
|
||||
@@ -367,7 +373,7 @@
|
||||
android:text="退出登录"
|
||||
android:textColor="@color/color_text"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
@@ -8,23 +8,58 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_szmm"
|
||||
style="@style/My_Info_Item_LL_Style"
|
||||
android:background="@drawable/bg_r15_white">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_62"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
<com.qxcm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/im_user"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/me_img_upld_head" />
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@mipmap/default_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="left"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/tv_nick_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/color_FF333333"
|
||||
tools:text="@string/set_password" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_in"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nick_name"
|
||||
style="@style/My_Info_Item_Title_Style"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
tools:text="@string/set_password" />
|
||||
android:id="@+id/tv_oline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:text="[在线]"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_10"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_g"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
android:id="@+id/rv_my_room_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/common_bg_top_r15_white"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
tools:ignore="MissingConstraints"
|
||||
@@ -44,11 +43,11 @@
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_103"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_my_room_list"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="true"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="false"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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_143"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
>
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
android:id="@+id/shadow_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:hl_cornerRadius="@dimen/dp_15"
|
||||
app:hl_shadowColor="@color/black"
|
||||
app:hl_shadowHidden="true"
|
||||
app:hl_shadowLimit="3dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_my_room_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_room_cr_f4ff6"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5">
|
||||
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/riv"-->
|
||||
<!-- android:layout_width="@dimen/dp_60"-->
|
||||
<!-- android:layout_height="@dimen/dp_60"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_13"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:riv_corner_radius="@dimen/dp_6"-->
|
||||
<!-- android:scaleType="fitXY"-->
|
||||
<!-- tools:src="@mipmap/default_avatar" />-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/user_avatar1"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true"
|
||||
android:src="@mipmap/default_avatar"/>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/user_avatar2"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/cp_room_tb"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_gx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
tools:text="兄弟"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_avatar2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_play"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/dianyf"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_name"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:paddingTop="@dimen/dp_2"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"
|
||||
android:text="阿斯蒂芬就"
|
||||
android:textColor="@color/_000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_play"
|
||||
app:layout_constraintTop_toTopOf="@id/riv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="123W"
|
||||
android:textColor="@color/color_FFF78FCC"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@id/riv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:text="ID:123456"
|
||||
android:textColor="#ff666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_play"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_play" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="今日收益"
|
||||
android:textColor="#ff999999"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_sy"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_head_top2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_0DFFB9"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_user_id"
|
||||
app:layout_constraintStart_toEndOf="@+id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_user_id"
|
||||
tools:text="00000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_head_top3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@mipmap/paih"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_0DFFB9"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_user_id"
|
||||
app:layout_constraintStart_toEndOf="@+id/room_head_top2"
|
||||
tools:text="00000" />
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_e2e2e2"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@+id/riv"
|
||||
app:layout_constraintStart_toStartOf="@+id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_bl"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rl_mx"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@mipmap/room_mx"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:text="到期时间:"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toTopOf="@+id/rl_mx"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rl_mx"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:text="@string/guild"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v"
|
||||
app:layout_constraintTop_toTopOf="@+id/rl_mx"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rl_mx"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
</com.lihang.ShadowLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -3,8 +3,8 @@
|
||||
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_91"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:layout_height="@dimen/dp_143"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
>
|
||||
|
||||
<com.lihang.ShadowLayout
|
||||
@@ -24,7 +24,7 @@
|
||||
android:id="@+id/cl_my_room_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/my_cr_room1"
|
||||
android:background="@drawable/bg_room_cr_f4ff6"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5">
|
||||
@@ -34,8 +34,8 @@
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius="@dimen/dp_6"
|
||||
android:scaleType="fitXY"
|
||||
@@ -73,11 +73,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="123W"
|
||||
android:textColor="@color/color_FFF78FCC"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/rl_mx"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@id/riv" />
|
||||
|
||||
@@ -125,7 +126,6 @@
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_gz"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_user_id" />
|
||||
@@ -135,46 +135,66 @@
|
||||
android:id="@+id/tv_fw"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:text="访问:12345"
|
||||
android:textColor="@color/color_FFA5A5A5"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toStartOf="@id/rl_mx"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_user_id" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_mx"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center|center_vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/riv"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv">
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_zx" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_e2e2e2"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@+id/riv"
|
||||
app:layout_constraintStart_toStartOf="@+id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_fw"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rl_mx"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@mipmap/room_mx"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_bt"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@mipmap/room_bt"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/rl_mx"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fjmx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="1"
|
||||
android:gravity="top|center"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:text="房间明细"
|
||||
android:includeFontPadding="true"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_9"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_fjmx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_4"
|
||||
android:paddingTop="@dimen/dp_4"
|
||||
android:layout_below="@+id/tv_fjmx"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/detail_icon_go"/>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/im_sh"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:src="@mipmap/room_dsh"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
|
||||
44
modulevocal/src/main/res/layout/room_li_bu.xml
Normal file
44
modulevocal/src/main/res/layout/room_li_bu.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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_footprint"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/footprint" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_alignLeft="@+id/iv_footprint"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_21"
|
||||
android:text="历史足迹"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_delete_foot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:src="@mipmap/dele_foot" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,61 +0,0 @@
|
||||
<?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:id="@+id/cl_item"
|
||||
android:layout_width="@dimen/dp_106"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_r10_white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gold"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@mipmap/jinb"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_35"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginEnd="@dimen/dp_67"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gold_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/color_353535"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintLeft_toRightOf="@+id/iv_gold"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_gold"
|
||||
tools:text="600" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_gold"
|
||||
tools:text="¥6" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="tv_money,tv_gold_num,iv_gold" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,29 +0,0 @@
|
||||
<?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:id="@+id/cl_item"
|
||||
android:layout_width="@dimen/dp_106"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_r10_white">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gold_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_353535"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="自定义" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user