对接语圈接口,
页面基本完成,评论完成一半,需要再调试
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/BaseAppTheme">
|
||||
<activity
|
||||
android:name=".activity.CreateAlbumActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.RealName1Activity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
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 com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.conacts.MyAlbumConacts;
|
||||
import com.example.modulevocal.databinding.ActivityCreateAlbumBinding;
|
||||
import com.example.modulevocal.presenter.MyAlbumPresenter;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.AlbumBean;
|
||||
import com.qxcm.moduleutil.bean.UserImgList;
|
||||
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CreateAlbumActivity extends BaseMvpActivity<MyAlbumPresenter, ActivityCreateAlbumBinding> implements MyAlbumConacts.View{
|
||||
|
||||
private String imageUrl="";
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("新建相册");
|
||||
mBinding.rivAlbum.setOnClickListener(this::onClick);
|
||||
mBinding.tvCancel.setOnClickListener(this::onClick);
|
||||
mBinding.tvConfirm.setOnClickListener(this::onClick);
|
||||
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.riv_album) {
|
||||
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.CHOOSE_REQUEST, false, 1);
|
||||
} else if (view.getId() ==R.id.tv_cancel) {
|
||||
finish();
|
||||
}else if (view.getId() ==R.id.tv_confirm) {
|
||||
if (!Objects.requireNonNull(mBinding.edAlbumName.getText()).toString().trim().isEmpty() || !imageUrl.equals("")){
|
||||
MvpPre.createAlbum(mBinding.edAlbumName.getText().toString().trim(),imageUrl);
|
||||
}else {
|
||||
ToastUtils.showShort("请输入相册名称并选择相册封面");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_create_album;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MyAlbumPresenter bindPresenter() {
|
||||
return new MyAlbumPresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAlbumList(List<AlbumBean> data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type) {
|
||||
imageUrl=url;
|
||||
if (type == 1) {
|
||||
ImageUtils.loadHeadCC(url, mBinding.rivAlbum);
|
||||
} else {
|
||||
// list.add(new UserImgList("1", url));
|
||||
// mUserPhotoWallAdapter.setNewData(list);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendCodeSuccess() {
|
||||
finish();
|
||||
}
|
||||
|
||||
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), 1);
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.example.modulevocal.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.qxcm.moduleutil.bean.AlbumBean;
|
||||
import com.qxcm.moduleutil.bean.UserImgList;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class MyAlbumListAdapter extends BaseQuickAdapter<AlbumBean, BaseViewHolder> {
|
||||
private boolean b = false;
|
||||
private int longClickPos = -1;
|
||||
|
||||
public MyAlbumListAdapter() {
|
||||
super(R.layout.item_album_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, AlbumBean item) {
|
||||
|
||||
if (!"0".equals(item.getId())) {
|
||||
ImageUtils.loadHeadCC(item.getImage(), helper.getView(R.id.riv_album));
|
||||
helper.setVisible(R.id.tv_album_name, true);
|
||||
helper.setVisible(R.id.tv_album_count, true);
|
||||
if (!item.getPwd().isEmpty()){
|
||||
ImageUtils.loadBlurredImageWithDefault(item.getImage(), helper.getView(R.id.riv_album), com.qxcm.moduleutil.R.mipmap.default_avatar, 25);
|
||||
helper.setVisible(R.id.iv_album_suo,true);
|
||||
}
|
||||
helper.setText(R.id.tv_album_name, item.getName());
|
||||
helper.setText(R.id.tv_album_count, item.getRead_num());
|
||||
} else {
|
||||
helper.setImageResource(R.id.riv_album, com.qxcm.moduleutil.R.mipmap.create_album);
|
||||
helper.setVisible(R.id.tv_album_name, false);
|
||||
helper.setVisible(R.id.tv_album_count, false);
|
||||
helper.setVisible(R.id.iv_album_suo,false);
|
||||
}
|
||||
|
||||
helper.setVisible(R.id.riv_album, true);
|
||||
helper.addOnClickListener(R.id.riv_album);
|
||||
// helper.addOnLongClickListener(R.id.riv_album);
|
||||
}
|
||||
|
||||
|
||||
public void setDelete(boolean b) {
|
||||
this.b = b;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setLongClickPos(int pos) {
|
||||
this.longClickPos = pos;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public boolean getDelete() {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.example.modulevocal.conacts;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.AlbumBean;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public class MyAlbumConacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void getAlbumList(List<AlbumBean> data);
|
||||
|
||||
void upLoadSuccess(String url, int type);
|
||||
|
||||
void sendCodeSuccess();
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
void getAlbumList(String page, String page_limit);
|
||||
|
||||
void uploadFile(File file, int type);
|
||||
|
||||
void createAlbum(String name,String image);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.example.modulevocal.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.activity.CreateAlbumActivity;
|
||||
import com.example.modulevocal.adapter.MyAlbumListAdapter;
|
||||
import com.example.modulevocal.adapter.UserPhotoWallAdapter;
|
||||
import com.example.modulevocal.conacts.MyAlbumConacts;
|
||||
import com.example.modulevocal.databinding.FragmentMyAlbumBinding;
|
||||
import com.example.modulevocal.presenter.MyAlbumPresenter;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.AlbumBean;
|
||||
import com.qxcm.moduleutil.bean.UserImgList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
* @data 2025/5/29
|
||||
* @description: 我的相册
|
||||
*/
|
||||
public class MyAlbumFragment extends BaseMvpFragment<MyAlbumPresenter, FragmentMyAlbumBinding> implements MyAlbumConacts.View {
|
||||
|
||||
private MyAlbumListAdapter mAdapter;
|
||||
|
||||
public static MyAlbumFragment newInstance(String userId) {
|
||||
MyAlbumFragment fragment = new MyAlbumFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("userId", userId);
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MyAlbumPresenter bindPresenter() {
|
||||
return new MyAlbumPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.getAlbumList("1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mAdapter = new MyAlbumListAdapter();
|
||||
mBinding.dyImageRecyc.setLayoutManager(new GridLayoutManager(getActivity(), 2));
|
||||
mBinding.dyImageRecyc.setAdapter(mAdapter);
|
||||
mAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
AlbumBean item = mAdapter.getItem(position);
|
||||
if ("0".equals(item.getId())) {
|
||||
// startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, true, 6);
|
||||
startActivity(new Intent(getActivity(), CreateAlbumActivity.class));
|
||||
}
|
||||
else {
|
||||
if (!TextUtils.isEmpty(item.getPwd())) {
|
||||
|
||||
} else {
|
||||
// Intent intent = new Intent(getActivity(), AlbumDetailActivity.class);
|
||||
// intent.putExtra("album_id", item.getId());
|
||||
// startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_my_album;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAlbumList(List<AlbumBean> data) {
|
||||
mAdapter.setNewData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendCodeSuccess() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
list=new ArrayList<>();
|
||||
list.add(new MyBagBean("动态", "1"));
|
||||
list.add(new MyBagBean("礼物墙", "2"));
|
||||
list.add(new MyBagBean("我的相册", "3"));
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list,userId));
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
@@ -90,8 +91,10 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
MyBagBean model = list.get(position);
|
||||
if ("1".equals(model.getMyBagType())){
|
||||
return CirleListFragment.newInstance();
|
||||
}else {
|
||||
}else if ("2".equals(model.getMyBagType())){
|
||||
return UserGiftWallFragment.newInstance(userId);
|
||||
}else {
|
||||
return MyAlbumFragment.newInstance(userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.example.modulevocal.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulevocal.conacts.MyAlbumConacts;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.AlbumBean;
|
||||
import com.qxcm.moduleutil.http.AccessTokenInterceptor;
|
||||
import com.qxcm.moduleutil.http.ApiServer;
|
||||
import com.qxcm.moduleutil.http.BaseModel;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
import com.qxcm.moduleutil.utils.SystemUtils;
|
||||
import com.qxcm.moduleutil.utils.oss.OSSOperUtils;
|
||||
import com.tencent.cloud.huiyansdkface.okhttp3.Interceptor;
|
||||
import com.tencent.cloud.huiyansdkface.okhttp3.OkHttpClient;
|
||||
import com.tencent.cloud.huiyansdkface.okhttp3.Request;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import lombok.SneakyThrows;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
public class MyAlbumPresenter extends BasePresenter<MyAlbumConacts.View> implements MyAlbumConacts.IMePre {
|
||||
public MyAlbumPresenter(MyAlbumConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAlbumList(String page, String page_limit) {
|
||||
// api.getAlbumList(page, page_limit, new BaseObserver<List<AlbumBean>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(List<AlbumBean> albumBeans) {
|
||||
// MvpRef.get().getAlbumList(albumBeans);
|
||||
// }
|
||||
// });
|
||||
|
||||
List<AlbumBean> albumBeans = new ArrayList<>();
|
||||
AlbumBean albumBean1 = new AlbumBean();
|
||||
albumBean1.setId("0");
|
||||
albumBeans.add(albumBean1);
|
||||
for (int i = 1; i < 5; i++) {
|
||||
AlbumBean albumBean = new AlbumBean();
|
||||
albumBean.setId(i + "");
|
||||
albumBean.setName("相册" + i);
|
||||
albumBean.setImage("http://img.alicdn.com/tfs/TB1.XpjQFXXXXX_XpXXXXXXXXXX-1024-1024.png");
|
||||
albumBean.setPwd(i / 2 == 1 ? "123456" : "");
|
||||
albumBean.setRead_num("100");
|
||||
albumBeans.add(albumBean);
|
||||
}
|
||||
MvpRef.get().getAlbumList(albumBeans);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void uploadFile(File file, int type) {
|
||||
MvpRef.get().showLoadings("上传中...");
|
||||
String url = OSSOperUtils.getPath(file, type);
|
||||
OSSOperUtils.newInstance().putObjectMethod(url, file.getPath(), new OSSOperUtils.OssCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (isViewAttach()) {
|
||||
MvpRef.get().disLoadings();
|
||||
MvpRef.get().upLoadSuccess(OSSOperUtils.AliYunOSSURLFile + url, type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail() {
|
||||
if (isViewAttach()) {
|
||||
ToastUtils.show("上传失败");
|
||||
MvpRef.get().disLoadings();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createAlbum(String name, String image) {
|
||||
// api.createAlbum(name, image, new BaseObserver<String>() {
|
||||
//
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(String s) {
|
||||
// MvpRef.get().sendCodeSuccess();
|
||||
// }
|
||||
// });
|
||||
|
||||
api.createAlbum(name, image, new BaseObserver<String>(){
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().sendCodeSuccess();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -82,27 +82,27 @@ public class UserHomepagePresenter extends BasePresenter<UserHomepageConacts.Vie
|
||||
|
||||
@Override
|
||||
public void getCircleList() {
|
||||
List<String> images=new ArrayList<>();
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
List<CircleListBean> list=new ArrayList<>();
|
||||
for (int i = 0; i < 10; i++){
|
||||
CircleListBean bean=new CircleListBean();
|
||||
bean.setId(""+i);
|
||||
bean.setUserNickName("萌新驾到"+i);
|
||||
bean.setUserAvatar("");
|
||||
bean.setTime("发布于 12:5"+i);
|
||||
bean.setContent("任何关系,都需要谦逊谨慎");
|
||||
bean.setImages(images);
|
||||
bean.setType("1");
|
||||
bean.setComment(""+i);
|
||||
bean.setLike(""+i);
|
||||
bean.setIsShare(""+i);
|
||||
list.add(bean);
|
||||
}
|
||||
MvpRef.get().setCircleList(list);
|
||||
// List<String> images=new ArrayList<>();
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// List<CircleListBean> list=new ArrayList<>();
|
||||
// for (int i = 0; i < 10; i++){
|
||||
// CircleListBean bean=new CircleListBean();
|
||||
// bean.setId(""+i);
|
||||
// bean.setUserNickName("萌新驾到"+i);
|
||||
// bean.setUserAvatar("");
|
||||
// bean.setTime("发布于 12:5"+i);
|
||||
// bean.setContent("任何关系,都需要谦逊谨慎");
|
||||
// bean.setImages(images);
|
||||
// bean.setType("1");
|
||||
// bean.setComment(""+i);
|
||||
// bean.setLike(""+i);
|
||||
// bean.setIsShare(""+i);
|
||||
// list.add(bean);
|
||||
// }
|
||||
// MvpRef.get().setCircleList(list);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
76
modulevocal/src/main/res/layout/activity_create_album.xml
Normal file
76
modulevocal/src/main/res/layout/activity_create_album.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<?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.CreateAlbumActivity">
|
||||
|
||||
<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.qxcm.moduleutil.widget.ClearEditText
|
||||
android:id="@+id/ed_album_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r100_hui"
|
||||
android:gravity="center|left"
|
||||
android:hint="请输入相册名称"
|
||||
android:maxLength="10"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="#333333"
|
||||
android:textColorHint="#9B9B9B"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/riv_album"
|
||||
android:layout_width="@dimen/dp_103"
|
||||
android:layout_height="@dimen/dp_103"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ed_album_name"
|
||||
app:riv_corner_radius="@dimen/dp_5"
|
||||
android:src="@mipmap/add_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginStart="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:background="@mipmap/cancel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/riv_album" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="@dimen/dp_188"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:layout_marginEnd="@dimen/dp_38"
|
||||
android:background="@mipmap/sure"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_cancel"
|
||||
app:layout_constraintTop_toBottomOf="@+id/riv_album" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
19
modulevocal/src/main/res/layout/fragment_my_album.xml
Normal file
19
modulevocal/src/main/res/layout/fragment_my_album.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.MyAlbumFragment">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/dy_image_recyc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
/>
|
||||
|
||||
</layout>
|
||||
@@ -38,17 +38,18 @@
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:background="#f6f6f6"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@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_showCateIndicator="false"
|
||||
app:tl_indicator_width="@dimen/dp_28"
|
||||
app:tl_tab_width="@dimen/dp_50"
|
||||
app:tl_indicator_width="@dimen/dp_30"
|
||||
app:tl_tab_width="@dimen/dp_64"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/color_2B2823"
|
||||
app:tl_textSelectedSize="@dimen/sp_16"
|
||||
@@ -62,8 +63,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_r16_f6f6f6"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
56
modulevocal/src/main/res/layout/item_album_list.xml
Normal file
56
modulevocal/src/main/res/layout/item_album_list.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/riv_album"
|
||||
android:layout_width="@dimen/dp_165"
|
||||
android:layout_height="@dimen/dp_165"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:riv_corner_radius="@dimen/dp_5"
|
||||
tools:src="@mipmap/create_album" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_album_suo"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
app:layout_constraintTop_toTopOf="@+id/riv_album"
|
||||
app:layout_constraintEnd_toEndOf="@+id/riv_album"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/riv_album"
|
||||
app:layout_constraintStart_toStartOf="@+id/riv_album"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:src="@mipmap/suo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_album_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
app:layout_constraintTop_toBottomOf="@+id/riv_album"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:gravity="left|center"
|
||||
tools:text="我的相册"
|
||||
android:textColor="#333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<TextView
|
||||
android:id="@+id/tv_album_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_album_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:gravity="left|center"
|
||||
tools:text="共0张"
|
||||
android:textColor="#999999"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user