语圈基本完成
2、个人主页完成
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true">
|
||||
<activity
|
||||
android:name=".activity.DynamicDetailActivity"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".activity.DynamicListActivity"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize"/>
|
||||
<activity
|
||||
android:name=".activity.ReleaseActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
package com.example.modulecircle.activity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.example.modulecircle.databinding.ActivityDynamicDetailBinding;
|
||||
import com.example.modulecircle.presenter.CirclePresenter;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.qxcm.moduleutil.adapter.CommentAdapter;
|
||||
import com.qxcm.moduleutil.adapter.OneImageYuanJiaoAdapter;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.MyGridView;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommentDialogFragment;
|
||||
import com.qxcm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.qxcm.moduleutil.widget.dialog.ShareDialog;
|
||||
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
* @data 2025/6/3
|
||||
* @description: 语圈详情
|
||||
*/
|
||||
@Route(path = ARouteConstants.DYNAMIC_DETAIL)
|
||||
public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, ActivityDynamicDetailBinding> implements
|
||||
CircleContacts.View, CommentAdapter.OnCommentInteractionListener {
|
||||
private String zone_id;
|
||||
CirleListAdapter cirleListAdapter;
|
||||
private CommentAdapter commentAdapter;
|
||||
private int currentReplyId = 0; // 记录当前正在回复的评论ID
|
||||
private String TreplyTo = "";
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("动态详情");
|
||||
zone_id = getIntent().getStringExtra("zone_id");
|
||||
MvpPre.topicId(zone_id, 2);
|
||||
mBinding.tvSend.setOnClickListener(this::onClick);
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
cirleListAdapter = new CirleListAdapter();
|
||||
mBinding.recycleView.setAdapter(cirleListAdapter);
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId() + "");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
cirleListAdapter.notifyItemChanged(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(CircleListBean item) {
|
||||
Toast.makeText(getApplicationContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(DynamicDetailActivity.this, item.getContent(), item.getShare_url(), item.getTopic_id(),1);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(CircleListBean item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRelaClick(CircleListBean item) {
|
||||
CommentDialogFragment.show(String.valueOf(item.getId()), getSupportFragmentManager());
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.rvComment.setLayoutManager(new LinearLayoutManager(this));
|
||||
commentAdapter = new CommentAdapter(new ArrayList<>());
|
||||
mBinding.rvComment.setAdapter(commentAdapter);
|
||||
commentAdapter.setOnCommentInteractionListener(this);
|
||||
|
||||
|
||||
// mBinding.etInput.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
// if (hasFocus) {
|
||||
// new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
// mBinding.scrollView.fullScroll(View.FOCUS_DOWN);
|
||||
// }, 200);
|
||||
// }
|
||||
// });
|
||||
|
||||
// 在 initData() 中添加:
|
||||
final View rootView = findViewById(android.R.id.content);
|
||||
final View inputBar = mBinding.clInput;
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(rootView, (v, insets) -> {
|
||||
int keyboardHeight = insets.getInsets(WindowInsetsCompat.Type.ime()).bottom;
|
||||
|
||||
if (keyboardHeight > 0) {
|
||||
// 键盘弹出时,将输入栏上移
|
||||
inputBar.setTranslationY(-keyboardHeight);
|
||||
|
||||
// 安全地滚动列表(添加空列表检查)
|
||||
if (commentAdapter.getItemCount() > 0) {
|
||||
try {
|
||||
mBinding.rvComment.smoothScrollToPosition(commentAdapter.getItemCount() - 1);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// 防止意外情况
|
||||
mBinding.rvComment.scrollToPosition(commentAdapter.getItemCount() - 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 键盘收起时复位
|
||||
inputBar.setTranslationY(0);
|
||||
}
|
||||
return insets;
|
||||
});
|
||||
|
||||
|
||||
// 点击输入框自动弹出键盘
|
||||
mBinding.etInput.setOnClickListener(v -> {
|
||||
mBinding.etInput.requestFocus();
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(mBinding.etInput, InputMethodManager.SHOW_IMPLICIT);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.tv_send) {
|
||||
if (mBinding.etInput.getText().toString().isEmpty()) {
|
||||
ToastUtils.showShort("请输入评论内容");
|
||||
return;
|
||||
}
|
||||
// 判断是回复还是普通评论
|
||||
if (currentReplyId != 0) {
|
||||
// 回复某条评论
|
||||
comZone(zone_id, mBinding.etInput.getText().toString(), String.valueOf(currentReplyId), TreplyTo);
|
||||
} else {
|
||||
// 普通评论
|
||||
comZone(zone_id, mBinding.etInput.getText().toString(), "0", TreplyTo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void comZone(String zoneId, String content, String pid, String replyTo) {
|
||||
MvpPre.commentZone(zoneId, content, pid, replyTo);
|
||||
mBinding.etInput.setText("");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_dynamic_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CirclePresenter bindPresenter() {
|
||||
return new CirclePresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCategories(List<HeatedBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpandColumn(List<ExpandColumnBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
List<CircleListBean> beanList = new ArrayList<>();
|
||||
beanList.add(bean);
|
||||
cirleListAdapter.setNewData(beanList);
|
||||
MvpPre.getCommentList(zone_id, "1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
if (commentBean != null) {
|
||||
mBinding.tvNum.setText("全部评论(" + commentBean.getTotal() + ")");
|
||||
commentAdapter.updateData(commentBean.getList()); // 假设 CommentBean 包含评论列表
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
MvpPre.getCommentList(zone_id, "1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInputBoxShow(int id, String s, int position, String replyTo) {
|
||||
mBinding.etInput.requestFocus();
|
||||
|
||||
// 2. 自动弹出软键盘
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (imm != null) {
|
||||
imm.showSoftInput(mBinding.etInput, InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
}, 200);
|
||||
|
||||
// 3. 可选:预填回复内容(如@用户)
|
||||
if (!TextUtils.isEmpty(s)) {
|
||||
mBinding.etInput.setText(s);
|
||||
mBinding.etInput.setSelection(s.length()); // 光标移至末尾
|
||||
}
|
||||
|
||||
// 4. 记录被回复的评论ID(用于后续提交)
|
||||
currentReplyId = id; // 需要在Activity中声明这个字段
|
||||
TreplyTo = replyTo;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetaleClick(int id, int position) {
|
||||
MvpPre.deleteComment(id+"");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCommentLongClick(CommentBean.CommentDetailsBean comment,CommentBean.CommentDetailsBean.Replies reply, int position) {
|
||||
String[] options ;
|
||||
if (comment.getUser_id() == SpUtil.getUserId()){
|
||||
options = new String[]{"复制", "删除", "回复", "取消"};
|
||||
}else {
|
||||
options =new String[] {"复制", "回复", "取消"};
|
||||
}
|
||||
|
||||
// new AlertDialog.Builder(this)
|
||||
// .setItems(options, (dialog, which) -> {
|
||||
// switch (which) {
|
||||
// case 0: // 复制
|
||||
// copyComment(comment.getContent());
|
||||
// break;
|
||||
// case 1: // 删除
|
||||
// deleteComment(comment.getId(), position);
|
||||
// break;
|
||||
// case 2: // 回复
|
||||
// onInputBoxShow(comment.getId(), "", position,"");
|
||||
// break;
|
||||
// case 3: // 取消
|
||||
// dialog.dismiss();
|
||||
// break;
|
||||
// }
|
||||
// })
|
||||
// .setCancelable(true)
|
||||
// .create()
|
||||
// .show();
|
||||
|
||||
// 创建底部对话框
|
||||
BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(this);
|
||||
View dialogView = getLayoutInflater().inflate(com.qxcm.moduleutil.R.layout.dialog_bottom_sheet_actions, null);
|
||||
|
||||
// 初始化视图
|
||||
LinearLayout container = dialogView.findViewById(com.qxcm.moduleutil.R.id.ll_options_container);
|
||||
|
||||
// 动态添加选项
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
TextView textView = new TextView(this);
|
||||
textView.setText(options[i]);
|
||||
textView.setTextSize(16);
|
||||
textView.setPadding(
|
||||
getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_16),
|
||||
getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_14),
|
||||
getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_16),
|
||||
getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_14)
|
||||
);
|
||||
|
||||
// 设置点击效果
|
||||
textView.setBackgroundResource(com.qxcm.moduleutil.R.drawable.bg_bottom_sheet_item);
|
||||
final int optionIndex = i;
|
||||
textView.setOnClickListener(v -> {
|
||||
handleOptionClick(optionIndex, comment,reply, position);
|
||||
bottomSheetDialog.dismiss();
|
||||
});
|
||||
|
||||
container.addView(textView);
|
||||
|
||||
// 添加分割线(除了最后一个)
|
||||
if (i < options.length - 1) {
|
||||
View divider = new View(this);
|
||||
divider.setBackgroundColor(ContextCompat.getColor(this, com.qxcm.moduleutil.R.color.color_FFEEEEEE));
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_1)
|
||||
);
|
||||
divider.setLayoutParams(params);
|
||||
container.addView(divider);
|
||||
}
|
||||
}
|
||||
|
||||
bottomSheetDialog.setContentView(dialogView);
|
||||
bottomSheetDialog.show();
|
||||
}
|
||||
private void handleOptionClick(int optionIndex, CommentBean.CommentDetailsBean comment,CommentBean.CommentDetailsBean.Replies reply, int position) {
|
||||
if (comment.getUser_id() == SpUtil.getUserId()) {
|
||||
// 当前用户的评论选项
|
||||
switch (optionIndex) {
|
||||
case 0: // 复制
|
||||
if (reply!=null) {
|
||||
copyComment(reply.getContent());
|
||||
}else {
|
||||
copyComment(comment.getContent());
|
||||
}
|
||||
break;
|
||||
case 1: // 删除
|
||||
if (reply!=null) {
|
||||
deleteComment(reply.getId(), position);
|
||||
}else {
|
||||
deleteComment(comment.getId(), position);
|
||||
}
|
||||
break;
|
||||
case 2: // 回复
|
||||
if (reply!=null){
|
||||
onInputBoxShow(reply.getPid(), "", position, reply.getReply_to_user()+"");
|
||||
}else {
|
||||
onInputBoxShow(comment.getId(), "", position, "");
|
||||
}
|
||||
break;
|
||||
// 取消选项不需要处理
|
||||
}
|
||||
} else {
|
||||
// 其他用户的评论选项
|
||||
switch (optionIndex) {
|
||||
case 0: // 复制
|
||||
if (reply!=null) {
|
||||
copyComment(reply.getContent());
|
||||
}else {
|
||||
copyComment(comment.getContent());
|
||||
}
|
||||
break;
|
||||
case 1: // 回复
|
||||
if (reply!=null){
|
||||
onInputBoxShow(reply.getPid(), "", position, reply.getReply_to_user()+"");
|
||||
}else {
|
||||
onInputBoxShow(comment.getId(), "", position, "");
|
||||
}
|
||||
break;
|
||||
// 取消选项不需要处理
|
||||
}
|
||||
}
|
||||
}
|
||||
// 具体操作方法
|
||||
private void copyComment(String content) {
|
||||
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
ClipData clip = ClipData.newPlainText("comment", content);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
Toast.makeText(this, "已复制", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private void deleteComment(int commentId, int position) {
|
||||
// 调用删除API
|
||||
MvpPre.deleteComment(String.valueOf(commentId));
|
||||
// 临时移除数据
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.example.modulecircle.activity;
|
||||
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.LeadingMarginSpan;
|
||||
import android.widget.Toast;
|
||||
|
||||
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.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.example.modulecircle.databinding.ActivityDynamicListBinding;
|
||||
import com.example.modulecircle.presenter.CirclePresenter;
|
||||
import com.example.modulevocal.activity.UserHomepageActivity;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.qxcm.moduleutil.widget.dialog.ShareDialog;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/3
|
||||
*@description: 广场中顶部的热议点击进入的列表展示
|
||||
*/
|
||||
@Route(path = ARouteConstants.CIRCLE_LIST)
|
||||
public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, ActivityDynamicListBinding> implements CircleContacts.View {
|
||||
|
||||
private HeatedBean heatedBean;
|
||||
CirleListAdapter cirleListAdapter;
|
||||
@Override
|
||||
protected void initData() {
|
||||
heatedBean= getIntent().getParcelableExtra("heatedBean");
|
||||
mBinding.topBar.setTitle(heatedBean.getTitle());
|
||||
MvpPre.topicId(heatedBean.getTopic_id(),1);
|
||||
ImageUtils.loadHeadCC(heatedBean.getPic(),mBinding.ivAvatar);
|
||||
mBinding.tvTitle.setText(heatedBean.getTitle());
|
||||
mBinding.tvDescription.setText(heatedBean.getCount()+"条动态");
|
||||
SpannableString spannableString=new SpannableString(heatedBean.getContent());
|
||||
spannableString.setSpan(new LeadingMarginSpan.Standard(36),0,heatedBean.getContent().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
mBinding.tvContent.setText(spannableString);
|
||||
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
cirleListAdapter = new CirleListAdapter();
|
||||
mBinding.recycleView.setAdapter(cirleListAdapter);
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId()+"");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
cirleListAdapter.notifyItemChanged(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(CircleListBean item) {
|
||||
// Toast.makeText(getApplicationContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(DynamicListActivity.this, UserHomepageActivity.class);
|
||||
intent.putExtra("userId", item.getUser_id()+"");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog= new ShareDialog(DynamicListActivity.this,item.getContent(),item.getShare_url(),item.getTopic_id(),1);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener(){
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(CircleListBean item) {
|
||||
// CommentDialogFragment.show(String.valueOf(item.getId()), getSupportFragmentManager());
|
||||
Intent intent = new Intent(DynamicListActivity.this, DynamicDetailActivity.class);
|
||||
intent.putExtra("zone_id", item.getId() + "");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRelaClick(CircleListBean item) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_dynamic_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CirclePresenter bindPresenter() {
|
||||
return new CirclePresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCategories(List<HeatedBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
cirleListAdapter.setNewData(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpandColumn(List<ExpandColumnBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
// ToastUtils.show("成功");
|
||||
// MvpPre.topicId(heatedBean.getTopic_id(),1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,7 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
}
|
||||
|
||||
for (HeatedBean topic : selectedTopics){
|
||||
topicId.add(topic.getId());
|
||||
topicId.add(topic.getTopic_id());
|
||||
}
|
||||
// 示例:更新 UI
|
||||
((TextView)findViewById(R.id.tv_ht)).setText("已选:" + TextUtils.join(",", selectedTopicIds));
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.widget.TextView;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulecircle.R;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.qxcm.moduleutil.adapter.OneImageYuanJiaoAdapter;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
@@ -25,33 +26,56 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, Base
|
||||
super(R.layout.item_expand_column);
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onDianzanClick(ExpandColumnBean item);
|
||||
|
||||
void onHeadImageClick(ExpandColumnBean item);
|
||||
|
||||
void onZsClick(ExpandColumnBean item);
|
||||
|
||||
void onDiandianClick(ExpandColumnBean item);
|
||||
|
||||
void onPinglunClick(ExpandColumnBean item);
|
||||
|
||||
void onRelaClick(ExpandColumnBean item);
|
||||
}
|
||||
|
||||
private OnItemClickListener mListener;
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, ExpandColumnBean item) {
|
||||
helper.addOnClickListener(R.id.dy_head_image)
|
||||
.addOnClickListener(R.id.dy_oneimage_iv);
|
||||
;
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||
|
||||
//昵称
|
||||
helper.setText(R.id.dy_name_text, item.getNickname());
|
||||
helper.setText(R.id.tv_address, item.getLoginip());
|
||||
|
||||
if (item.getRoom_id()!=0){
|
||||
if (item.getRoom_id() != 0) {
|
||||
helper.getView(R.id.gensui).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.gsui);
|
||||
}else {
|
||||
} else {
|
||||
helper.getView(R.id.gensui).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.six);
|
||||
}
|
||||
|
||||
helper.getView(com.qxcm.moduleutil.R.id.dy_head_image).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onHeadImageClick(item);
|
||||
});
|
||||
|
||||
//头像
|
||||
// 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());
|
||||
|
||||
if (item.getHome_bgimages()!=null) {
|
||||
if (item.getHome_bgimages() != null && !item.getHome_bgimages().isEmpty()) {
|
||||
// String[] arrIv = item.getHome_bgimages().toArray(new String[item.getHome_bgimages().size()]);
|
||||
String[] arrIv= item.getHome_bgimages().split(",");
|
||||
String[] arrIv = item.getHome_bgimages().split(",");
|
||||
int length = arrIv.length;
|
||||
|
||||
|
||||
@@ -64,7 +88,6 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, Base
|
||||
for (int j = 0; j < arrIv.length; j++) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||
}
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
@@ -79,21 +102,22 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, Base
|
||||
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);
|
||||
if (url.contains("http")) {
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView);
|
||||
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);
|
||||
|
||||
llContainer.addView(imageView);
|
||||
// 使用 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.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
|
||||
@@ -22,6 +23,11 @@ public class CircleContacts {
|
||||
void setExpandColumn(List<ExpandColumnBean> list);
|
||||
|
||||
void setLikeZone();
|
||||
|
||||
void setCircleDetail(CircleListBean bean);
|
||||
|
||||
void getCommentList(CommentBean commentBean);
|
||||
void commentZone();
|
||||
}
|
||||
|
||||
public interface IIndexPre extends IPresenter {
|
||||
@@ -32,5 +38,14 @@ public class CircleContacts {
|
||||
void getExpandColumn(String type,String page,String page_limit);//获取扩列数据
|
||||
|
||||
void likeZone(String zone_id);
|
||||
|
||||
void topicId(String topic_id,int type);//type:这是让区分是什么地方获得数据,type=1:动态列表,type=2:动态详情
|
||||
|
||||
void deleteZone(String zone_id);
|
||||
|
||||
void getCommentList(String id,String page,String page_limit);
|
||||
void commentZone(String id,String content,String pid,String reply_to);
|
||||
|
||||
void deleteComment(String id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.util.SparseBooleanArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -34,18 +33,36 @@ public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
HeatedBean item = options.get(position);
|
||||
holder.tvOption.setText(item.getTitle());
|
||||
holder.cbOption.setChecked(selectedPositions.get(position, false));
|
||||
|
||||
boolean isSelected = selectedPositions.get(position, false);
|
||||
|
||||
holder.tvOption.setText(item.getTitle());
|
||||
holder.checkbox.setSelected(isSelected);
|
||||
holder.checkbox.setOnClickListener(v -> {
|
||||
boolean newState = !isSelected;
|
||||
selectedPositions.put(position, newState);
|
||||
holder.checkbox.setSelected(newState);
|
||||
notifyItemChanged(position); // 刷新当前项
|
||||
});
|
||||
|
||||
// 点击整个 item 也可以触发选中/取消
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
boolean isChecked = selectedPositions.get(position, false);
|
||||
if (isChecked) {
|
||||
selectedPositions.delete(position);
|
||||
} else {
|
||||
selectedPositions.put(position, true);
|
||||
}
|
||||
boolean currentState = selectedPositions.get(position, false);
|
||||
boolean newState = !currentState;
|
||||
selectedPositions.put(position, newState);
|
||||
holder.checkbox.setSelected(newState);
|
||||
notifyItemChanged(position);
|
||||
});
|
||||
|
||||
// holder.itemView.setOnClickListener(v -> {
|
||||
// boolean isChecked = selectedPositions.get(position, false);
|
||||
// if (isChecked) {
|
||||
// selectedPositions.delete(position);
|
||||
// } else {
|
||||
// selectedPositions.put(position, true);
|
||||
// }
|
||||
// notifyItemChanged(position);
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,12 +81,12 @@ public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.
|
||||
}
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
CheckBox cbOption;
|
||||
View checkbox;
|
||||
TextView tvOption;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
cbOption = itemView.findViewById(R.id.cb_option);
|
||||
checkbox = itemView.findViewById(R.id.v_checkbox);
|
||||
tvOption = itemView.findViewById(R.id.tv_option);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,20 @@ import android.annotation.SuppressLint;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.facade.callback.NavCallback;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.activity.DynamicDetailActivity;
|
||||
import com.example.modulecircle.activity.DynamicListActivity;
|
||||
import com.example.modulecircle.adapter.CirleCategoryBannerAdapter;
|
||||
import com.example.modulevocal.activity.UserHomepageActivity;
|
||||
import com.qxcm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.example.modulecircle.databinding.FragmentCircleCategoryBinding;
|
||||
@@ -20,9 +27,10 @@ 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.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommentDialogFragment;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.qxcm.moduleutil.widget.dialog.ShareDialog;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
@@ -35,12 +43,13 @@ import java.util.ArrayList;
|
||||
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();
|
||||
}
|
||||
@@ -49,7 +58,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MvpPre.getCategories();
|
||||
MvpPre.getCircleList("1", "10");
|
||||
MvpPre.getCircleList("1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,14 +83,13 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
mBinding.constraintLayout.setVisibility(View.GONE);
|
||||
cirleCategoryBannerAdapter.setOnItemClickListener((view, data, position) -> {
|
||||
// 处理点击逻辑,例如跳转页面
|
||||
ToastUtils.show("点击了第 " + position + " 个 item");
|
||||
// 示例:跳转到房间详情页
|
||||
if (data != null) {
|
||||
// ARouter.getInstance().build(ARouteConstants.LIVE_ROOM)
|
||||
// .withString("form", "首页热门列表")
|
||||
// .withString("roomId", data.getId())
|
||||
// .navigation();
|
||||
// ARouter.getInstance().build(ARouteConstants.DYNAMIC_LIST)
|
||||
// .withString("id", data.getId()).navigation();
|
||||
Intent intent = new Intent(getActivity(), DynamicListActivity.class);
|
||||
intent.putExtra("heatedBean", data);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -92,12 +100,23 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId()+"");
|
||||
MvpPre.likeZone(item.getId() + "");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
cirleListAdapter.notifyItemChanged(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(CircleListBean item) {
|
||||
Toast.makeText(getContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show();
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", item.getUser_id() + "").navigation();
|
||||
// Intent intent = new Intent(getActivity(), UserHomepageActivity.class);
|
||||
// intent.putExtra("userId", item.getUser_id()+"");
|
||||
// startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,30 +126,48 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
new ShareDialog(getActivity()).show();
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getTopic_id(),1);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(CircleListBean item) {
|
||||
CommentDialogFragment.show(String.valueOf(item.getId()), getChildFragmentManager());
|
||||
ARouter.getInstance().build(ARouteConstants.DYNAMIC_DETAIL).withString("zone_id", item.getId()+"").navigation();
|
||||
// Intent intent = new Intent(getActivity(), DynamicDetailActivity.class);
|
||||
// intent.putExtra("zone_id", item.getId() + "");
|
||||
// startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRelaClick(CircleListBean item) {
|
||||
|
||||
}
|
||||
});
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getCircleList(page+"", "10");
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getCircleList(page+"", "10");
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private IIndicator getVectorDrawableIndicator() {
|
||||
int dp6 = getResources().getDimensionPixelOffset(com.qxcm.moduleutil.R.dimen.dp_6);
|
||||
return new DrawableIndicator(getContext())
|
||||
@@ -138,6 +175,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
.setIndicatorDrawable(com.qxcm.moduleutil.R.drawable.banner_indicator_nornal, com.qxcm.moduleutil.R.drawable.banner_indicator_focus)
|
||||
.setIndicatorSize(getResources().getDimensionPixelOffset(com.qxcm.moduleutil.R.dimen.dp_13), dp6, getResources().getDimensionPixelOffset(com.qxcm.moduleutil.R.dimen.dp_13), dp6);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initListener() {
|
||||
super.initListener();
|
||||
@@ -158,7 +196,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
// 将原始数据拆分为多个子列表,每个子列表最多包含4个元素
|
||||
mBinding.constraintLayout.setVisibility(View.VISIBLE);
|
||||
// 添加到 bannerViewPager 的是分页后的列表
|
||||
mBinding.bannerViewPager.addData(baseListData(list,4));
|
||||
mBinding.bannerViewPager.addData(baseListData(list, 4));
|
||||
|
||||
}
|
||||
|
||||
@@ -174,8 +212,22 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
ToastUtils.show("点赞成功");
|
||||
MvpPre.getCircleList(page+"", "10");
|
||||
// MvpPre.getCircleList(page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
|
||||
}
|
||||
|
||||
// 拆分函数
|
||||
@@ -187,8 +239,8 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
return chunks;
|
||||
}
|
||||
|
||||
private List<BaseListData<HeatedBean>> baseListData(List<HeatedBean> list, int chunkSize){
|
||||
List<BaseListData<HeatedBean>> baseListData = new ArrayList<>();
|
||||
private List<BaseListData<HeatedBean>> baseListData(List<HeatedBean> list, int chunkSize) {
|
||||
List<BaseListData<HeatedBean>> baseListData = new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i += chunkSize) {
|
||||
BaseListData<HeatedBean> baseListData1 = new BaseListData<>();
|
||||
baseListData1.setData(list.subList(i, Math.min(i + chunkSize, list.size())));
|
||||
|
||||
@@ -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.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.bean.MyBagBean;
|
||||
@@ -94,6 +95,21 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
|
||||
}
|
||||
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private List<MyBagBean> list;
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.adapter.ExpandColumnAdapter;
|
||||
@@ -20,8 +21,10 @@ 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.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
|
||||
@@ -94,6 +97,38 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
MvpPre.getExpandColumn(type,page+"", "10");
|
||||
}
|
||||
});
|
||||
|
||||
expandColumnAdapter.setOnItemClickListener(new ExpandColumnAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(ExpandColumnBean item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(ExpandColumnBean item) {
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", item.getId()).navigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(ExpandColumnBean item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(ExpandColumnBean item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(ExpandColumnBean item) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRelaClick(ExpandColumnBean item) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
@@ -129,4 +164,19 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
public void setLikeZone() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
@@ -104,4 +105,96 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topicId(String topic_id,int type) {
|
||||
if (type == 1) {//这是获取动态列表
|
||||
api.topicId(topic_id, new BaseObserver<List<CircleListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<CircleListBean> circleListBeans) {
|
||||
MvpRef.get().setCircleList(circleListBeans);
|
||||
}
|
||||
});
|
||||
}else if (type == 2){//这是获取动态详情
|
||||
api.zoneDetail(topic_id, new BaseObserver<CircleListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(CircleListBean circleListBeans) {
|
||||
MvpRef.get().setCircleDetail(circleListBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(String zone_id) {
|
||||
api.deleteZone(zone_id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().setLikeZone();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(String id, String page, String page_limit) {
|
||||
api.getCommentList(id, page, page_limit, new BaseObserver<CommentBean>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(CommentBean commentBean) {
|
||||
MvpRef.get().getCommentList(commentBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone(String id, String content, String pid, String reply_to) {
|
||||
api.commentZone(id, content, pid, reply_to, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().commentZone();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteComment(String id) {
|
||||
api.deleteComment(id, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().commentZone();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/icon_pay_select" />
|
||||
|
||||
<!-- 默认状态(未选中) -->
|
||||
<item android:drawable="@drawable/icon_pay_unselect" />
|
||||
</selector>
|
||||
127
modulecircle/src/main/res/layout/activity_dynamic_detail.xml
Normal file
127
modulecircle/src/main/res/layout/activity_dynamic_detail.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.DynamicDetailActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 顶部标题栏 -->
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- 主内容 RecyclerView -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_50"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_cirle_list" />
|
||||
|
||||
<!-- 评论列表 ScrollView -->
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r16_fff">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 全部评论标题 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center|left"
|
||||
android:text="全部评论(56)"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 刷新控件包裹的评论 RecyclerView -->
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="false">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:background="#ccc" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<!-- 输入区域,始终位于底部 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/cl_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:background="#ffffff"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/dp_8">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@drawable/bg_r80_hui"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="就差你一个神评论~"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_send"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="@dimen/dp_31"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="发送"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
113
modulecircle/src/main/res/layout/activity_dynamic_list.xml
Normal file
113
modulecircle/src/main/res/layout/activity_dynamic_list.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.DynamicListActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<!-- 头像 -->
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/ivAvatar"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:src="@mipmap/default_avatar"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:riv_corner_radius="@dimen/dp_4"/>
|
||||
|
||||
<!-- 标题 -->
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:text="#萌新驾到"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAvatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivAvatar"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
android:layout_marginStart="@dimen/dp_4" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_ry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@mipmap/reyi"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAvatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
/>
|
||||
|
||||
<!-- 描述 -->
|
||||
<TextView
|
||||
android:id="@+id/tvDescription"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:text="热议 3.24W条动态"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="none"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
app:layout_constraintStart_toEndOf="@id/item_ry"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDescription"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivAvatar"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:lineSpacingExtra="@dimen/dp_4"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_content"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_50"
|
||||
tools:listitem="@layout/item_cirle_list"/>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -2,49 +2,55 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_r16_tb_ffffff"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="请选择选项"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_options"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="end"
|
||||
android:layout_marginTop="16dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_r80_hui"
|
||||
android:text="取消"
|
||||
android:backgroundTint="#E0E0E0"
|
||||
android:textColor="#000"/>
|
||||
android:textColor="#000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:text="选择话题"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@drawable/cs"
|
||||
android:text="确认"
|
||||
android:backgroundTint="#2196F3"
|
||||
android:textColor="#FFF"/>
|
||||
</LinearLayout>
|
||||
android:textColor="@color/color_FF333333" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -156,16 +156,16 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/dy_oneimage_iv"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius="5dp" />
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/dy_oneimage_iv"-->
|
||||
<!-- android:layout_width="200dp"-->
|
||||
<!-- android:layout_height="200dp"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:riv_corner_radius="5dp" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_option"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
android:clickable="false"/>
|
||||
<!-- <CheckBox-->
|
||||
<!-- android:id="@+id/cb_option"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:focusable="false"-->
|
||||
<!-- android:clickable="false"/>-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_option"
|
||||
@@ -21,4 +21,12 @@
|
||||
android:textSize="16sp"
|
||||
android:textColor="#333"
|
||||
android:paddingStart="16dp"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_checkbox"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/selector_custom_checkbox"
|
||||
android:focusable="false"
|
||||
android:clickable="true"/>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user