对接语圈接口,
页面基本完成,评论完成一半,需要再调试
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package com.example.modulecircle.activity;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
@@ -9,10 +12,14 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
@@ -20,6 +27,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.contacts.ReleaseContract;
|
||||
@@ -33,9 +41,13 @@ import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.adapter.UserPhotoWallAdapter;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.bean.UserImgList;
|
||||
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||
import com.qxcm.moduleutil.utils.LocationUtils;
|
||||
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.utils.location.LocationProvider;
|
||||
import com.qxcm.moduleutil.utils.location.LocationServiceFactory;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
import java.io.File;
|
||||
@@ -50,8 +62,11 @@ import java.util.List;
|
||||
*/
|
||||
public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityReleaseBinding> implements ReleaseContract.View {
|
||||
UserPhotoWallAdapter mUserPhotoWallAdapter;
|
||||
List<UserImgList> list;
|
||||
List<String> list=new ArrayList<>();
|
||||
private List<String> uploadedUrls = new ArrayList<>();//真实图片地址
|
||||
final int maxNum = 1200;
|
||||
private List<String> topicId=new ArrayList<>();
|
||||
private String city1;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
@@ -84,15 +99,23 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
mUserPhotoWallAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
int id = view.getId();
|
||||
UserImgList item = mUserPhotoWallAdapter.getItem(position);
|
||||
if (id == com.qxcm.moduleutil.R.id.iv_close) {
|
||||
// MvpPre.deletePhoto(item.getId(), position);
|
||||
String item = list.get(position);
|
||||
if (item.equals(UserPhotoWallAdapter.ADD_PHOTO)) {
|
||||
// 点击的是“+”号,启动图片选择
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.CHOOSE_REQUEST, false, 9);
|
||||
} else {
|
||||
if ("0".equals(item.getId())) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, true, 9);
|
||||
}
|
||||
// 查看大图或其他操作
|
||||
}
|
||||
|
||||
// int id = view.getId();
|
||||
// UserImgList item = mUserPhotoWallAdapter.getItem(position);
|
||||
// if (id == com.qxcm.moduleutil.R.id.iv_close) {
|
||||
//// MvpPre.deletePhoto(item.getId(), position);
|
||||
// } else {
|
||||
// if ("0".equals(item.getId())) {
|
||||
// startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, true, 9);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
});
|
||||
mUserPhotoWallAdapter.setOnItemChildLongClickListener(new BaseQuickAdapter.OnItemChildLongClickListener() {
|
||||
@@ -102,53 +125,70 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
updateAdapterData(); // 初始化时更新适配器数据
|
||||
list = new ArrayList<>();
|
||||
UserImgList userImgList = new UserImgList("0", "");
|
||||
list.add(userImgList);
|
||||
list.add("ADD_PHOTO"); // 最后一项是“添加图片”
|
||||
mUserPhotoWallAdapter.setNewData(list);
|
||||
mUserPhotoWallAdapter.setDelete(true);
|
||||
|
||||
mBinding.rl1.setOnClickListener(this::onClick);
|
||||
}
|
||||
mBinding.tvFb.setOnClickListener(this::onClick);
|
||||
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
// 请求定位权限
|
||||
ActivityCompat.requestPermissions(
|
||||
(Activity) this,
|
||||
new String[]{
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
},
|
||||
1001 // 自定义常量,比如 1001
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
LocationProvider provider = LocationServiceFactory.createBestProvider(this);
|
||||
provider.getLastKnownLocation(this, new LocationProvider.LocationCallback() {
|
||||
@Override
|
||||
public void onLocationReceived(double latitude, double longitude, String city) {
|
||||
Toast.makeText(ReleaseActivity.this, "当前位置:" + city, Toast.LENGTH_SHORT).show();
|
||||
city1=city;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorMessage) {
|
||||
Toast.makeText(ReleaseActivity.this, "定位失败:" + errorMessage, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
//更新适配器数据的方法
|
||||
private void updateAdapterData() {
|
||||
list.clear();
|
||||
list.addAll(uploadedUrls); // 添加真实图片
|
||||
list.add(UserPhotoWallAdapter.ADD_PHOTO); // 最后加上 ADD_PHOTO
|
||||
mUserPhotoWallAdapter.setNewData(list);
|
||||
}
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.rl_1) {
|
||||
dialog();
|
||||
}else if (view.getId()==R.id.tv_fb){
|
||||
if (mBinding.etG.getText().toString().isEmpty()){
|
||||
ToastUtils.showShort("请输入发布内容");
|
||||
return;
|
||||
}
|
||||
if (topicId.size()==0){
|
||||
ToastUtils.showShort("请选择话题");
|
||||
return;
|
||||
}
|
||||
|
||||
MvpPre.publishZone(TextUtils.join(",", uploadedUrls),mBinding.etG.getText().toString(),TextUtils.join(",", topicId),"",city1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void dialog() {
|
||||
|
||||
// 示例数据
|
||||
List<String> topics = Arrays.asList("话题1", "话题2", "话题3", "话题4");
|
||||
|
||||
BottomSheetDialog dialog = new BottomSheetDialog(this);
|
||||
dialog.setContentView(R.layout.bottom_sheet_recyclerview);
|
||||
|
||||
RecyclerView recyclerView = dialog.findViewById(R.id.rv_options);
|
||||
Button btnCancel = dialog.findViewById(R.id.btn_cancel);
|
||||
Button btnConfirm = dialog.findViewById(R.id.btn_confirm);
|
||||
|
||||
assert recyclerView != null;
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
MultiSelectAdapter adapter = new MultiSelectAdapter(topics);
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
btnCancel.setOnClickListener(v -> dialog.dismiss());
|
||||
|
||||
btnConfirm.setOnClickListener(v -> {
|
||||
List<String> selectedTopics = adapter.getSelectedItems();
|
||||
// 返回结果给调用页面(可使用接口或 onActivityResult 等方式)
|
||||
Log.d("Selected Topics", selectedTopics.toString());
|
||||
// 示例:更新 UI
|
||||
((TextView)findViewById(R.id.tv_ht)).setText("已选:" + TextUtils.join(",", selectedTopics));
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
|
||||
|
||||
MvpPre.topicList("1","30");
|
||||
}
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode, boolean isVideo, int type) {
|
||||
@@ -173,17 +213,29 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
switch (requestCode) {
|
||||
case PictureConfig.CHOOSE_REQUEST:
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainMultipleResult(data);
|
||||
if (localMedia != null && localMedia.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia.get(0);
|
||||
String url;
|
||||
if (imgMedia.isCompressed()) {
|
||||
url = imgMedia.getCompressPath();
|
||||
} else {
|
||||
url = imgMedia.getRealPath();
|
||||
List<LocalMedia> localMediaList = PictureSelector.obtainMultipleResult(data);
|
||||
|
||||
if (localMediaList != null && !localMediaList.isEmpty()) {
|
||||
List<File> imageFiles = new ArrayList<>();
|
||||
for (LocalMedia media : localMediaList) {
|
||||
String path = media.isCompressed() ? media.getCompressPath() : media.getRealPath();
|
||||
imageFiles.add(new File(path));
|
||||
}
|
||||
// MvpPre.uploadFile(new File(url), 0);
|
||||
|
||||
// 开始批量上传
|
||||
MvpPre.batchUploadFiles(imageFiles, 0); // 第二个参数是你原来的 type
|
||||
|
||||
}
|
||||
// if (localMedia != null && localMedia.size() != 0) {
|
||||
// LocalMedia imgMedia = localMedia.get(0);
|
||||
// String url;
|
||||
// if (imgMedia.isCompressed()) {
|
||||
// url = imgMedia.getCompressPath();
|
||||
// } else {
|
||||
// url = imgMedia.getRealPath();
|
||||
// }
|
||||
// MvpPre.uploadFile(new File(url), 0);
|
||||
// }
|
||||
break;
|
||||
case PictureConfig.REQUEST_CAMERA:
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainMultipleResult(data);
|
||||
@@ -205,4 +257,91 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
protected ReleasePresenter bindPresenter() {
|
||||
return new ReleasePresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topicList(List<HeatedBean> list) {
|
||||
// 示例数据
|
||||
// List<String> topics = Arrays.asList("话题1", "话题2", "话题3", "话题4");
|
||||
|
||||
List<String> topics = new ArrayList<>();
|
||||
for (HeatedBean bean : list) {
|
||||
topics.add(bean.getTitle());
|
||||
}
|
||||
|
||||
|
||||
BottomSheetDialog dialog = new BottomSheetDialog(this);
|
||||
dialog.setContentView(R.layout.bottom_sheet_recyclerview);
|
||||
|
||||
RecyclerView recyclerView = dialog.findViewById(R.id.rv_options);
|
||||
Button btnCancel = dialog.findViewById(R.id.btn_cancel);
|
||||
Button btnConfirm = dialog.findViewById(R.id.btn_confirm);
|
||||
|
||||
assert recyclerView != null;
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
MultiSelectAdapter adapter = new MultiSelectAdapter(list);
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
btnCancel.setOnClickListener(v -> dialog.dismiss());
|
||||
|
||||
btnConfirm.setOnClickListener(v -> {
|
||||
topicId=new ArrayList<>();
|
||||
List<HeatedBean> selectedTopics = adapter.getSelectedItems();
|
||||
// 返回结果给调用页面(可使用接口或 onActivityResult 等方式)
|
||||
Log.d("Selected Topics", selectedTopics.toString());
|
||||
List<String> selectedTopicIds = new ArrayList<>();
|
||||
for (HeatedBean topic : selectedTopics) {
|
||||
selectedTopicIds.add(topic.getTitle());
|
||||
}
|
||||
|
||||
for (HeatedBean topic : selectedTopics){
|
||||
topicId.add(topic.getId());
|
||||
}
|
||||
// 示例:更新 UI
|
||||
((TextView)findViewById(R.id.tv_ht)).setText("已选:" + TextUtils.join(",", selectedTopicIds));
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type, int index, int total) {
|
||||
if (index >= 0 && index < uploadedUrls.size()) {
|
||||
uploadedUrls.add(index, url); // 插入到对应位置
|
||||
} else {
|
||||
uploadedUrls.add(url); // 添加到最后
|
||||
}
|
||||
|
||||
if (uploadedUrls.size() == total) {
|
||||
updateAdapterData(); // 所有图片上传完成,更新适配器数据
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishSuccess() {
|
||||
ToastUtils.showShort("发布成功,待审核");
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
|
||||
if (requestCode == 1001) {
|
||||
LocationProvider provider = LocationServiceFactory.createBestProvider(this);
|
||||
provider.getLastKnownLocation(this, new LocationProvider.LocationCallback() {
|
||||
@Override
|
||||
public void onLocationReceived(double latitude, double longitude, String city) {
|
||||
Toast.makeText(ReleaseActivity.this, "当前位置:" + city, Toast.LENGTH_SHORT).show();
|
||||
city1=city;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorMessage) {
|
||||
Toast.makeText(ReleaseActivity.this, "定位失败:" + errorMessage, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -37,11 +37,11 @@ public class CircleCategoryAdapter extends RecyclerView.Adapter<CircleCategoryA
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
HeatedBean model = dataList.get(position);
|
||||
holder.tvTitle.setText(model.getTitle());
|
||||
holder.tvTitleContent.setText(model.getTitle_content());
|
||||
if (model.getTitle_pictrue().isEmpty()){
|
||||
holder.tvTitleContent.setText(model.getCount()+"条动态");
|
||||
if (model.getPic()==null){
|
||||
holder.ivIcon.setImageResource(com.qxcm.moduleutil.R.mipmap.default_avatar);
|
||||
}else {
|
||||
ImageUtils.loadHeadCC(model.getTitle_pictrue(), holder.ivIcon);
|
||||
ImageUtils.loadHeadCC(model.getPic(), holder.ivIcon);
|
||||
// 加载图片等逻辑
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ public class CircleCategoryAdapter extends RecyclerView.Adapter<CircleCategoryA
|
||||
ImageView ivIcon;
|
||||
TextView tvTitleContent;
|
||||
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tvTitle = itemView.findViewById(R.id.tvTitle);
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
@@ -11,110 +12,51 @@ import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulecircle.R;
|
||||
import com.qxcm.moduleutil.adapter.OneImageYuanJiaoAdapter;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MeHeadView;
|
||||
import com.qxcm.moduleutil.widget.MyGridView;
|
||||
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||
|
||||
public class ExpandColumnAdapter extends BaseQuickAdapter<CircleListBean, BaseViewHolder> {
|
||||
import java.util.List;
|
||||
|
||||
public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, BaseViewHolder> {
|
||||
public ExpandColumnAdapter() {
|
||||
super(R.layout.item_expand_column);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CircleListBean item) {
|
||||
helper.addOnClickListener(com.qxcm.moduleutil.R.id.dianzan)
|
||||
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_lookmore_tv)
|
||||
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_head_image)
|
||||
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_more_image)
|
||||
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_oneimage_iv);
|
||||
protected void convert(BaseViewHolder helper, ExpandColumnBean item) {
|
||||
helper.addOnClickListener(R.id.dy_head_image)
|
||||
.addOnClickListener(R.id.dy_oneimage_iv);
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||
helper.getView(com.qxcm.moduleutil.R.id.iv_jubao).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO).withString("uid", item.getUid() + "").navigation();
|
||||
}
|
||||
});
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||
|
||||
//昵称
|
||||
helper.setText(com.qxcm.moduleutil.R.id.dy_name_text, item.getUserNickName());
|
||||
helper.setText(R.id.dy_name_text, item.getNickname());
|
||||
helper.setText(R.id.tv_address, item.getLoginip());
|
||||
|
||||
if (item.getRoom_id()!=0){
|
||||
helper.getView(R.id.gensui).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.gsui);
|
||||
}else {
|
||||
helper.getView(R.id.gensui).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.six);
|
||||
}
|
||||
|
||||
//头像
|
||||
ImageUtils.loadHeadCC(item.getUserAvatar(), (ImageView) helper.getView(com.qxcm.moduleutil.R.id.dy_head_image));
|
||||
// ImageUtils.loadHeadCC(item.getAvatar(), (ImageView) helper.getView(R.id.dy_head_image));
|
||||
MeHeadView headView = helper.getView(R.id.dy_head_image);
|
||||
headView.setData(item.getAvatar(), "", item.getSex());
|
||||
|
||||
//动态内容以富文本展示
|
||||
String content = item.getContent();
|
||||
if (content == null || content.length() == 0) {
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).setVisibility(View.GONE);
|
||||
} else {
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).setVisibility(View.VISIBLE);
|
||||
}
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
//这个回调会调用多次,获取完行数记得注销监听
|
||||
TextView view = helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv);
|
||||
int lineCount = view.getLineCount();
|
||||
if (lineCount >= 7) {
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
} else {
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
helper.setText(com.qxcm.moduleutil.R.id.dy_content_tv, content);
|
||||
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
TextView view = helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv);
|
||||
view.setVisibility(View.GONE);
|
||||
} else {
|
||||
TextView view = helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv);
|
||||
view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
//点赞
|
||||
helper.setText(com.qxcm.moduleutil.R.id.dy_fabulous, item.getLike());
|
||||
// if (item.is_praise() == 1) {
|
||||
// TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
// dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan2));
|
||||
// helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_yidianzan);
|
||||
// } else {
|
||||
// TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
// dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan1));
|
||||
// helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_dianzan);
|
||||
// }
|
||||
|
||||
//分享数
|
||||
helper.setText(com.qxcm.moduleutil.R.id.dy_zs, item.getIsShare());
|
||||
//评论数
|
||||
helper.setText(com.qxcm.moduleutil.R.id.dy_comment, item.getComment() + "");
|
||||
|
||||
|
||||
//时间
|
||||
|
||||
if (!item.getTime().isEmpty()) {
|
||||
try {
|
||||
helper.setText(com.qxcm.moduleutil.R.id.dy_time_text, item.getTime());
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (item.getImages().size() != 0) {
|
||||
String[] arrIv = item.getImages().toArray(new String[item.getImages().size()]);
|
||||
if (item.getHome_bgimages()!=null) {
|
||||
// String[] arrIv = item.getHome_bgimages().toArray(new String[item.getHome_bgimages().size()]);
|
||||
String[] arrIv= item.getHome_bgimages().split(",");
|
||||
int length = arrIv.length;
|
||||
|
||||
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(com.qxcm.moduleutil.R.id.dy_image_recyc);
|
||||
MyGridView recyclerView = helper.getView(R.id.dy_image_recyc);
|
||||
recyclerView.setNumColumns(3);
|
||||
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||
@@ -122,7 +64,7 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<CircleListBean, BaseVi
|
||||
for (int j = 0; j < arrIv.length; j++) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||
}
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
@@ -131,5 +73,27 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<CircleListBean, BaseVi
|
||||
});
|
||||
}
|
||||
|
||||
LinearLayout llContainer = helper.getView(R.id.ll_image_container);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
ImageView imageView = new ImageView(mContext);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
mContext.getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_37),
|
||||
mContext.getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_15)
|
||||
);
|
||||
params.setMargins(0, 0, mContext.getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView);
|
||||
|
||||
llContainer.addView(imageView);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.app.Activity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,18 +14,23 @@ public class CircleContacts {
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
|
||||
// void setBanners(List<BannerResp> list);
|
||||
|
||||
// void myInfoSuccess(MyInfoResp data);
|
||||
|
||||
void setCategories(List<HeatedBean> list);
|
||||
|
||||
void setCircleList(List<CircleListBean> list);
|
||||
|
||||
void setExpandColumn(List<ExpandColumnBean> list);
|
||||
|
||||
void setLikeZone();
|
||||
}
|
||||
|
||||
public interface IIndexPre extends IPresenter {
|
||||
void getCategories();
|
||||
|
||||
void getCircleList();
|
||||
void getCircleList(String page,String page_limit);
|
||||
|
||||
void getExpandColumn(String type,String page,String page_limit);//获取扩列数据
|
||||
|
||||
void likeZone(String zone_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,24 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public class ReleaseContract {
|
||||
public interface View extends IView<Activity> {
|
||||
void topicList(List<HeatedBean> list);
|
||||
void upLoadSuccess(String url, int type, int index, int total);
|
||||
|
||||
void publishSuccess();
|
||||
}
|
||||
|
||||
public interface IIndexPre extends IPresenter {
|
||||
void topicList(String page, String page_limit);
|
||||
|
||||
void uploadFile(File file, int type,int index,int sice);
|
||||
|
||||
void publishZone(String images,String content,String topic_id,String room_id,String ip);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,15 +11,16 @@ import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.modulecircle.R;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.ViewHolder> {
|
||||
private List<String> options;
|
||||
private List<HeatedBean> options;
|
||||
private SparseBooleanArray selectedPositions = new SparseBooleanArray();
|
||||
|
||||
public MultiSelectAdapter(List<String> options) {
|
||||
public MultiSelectAdapter(List<HeatedBean> options) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
@@ -32,8 +33,8 @@ public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
String item = options.get(position);
|
||||
holder.tvOption.setText(item);
|
||||
HeatedBean item = options.get(position);
|
||||
holder.tvOption.setText(item.getTitle());
|
||||
holder.cbOption.setChecked(selectedPositions.get(position, false));
|
||||
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
@@ -52,8 +53,8 @@ public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.
|
||||
return options.size();
|
||||
}
|
||||
|
||||
public List<String> getSelectedItems() {
|
||||
List<String> selected = new ArrayList<>();
|
||||
public List<HeatedBean> getSelectedItems() {
|
||||
List<HeatedBean> selected = new ArrayList<>();
|
||||
for (int i = 0; i < options.size(); i++) {
|
||||
if (selectedPositions.get(i)) {
|
||||
selected.add(options.get(i));
|
||||
|
||||
@@ -2,10 +2,14 @@ package com.example.modulecircle.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.adapter.CirleCategoryBannerAdapter;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
@@ -16,7 +20,13 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.BaseListData;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommentDialogFragment;
|
||||
import com.qxcm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.qxcm.moduleutil.widget.dialog.ShareDialog;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.zhpan.bannerview.indicator.DrawableIndicator;
|
||||
import com.zhpan.indicator.base.IIndicator;
|
||||
import com.zhpan.indicator.enums.IndicatorSlideMode;
|
||||
@@ -30,6 +40,7 @@ import java.util.List;
|
||||
public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleCategoryBinding> implements CircleContacts.View {
|
||||
CirleCategoryBannerAdapter cirleCategoryBannerAdapter;
|
||||
CirleListAdapter cirleListAdapter;
|
||||
private int page;
|
||||
public static CircleCategoryFragment newInstance() {
|
||||
return new CircleCategoryFragment();
|
||||
}
|
||||
@@ -38,7 +49,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MvpPre.getCategories();
|
||||
MvpPre.getCircleList();
|
||||
MvpPre.getCircleList("1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,6 +89,46 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
cirleListAdapter = new CirleListAdapter();
|
||||
mBinding.recycleView.setAdapter(cirleListAdapter);
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId()+"");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(CircleListBean item) {
|
||||
Toast.makeText(getContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), getChildFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
new ShareDialog(getActivity()).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(CircleListBean item) {
|
||||
CommentDialogFragment.show(String.valueOf(item.getId()), getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getCircleList(page+"", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getCircleList(page+"", "10");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private IIndicator getVectorDrawableIndicator() {
|
||||
@@ -116,6 +167,17 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
cirleListAdapter.setNewData(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpandColumn(List<ExpandColumnBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
ToastUtils.show("点赞成功");
|
||||
MvpPre.getCircleList(page+"", "10");
|
||||
}
|
||||
|
||||
// 拆分函数
|
||||
private <T> List<List<T>> splitListIntoChunks(List<T> list, int chunkSize) {
|
||||
List<List<T>> chunks = new ArrayList<>();
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.example.modulecircle.presenter.CirclePresenter;
|
||||
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.bean.MyBagBean;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
@@ -83,6 +84,16 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpandColumn(List<ExpandColumnBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
|
||||
}
|
||||
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private List<MyBagBean> list;
|
||||
|
||||
@@ -2,7 +2,9 @@ package com.example.modulecircle.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -10,13 +12,18 @@ import android.view.ViewGroup;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.adapter.ExpandColumnAdapter;
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.example.modulecircle.databinding.FragmentCircleBinding;
|
||||
import com.example.modulecircle.databinding.FragmentExpandColumnBinding;
|
||||
import com.example.modulecircle.presenter.CirclePresenter;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
|
||||
import org.angmarch.views.NiceSpinner;
|
||||
import org.angmarch.views.OnSpinnerItemSelectedListener;
|
||||
@@ -32,7 +39,9 @@ import java.util.List;
|
||||
*/
|
||||
public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, FragmentExpandColumnBinding> implements CircleContacts.View {
|
||||
|
||||
|
||||
private ExpandColumnAdapter expandColumnAdapter;
|
||||
private String type="2";
|
||||
private int page;
|
||||
@Override
|
||||
protected CirclePresenter bindPresenter() {
|
||||
return new CirclePresenter(this,getActivity());
|
||||
@@ -53,13 +62,44 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
String item = (String) parent.getItemAtPosition(position);
|
||||
LogUtils.e("@@@",item);
|
||||
mBinding.niceSpinner.setText(item);
|
||||
if (item.equals("只看女生")){
|
||||
type="2";
|
||||
}else if (item.equals("只看男生")){
|
||||
type="1";
|
||||
}else {
|
||||
type="0";
|
||||
}
|
||||
MvpPre.getExpandColumn(type,"1", "10");
|
||||
// mBinding.niceSpinner.getItemAtPosition(position);
|
||||
}
|
||||
});
|
||||
mBinding.niceSpinner.setText("只看女生");
|
||||
mBinding.niceSpinner.setBackground(null);
|
||||
}
|
||||
|
||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
expandColumnAdapter = new ExpandColumnAdapter();
|
||||
mBinding.recyclerView.setAdapter(expandColumnAdapter);
|
||||
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getExpandColumn(type,page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getExpandColumn(type,page+"", "10");
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MvpPre.getExpandColumn(type,"1", "10");
|
||||
}
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
@@ -79,4 +119,14 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpandColumn(List<ExpandColumnBean> list) {
|
||||
expandColumnAdapter.setNewData(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,17 @@ import android.content.Context;
|
||||
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
import com.scwang.smartrefresh.header.waterdrop.Circle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class CirclePresenter extends BasePresenter<CircleContacts.View> implements CircleContacts.IIndexPre {
|
||||
|
||||
public CirclePresenter(CircleContacts.View view, Context context) {
|
||||
@@ -20,41 +24,84 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
@Override
|
||||
public void getCategories() {
|
||||
|
||||
List<HeatedBean> list=new ArrayList<>();
|
||||
for (int i = 0; i < 7; i++){
|
||||
HeatedBean bean=new HeatedBean();
|
||||
bean.setTitle("#萌新驾到"+i);
|
||||
bean.setTitle_pictrue("");
|
||||
bean.setTitle_content("3.24W条动态");
|
||||
list.add(bean);
|
||||
}
|
||||
MvpRef.get().setCategories(list);
|
||||
api.getCategories(new BaseObserver<List<HeatedBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<HeatedBean> heatedBeanList) {
|
||||
MvpRef.get().setCategories(heatedBeanList);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCircleList() {
|
||||
List<String> images=new ArrayList<>();
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
List<CircleListBean> list=new ArrayList<>();
|
||||
for (int i = 0; i < 10; i++){
|
||||
CircleListBean bean=new CircleListBean();
|
||||
bean.setId(""+i);
|
||||
bean.setUserNickName("萌新驾到"+i);
|
||||
bean.setUserAvatar("");
|
||||
bean.setTime("发布于 12:5"+i);
|
||||
bean.setContent("任何关系,都需要谦逊谨慎");
|
||||
bean.setImages(images);
|
||||
bean.setType("1");
|
||||
bean.setComment(""+i);
|
||||
bean.setLike(""+i);
|
||||
bean.setIsShare(""+i);
|
||||
list.add(bean);
|
||||
}
|
||||
MvpRef.get().setCircleList(list);
|
||||
public void getCircleList(String page, String page_limit) {
|
||||
|
||||
api.getCircleList(page,page_limit,new BaseObserver<List<CircleListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<CircleListBean> circleListBeans) {
|
||||
MvpRef.get().setCircleList(circleListBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//获取扩列数据
|
||||
@Override
|
||||
public void getExpandColumn(String type, String page, String page_limit) {
|
||||
api.getExpandColumn(type, page, page_limit, new BaseObserver<List<ExpandColumnBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<ExpandColumnBean> expandColumnBeans) {
|
||||
MvpRef.get().setExpandColumn(expandColumnBeans);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// List<String> images=new ArrayList<>();
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// List<ExpandColumnBean> expandColumnBeans=new ArrayList<>();
|
||||
// for (int i = 0; i < 10; i++){
|
||||
// ExpandColumnBean bean=new ExpandColumnBean();
|
||||
// bean.setId(""+i);
|
||||
// bean.setSex(i % 2 == 0 ? "2" : "1");
|
||||
// bean.setNickname("萌新驾到"+i);
|
||||
// bean.setAvatar("");
|
||||
// bean.setBirthday("2023-05-05");
|
||||
// bean.setLoginip("西安市");
|
||||
// bean.setHome_bgimages(images);
|
||||
// expandColumnBeans.add(bean);
|
||||
// }
|
||||
// MvpRef.get().setExpandColumn(expandColumnBeans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void likeZone(String zone_id) {
|
||||
api.likeZone(zone_id, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().setLikeZone();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,77 @@ package com.example.modulecircle.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulecircle.contacts.ReleaseContract;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
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;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class ReleasePresenter extends BasePresenter<ReleaseContract.View> implements ReleaseContract.IIndexPre {
|
||||
public ReleasePresenter(ReleaseContract.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topicList(String page, String page_limit) {
|
||||
api.topicList(page, page_limit, new BaseObserver<List<HeatedBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<HeatedBean> heatedBeanList) {
|
||||
MvpRef.get().topicList(heatedBeanList);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void batchUploadFiles(List<File> files, int type) {
|
||||
for (int i = 0; i < files.size(); i++) {
|
||||
uploadFile(files.get(i), type, i, files.size());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadFile(File file, int type,int index,int size) {
|
||||
// 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().upLoadSuccess(OSSOperUtils.AliYunOSSURLFile + url, type, index, size);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail() {
|
||||
if (isViewAttach()) {
|
||||
ToastUtils.show("上传失败");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishZone(String images, String content, String topic_id, String room_id,String ip) {
|
||||
api.publishZone(images, content, topic_id, room_id,ip, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().publishSuccess();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,108 +8,116 @@
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_FFF8F8F8">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_FFF8F8F8">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_ffeff2f8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar">
|
||||
<TextView
|
||||
android:id="@+id/tv_ht"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginBottom="@dimen/dp_9"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:text="选择话题"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp" />
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:src="@mipmap/up_t" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_1"
|
||||
android:background="@drawable/bg_r10_white">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_g"
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="left|top"
|
||||
android:hint="此刻想和大家分享点什么"
|
||||
android:maxLength="1200"
|
||||
android:textColor="#333333"
|
||||
android:textColorHint="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
android:background="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_ffeff2f8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ht"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginBottom="@dimen/dp_9"
|
||||
android:gravity="center"
|
||||
android:text="选择话题"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:src="@mipmap/up_t" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r10_white"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_1">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_g"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="left|top"
|
||||
android:hint="此刻想和大家分享点什么"
|
||||
android:maxLength="1200"
|
||||
android:textColor="#333333"
|
||||
android:textColorHint="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_below="@+id/et_g"
|
||||
android:gravity="bottom"
|
||||
android:text="0/1200"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_photo_wall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="bottom"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:text="0/1200"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_photo_wall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_2"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="@drawable/cs"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_photo_wall"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_38"
|
||||
android:layout_marginEnd="@dimen/dp_38"
|
||||
android:text="立即发布"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:id="@+id/tv_fb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginStart="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_38"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="立即发布"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_photo_wall" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
||||
@@ -32,21 +32,27 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/transparent"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:arrowDrawable="@mipmap/up_x"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
/>
|
||||
android:paddingBottom="@dimen/dp_12" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -3,7 +3,7 @@
|
||||
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="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
@@ -61,7 +61,6 @@
|
||||
android:ellipsize="none"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
app:layout_constraintStart_toEndOf="@id/item_ry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
@@ -16,26 +16,27 @@
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingRight="15sp">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.CircularImage
|
||||
<com.qxcm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/dy_head_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@mipmap/shequ_dongtai_gengduo" />
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_toRightOf="@+id/dy_head_image"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -43,47 +44,79 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_name_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#212121"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textStyle="bold"
|
||||
android:text="萌新驾到"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="18sp" />
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_dj"-->
|
||||
<!-- android:layout_width="@dimen/dp_37"-->
|
||||
<!-- android:layout_height="@dimen/dp_15"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_9"-->
|
||||
<!-- />-->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_image_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_agree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="25"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发布于12:52"
|
||||
android:text="·IP属地:"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#999999"
|
||||
android:textSize="11sp" />
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="西安市"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@+id/l_1"
|
||||
android:layout_gravity="right|center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -104,7 +137,7 @@
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/aaa"
|
||||
|
||||
Reference in New Issue
Block a user