1. implementation 'androidx.appcompat:appcompat:1.2.0'
  2. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  3. implementation 'com.github.bumptech.glide:glide:4.10.0'
  4. implementation 'com.google.android.material:material:1.2.1'
  5. implementation 'me.luzhuo.android:lib_image_select:1.1.16-SNAPSHOT'

1. 效果图

Screenshot_20210325-013021.jpg

2. 布局使用

  1. <me.luzhuo.lib_image_select.ImageShowView
  2. android:id="@+id/imageshow"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. app:image_layout_show_normal="@layout/image_item_show"/>

3. 代码使用

  1. ImageShowView imageshow = getView().findViewById(R.id.imageshow);
  2. imageshow.setDatas(images);
  3. imageshow.setOnShowListener(new OnImageTitleShowCallbackImpl(){
  4. @Override
  5. public boolean onImageCallback(ImageShowBean image, List<ImageShowBean> images) {
  6. Toast.makeText(requireContext(), "使用自己的图片展示框架", Toast.LENGTH_SHORT).show();
  7. return true;
  8. }
  9. });