Java Code Examples for com.luck.picture.lib.entity.LocalMedia#setNum()
The following examples show how to use
com.luck.picture.lib.entity.LocalMedia#setNum() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PictureImageGridAdapter.java From PictureSelector with Apache License 2.0 | 5 votes |
/** * Update button status */ private void notifyCheckChanged(ViewHolder viewHolder, LocalMedia imageBean) { viewHolder.tvCheck.setText(""); int size = selectData.size(); for (int i = 0; i < size; i++) { LocalMedia media = selectData.get(i); if (media.getPath().equals(imageBean.getPath()) || media.getId() == imageBean.getId()) { imageBean.setNum(media.getNum()); media.setPosition(imageBean.getPosition()); viewHolder.tvCheck.setText(String.valueOf(imageBean.getNum())); } } }
Example 2
Source File: PictureImageGridAdapter.java From PictureSelector with Apache License 2.0 | 5 votes |
/** * Update the selection order */ private void subSelectPosition() { if (config.checkNumMode) { int size = selectData.size(); for (int index = 0; index < size; index++) { LocalMedia media = selectData.get(index); media.setNum(index + 1); notifyItemChanged(media.position); } } }
Example 3
Source File: PicturePreviewActivity.java From PictureSelector with Apache License 2.0 | 5 votes |
/** * 选择按钮更新 */ private void notifyCheckChanged(LocalMedia imageBean) { if (config.checkNumMode) { check.setText(""); int size = selectData.size(); for (int i = 0; i < size; i++) { LocalMedia media = selectData.get(i); if (media.getPath().equals(imageBean.getPath()) || media.getId() == imageBean.getId()) { imageBean.setNum(media.getNum()); check.setText(String.valueOf(imageBean.getNum())); } } } }
Example 4
Source File: PicturePreviewActivity.java From PictureSelector with Apache License 2.0 | 5 votes |
/** * 更新选择的顺序 */ private void subSelectPosition() { for (int index = 0, len = selectData.size(); index < len; index++) { LocalMedia media = selectData.get(index); media.setNum(index + 1); } }