1、个人信息完善
2、集成聊天功能 3、完成登录
This commit is contained in:
@@ -24,8 +24,8 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
@@ -39,6 +39,8 @@ dependencies {
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/BaseAppTheme" />
|
||||
android:supportsRtl="true">
|
||||
<activity
|
||||
android:name=".activity.ReleaseActivity"
|
||||
android:exported="false" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,208 @@
|
||||
package com.example.modulecircle.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.contacts.ReleaseContract;
|
||||
import com.example.modulecircle.databinding.ActivityReleaseBinding;
|
||||
import com.example.modulecircle.dialog.MultiSelectAdapter;
|
||||
import com.example.modulecircle.presenter.ReleasePresenter;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.adapter.UserPhotoWallAdapter;
|
||||
import com.qxcm.moduleutil.bean.UserImgList;
|
||||
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
* @data 2025/5/28
|
||||
* @description: 发布动态
|
||||
*/
|
||||
public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityReleaseBinding> implements ReleaseContract.View {
|
||||
UserPhotoWallAdapter mUserPhotoWallAdapter;
|
||||
List<UserImgList> list;
|
||||
final int maxNum = 1200;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("动态发布");
|
||||
|
||||
mBinding.tvSz.setText("0/" + maxNum);
|
||||
mBinding.etG.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (s.length() == maxNum) {
|
||||
mBinding.tvSz.setText("您输入的字数已超过限制");
|
||||
} else {
|
||||
mBinding.tvSz.setText((maxNum - s.length()) + "/" + maxNum);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.rvPhotoWall.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
mBinding.rvPhotoWall.setAdapter(mUserPhotoWallAdapter = new UserPhotoWallAdapter());
|
||||
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);
|
||||
} else {
|
||||
if ("0".equals(item.getId())) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, true, 9);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
mUserPhotoWallAdapter.setOnItemChildLongClickListener(new BaseQuickAdapter.OnItemChildLongClickListener() {
|
||||
@Override
|
||||
public boolean onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
mUserPhotoWallAdapter.setLongClickPos(position);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
list = new ArrayList<>();
|
||||
UserImgList userImgList = new UserImgList("0", "");
|
||||
list.add(userImgList);
|
||||
mUserPhotoWallAdapter.setNewData(list);
|
||||
mUserPhotoWallAdapter.setDelete(true);
|
||||
|
||||
mBinding.rl1.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.rl_1) {
|
||||
dialog();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode, boolean isVideo, int type) {
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(mimeType)
|
||||
.isGif(isVideo)
|
||||
.imageEngine(GlideEngine.createGlideEngine())
|
||||
.maxSelectNum(type)
|
||||
.isPreviewImage(true)
|
||||
.isCamera(true)
|
||||
.setOutputCameraPath(Constants.FILE_PATH)
|
||||
.isCompress(true)
|
||||
.setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
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();
|
||||
}
|
||||
// MvpPre.uploadFile(new File(url), 0);
|
||||
}
|
||||
break;
|
||||
case PictureConfig.REQUEST_CAMERA:
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainMultipleResult(data);
|
||||
if (localMedia1 != null && localMedia1.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia1.get(0);
|
||||
// MvpPre.uploadFile(new File(imgMedia.getRealPath()), 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_release;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReleasePresenter bindPresenter() {
|
||||
return new ReleasePresenter(this, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.example.modulecircle.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
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.OneImageYuanJiaoAdapter;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.widget.MyGridView;
|
||||
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||
|
||||
public class ExpandColumnAdapter extends BaseQuickAdapter<CircleListBean, 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);
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
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.setText(com.qxcm.moduleutil.R.id.dy_name_text, item.getUserNickName());
|
||||
|
||||
//头像
|
||||
ImageUtils.loadHeadCC(item.getUserAvatar(), (ImageView) helper.getView(com.qxcm.moduleutil.R.id.dy_head_image));
|
||||
|
||||
//动态内容以富文本展示
|
||||
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()]);
|
||||
int length = arrIv.length;
|
||||
|
||||
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(com.qxcm.moduleutil.R.id.dy_image_recyc);
|
||||
recyclerView.setNumColumns(3);
|
||||
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||
|
||||
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);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.example.modulecircle.contacts;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
|
||||
public class ReleaseContract {
|
||||
public interface View extends IView<Activity> {
|
||||
|
||||
}
|
||||
|
||||
public interface IIndexPre extends IPresenter {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.example.modulecircle.dialog;
|
||||
|
||||
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;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.modulecircle.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.ViewHolder> {
|
||||
private List<String> options;
|
||||
private SparseBooleanArray selectedPositions = new SparseBooleanArray();
|
||||
|
||||
public MultiSelectAdapter(List<String> options) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_multi_select, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
String item = options.get(position);
|
||||
holder.tvOption.setText(item);
|
||||
holder.cbOption.setChecked(selectedPositions.get(position, false));
|
||||
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
boolean isChecked = selectedPositions.get(position, false);
|
||||
if (isChecked) {
|
||||
selectedPositions.delete(position);
|
||||
} else {
|
||||
selectedPositions.put(position, true);
|
||||
}
|
||||
notifyItemChanged(position);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return options.size();
|
||||
}
|
||||
|
||||
public List<String> getSelectedItems() {
|
||||
List<String> selected = new ArrayList<>();
|
||||
for (int i = 0; i < options.size(); i++) {
|
||||
if (selectedPositions.get(i)) {
|
||||
selected.add(options.get(i));
|
||||
}
|
||||
}
|
||||
return selected;
|
||||
}
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
CheckBox cbOption;
|
||||
TextView tvOption;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
cbOption = itemView.findViewById(R.id.cb_option);
|
||||
tvOption = itemView.findViewById(R.id.tv_option);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package com.example.modulecircle.fragment;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import com.example.modulecircle.R;
|
||||
import com.example.modulecircle.activity.ReleaseActivity;
|
||||
import com.example.modulecircle.contacts.CircleContacts;
|
||||
import com.example.modulecircle.databinding.FragmentCircleBinding;
|
||||
import com.example.modulecircle.presenter.CirclePresenter;
|
||||
@@ -11,6 +18,8 @@ import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.bean.MyBagBean;
|
||||
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -20,22 +29,32 @@ import java.util.List;
|
||||
*语圈
|
||||
*/
|
||||
public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleBinding> implements CircleContacts.View {
|
||||
|
||||
private List<MyBagBean> list;
|
||||
public static CircleFragment newInstance () {
|
||||
return new CircleFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData () {
|
||||
list=new ArrayList<>();
|
||||
list.add(new MyBagBean("发现", "1"));
|
||||
list.add(new MyBagBean("扩列", "2"));
|
||||
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list));
|
||||
mBinding.tabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.tabLayout.setCurrentTab(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView () {
|
||||
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
fragments.add(CircleCategoryFragment.newInstance());
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(fragments, getChildFragmentManager()));
|
||||
mBinding.ivRelease.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId()==R.id.iv_release){//发布
|
||||
startActivity(new Intent(getContext(), ReleaseActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,4 +82,37 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private List<MyBagBean> list;
|
||||
|
||||
|
||||
public MyFragmentPagerAdapter(FragmentManager fm, List<MyBagBean> list) {
|
||||
super(fm);
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
MyBagBean model = list.get(position);
|
||||
if ("1".equals(model.getMyBagType())){
|
||||
return CircleCategoryFragment.newInstance();
|
||||
}else {
|
||||
return ExpandColumnFragment.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
MyBagBean model = list.get(position);
|
||||
return model.getMyBagTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.example.modulecircle.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.example.modulecircle.R;
|
||||
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.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
|
||||
import org.angmarch.views.NiceSpinner;
|
||||
import org.angmarch.views.OnSpinnerItemSelectedListener;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/5/28
|
||||
*@description: 动态中的扩列fragemnt
|
||||
*/
|
||||
public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, FragmentExpandColumnBinding> implements CircleContacts.View {
|
||||
|
||||
|
||||
@Override
|
||||
protected CirclePresenter bindPresenter() {
|
||||
return new CirclePresenter(this,getActivity());
|
||||
}
|
||||
|
||||
public static ExpandColumnFragment newInstance() {
|
||||
return new ExpandColumnFragment();
|
||||
}
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
List<String> dataset = new LinkedList<>(Arrays.asList("只看女生", "只看男生", "查看全部"));
|
||||
mBinding.niceSpinner.attachDataSource(dataset);
|
||||
mBinding.niceSpinner.setOnSpinnerItemSelectedListener(new OnSpinnerItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(NiceSpinner parent, View view, int position, long id) {
|
||||
// 示例使用的是 String 类型,但你的数据类型可以是任意的
|
||||
String item = (String) parent.getItemAtPosition(position);
|
||||
LogUtils.e("@@@",item);
|
||||
mBinding.niceSpinner.setText(item);
|
||||
// mBinding.niceSpinner.getItemAtPosition(position);
|
||||
}
|
||||
});
|
||||
mBinding.niceSpinner.setText("只看女生");
|
||||
mBinding.niceSpinner.setBackground(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_expand_column;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCategories(List<HeatedBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.example.modulecircle.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulecircle.contacts.ReleaseContract;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
public class ReleasePresenter extends BasePresenter<ReleaseContract.View> implements ReleaseContract.IIndexPre {
|
||||
public ReleasePresenter(ReleaseContract.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
}
|
||||
115
modulecircle/src/main/res/layout/activity_release.xml
Normal file
115
modulecircle/src/main/res/layout/activity_release.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<?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.ReleaseActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_FFF8F8F8">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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_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"
|
||||
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" />
|
||||
|
||||
<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>
|
||||
|
||||
</layout>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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: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"
|
||||
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:gravity="end"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="取消"
|
||||
android:backgroundTint="#E0E0E0"
|
||||
android:textColor="#000"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="确认"
|
||||
android:backgroundTint="#2196F3"
|
||||
android:textColor="#FFF"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -19,22 +19,31 @@
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/circle_title"
|
||||
android:textColor="@color/color_black"
|
||||
android:textSize="@dimen/sp_25"
|
||||
android:textStyle="normal"
|
||||
android:layout_marginLeft="@dimen/dp_15"/>
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:tl_indicator_corner_radius="@dimen/dp_3"
|
||||
app:tl_indicator_drawable="@drawable/index_bg_indicator"
|
||||
app:tl_indicator_height="@dimen/dp_6"
|
||||
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
||||
app:tl_indicator_width="@dimen/dp_28"
|
||||
app:tl_showCateIndicator="false"
|
||||
app:tl_tab_width="@dimen/dp_50"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/color_2B2823"
|
||||
app:tl_textSelectedSize="@dimen/sp_16"
|
||||
app:tl_textUnselectColor="@color/color_FF999999"
|
||||
app:tl_textsize="@dimen/sp_14" />
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_room2"
|
||||
android:id="@+id/iv_release"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/notifi"
|
||||
android:src="@mipmap/release_n"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginRight="@dimen/dp_11"/>
|
||||
|
||||
52
modulecircle/src/main/res/layout/fragment_expand_column.xml
Normal file
52
modulecircle/src/main/res/layout/fragment_expand_column.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".fragment.ExpandColumnFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="扩列交友" />
|
||||
|
||||
<org.angmarch.views.NiceSpinner
|
||||
android:id="@+id/nice_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@color/transparent"
|
||||
app:arrowDrawable="@mipmap/up_x"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<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"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
143
modulecircle/src/main/res/layout/item_expand_column.xml
Normal file
143
modulecircle/src/main/res/layout/item_expand_column.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15sp"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingRight="15sp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.CircularImage
|
||||
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" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_name_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#212121"
|
||||
android:textStyle="bold"
|
||||
android:text="萌新驾到"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发布于12:52"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#999999"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gensui"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/no_follow"
|
||||
android:gravity="center"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/diandian"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:background="@mipmap/shequ_dongtai_gengduo"
|
||||
android:gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/aaa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.qxcm.moduleutil.widget.MyGridView
|
||||
android:id="@+id/dy_image_recyc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:numColumns="3"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
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" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
24
modulecircle/src/main/res/layout/item_multi_select.xml
Normal file
24
modulecircle/src/main/res/layout/item_multi_select.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_option"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#333"
|
||||
android:paddingStart="16dp"/>
|
||||
</LinearLayout>
|
||||
@@ -1,2 +1,4 @@
|
||||
<resources>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user