This repository has been archived by the owner on Jul 23, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 61
Thumbnail of images #68
Labels
Comments
There is no shortcut but: .withAdapterSetter(new ChooserDialog.AdapterSetter() {
@Override
public void apply(DirAdapter adapter) {
// since 1.1.17
adapter.overrideGetView((file, isSelected, isFocused, convertView, parent, inflater) -> {
ViewGroup view = (ViewGroup) inflater.inflate(R.layout.li_row, parent, false);
...
return view;
}
}
}) |
How to use that? To set custom layout for every row, right? |
no bother so much: adapter.overrideGetView((file, isSelected, isFocused, convertView, parent, inflater) -> {
ViewGroup view = (ViewGroup) inflater.inflate(com.obsez.filechooser.R.layout.li_row, parent, false);
// ...
// set filename, isSelected, isFocused to control views
// ...
ImageView iv = view.findViewById(com.obsez.filechooser.R.layout.icon) // ?? find the right res id from xml source file pls.
// ...generate thumb image and set it to iv
return view;
} pls refer the redIds from the source xml of |
Thanks for prompt answers, I ll try this :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is it possible to implement thumbnails for images?
On left side, there can be a thumbnail instead of small file icon.
The text was updated successfully, but these errors were encountered: