Messaging: Further code improvements
* Remove redundant casts * getParcelable(ArrayList|Exra) without class argument is deprecated * ViewPager.setOnPageChangeListener -> addOnPageChangeListener * RecyclerView.setOnScrollListener -> addOnScrollListener * Remove unused initializations * Remove unused code Change-Id: I21beb6c90c675a4f2cfd7e3d5ebbd18b745f5911
This commit is contained in:
@@ -113,7 +113,7 @@ public class VideoThumbnailView extends FrameLayout {
|
||||
mVideoView = null;
|
||||
}
|
||||
|
||||
mPlayButton = (ImageButton) findViewById(R.id.video_thumbnail_play_button);
|
||||
mPlayButton = findViewById(R.id.video_thumbnail_play_button);
|
||||
if (loop) {
|
||||
mPlayButton.setVisibility(View.GONE);
|
||||
} else {
|
||||
@@ -136,7 +136,7 @@ public class VideoThumbnailView extends FrameLayout {
|
||||
});
|
||||
}
|
||||
|
||||
mThumbnailImage = (AsyncImageView) findViewById(R.id.video_thumbnail_image);
|
||||
mThumbnailImage = findViewById(R.id.video_thumbnail_image);
|
||||
if (mAllowCrop) {
|
||||
mThumbnailImage.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
mThumbnailImage.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
@@ -268,8 +268,8 @@ public class VideoThumbnailView extends FrameLayout {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
return;
|
||||
}
|
||||
int desiredWidth = 1;
|
||||
int desiredHeight = 1;
|
||||
int desiredWidth;
|
||||
int desiredHeight;
|
||||
if (mVideoView != null) {
|
||||
mVideoView.measure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user