New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize tile layout #165
Conversation
@Taresin Just rebased the PR on latest master. Could you please help review the changes? Also I would like to sign the CLA but the link on README leads to 404. |
@markrietveld Hello, any chance to get this reviewed and merged in? I thought it's quite trivial change and would make this awesome library even more flexible. |
@dlackty sorry for the silence leading up to this. I missed this pull request. What is the use case for this change? The inflated layout needs to be an ImageView, or at least extend ImageView. That doesn't provide a lot of flexibility. Depending on what you're trying to achieve, there might be a better way to do it. |
Thanks for the response! What we want to achieve is to use BottomSheet with Facebook's Fresco library. i.e. Replace the default tile with |
@@ -501,6 +509,18 @@ public Builder setPickerDrawable(@DrawableRes int resId) { | |||
} | |||
|
|||
/** | |||
* Sets a layout for the image tile. Default is to use plain image view included in the | |||
* library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add that the root of the layout must be an ImageView
, or the sheet will crash at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markrietveld Resolved and also added a type check.
@dlackty thanks for contributing! |
Thanks @markrietveld! |
For some use cases, library user might want to swap the layout for image grid item.