修改删除重复xml.
This commit is contained in:
@@ -33,7 +33,7 @@ import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.xscm.modulemain.activity.plaza.contacts.ReleaseContract;
|
||||
import com.xscm.modulemain.activity.plaza.presenter.ReleasePresenter;
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.adapter.UserPhotoWallAdapter;
|
||||
import com.xscm.modulemain.adapter.ShareWallAdapter;
|
||||
import com.xscm.moduleutil.bean.HeatedBean;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
@@ -54,7 +54,7 @@ import java.util.List;
|
||||
* @description: 发布动态
|
||||
*/
|
||||
public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityReleaseBinding> implements ReleaseContract.View {
|
||||
UserPhotoWallAdapter mUserPhotoWallAdapter;
|
||||
ShareWallAdapter mUserPhotoWallAdapter;
|
||||
List<String> list=new ArrayList<>();
|
||||
private List<String> uploadedUrls = new ArrayList<>();//真实图片地址
|
||||
final int maxNum = 1200;
|
||||
@@ -88,7 +88,7 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
});
|
||||
|
||||
mBinding.rvPhotoWall.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
mBinding.rvPhotoWall.setAdapter(mUserPhotoWallAdapter = new UserPhotoWallAdapter());
|
||||
mBinding.rvPhotoWall.setAdapter(mUserPhotoWallAdapter = new ShareWallAdapter());
|
||||
mUserPhotoWallAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
@@ -98,7 +98,7 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
uploadedUrls.remove(item);
|
||||
updateAdapterData();
|
||||
} else {
|
||||
if (item.equals(UserPhotoWallAdapter.ADD_PHOTO)) {
|
||||
if (item.equals(ShareWallAdapter.ADD_PHOTO)) {
|
||||
int maxSelectable = 9 - uploadedUrls.size();
|
||||
if (maxSelectable > 0) {
|
||||
// 点击的是"+"'号,启动图片选择
|
||||
@@ -176,7 +176,7 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
private void updateAdapterData() {
|
||||
list.clear();
|
||||
list.addAll(uploadedUrls); // 添加真实图片
|
||||
list.add(UserPhotoWallAdapter.ADD_PHOTO); // 最后加上 ADD_PHOTO
|
||||
list.add(ShareWallAdapter.ADD_PHOTO); // 最后加上 ADD_PHOTO
|
||||
mUserPhotoWallAdapter.setNewData(list);
|
||||
}
|
||||
private void onClick(View view) {
|
||||
@@ -281,7 +281,7 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
|
||||
|
||||
BottomSheetDialog dialog = new BottomSheetDialog(this);
|
||||
dialog.setContentView(R.layout.bottom_sheet_recyclerview);
|
||||
dialog.setContentView(R.layout.bottom_album_recyclerview);
|
||||
View bottomSheet = dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
bottomSheet.setBackgroundResource(android.R.color.transparent); // 设置为透明
|
||||
|
||||
Reference in New Issue
Block a user