-
Notifications
You must be signed in to change notification settings - Fork 395
MediaPreviewer : clean files and manage bitmap with Glide #2445
Conversation
|
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.
A few remarks
statusBar.setBackgroundColor(color); | ||
} | ||
@TargetApi(Build.VERSION_CODES.LOLLIPOP) | ||
private void setStatusBarColor(@ColorRes int statusBarColor) { |
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.
Remove then?
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.
ooops
*/ | ||
public MediaPreviewAdapter(List<RoomMediaMessage> imagePreviewList, ItemPositionChangedListener itemPositionChangedListener) { | ||
public MediaPreviewAdapter(final List<RoomMediaMessage> imagePreviewList, EventListener mEventListener) { |
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.
param name convention
super(itemView); | ||
ButterKnife.bind(this, itemView); | ||
} | ||
this.mEventListener = mEventListener; |
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.
remove this.
|
||
<TextView | ||
android:id="@+id/file_name" | ||
android:id="@+id/media_previewer_file_name" |
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.
No need for a background here? (I've not run it)
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.
the text is hardly visible, maybe add transparent background
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.
Yep, added.
void onMediaMessagePreviewClicked(RoomMediaMessage roomMediaMessage); | ||
} | ||
|
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.
remove extra new lines pls
no more crashes when selecting a large number of media? |
mPreviewerRecyclerView.setLayoutManager(linearLayoutManager); | ||
final MediaPreviewAdapter mediaPreviewAdapter = new MediaPreviewAdapter(sharedDataItems, this); | ||
mPreviewerRecyclerView.setAdapter(mediaPreviewAdapter); | ||
updatePreview(sharedDataItems.get(0)); |
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.
It's strange, it's working, but I think this line should be outside the else block, no?
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.
Actually it's not working if you select "Use native camera" in the settings if if you take a photo. Can you check this case pls?
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.
Yes, just saw that too
final MediaPreviewAdapter mediaPreviewAdapter = new MediaPreviewAdapter(sharedDataItems, this); | ||
mPreviewerRecyclerView.setAdapter(mediaPreviewAdapter); | ||
|
||
if (!sharedDataItems.isEmpty()) { |
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.
I think this cannot be empty, no?
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.
Yup
Some improvements over the MediaPreviewer classes