fix some lint warnings

This commit is contained in:
Konrad Pozniak 2019-04-20 22:36:44 +02:00 committed by Konrad Pozniak
commit ef66deeae7
36 changed files with 52 additions and 105 deletions

View file

@ -77,10 +77,10 @@ defStyleAttr: Int = 0
* even if we have a focus point set.
*/
override fun getScaleType(): ScaleType {
if (focus != null) {
return ScaleType.CENTER_CROP
return if (focus != null) {
ScaleType.CENTER_CROP
} else {
return super.getScaleType()
super.getScaleType()
}
}

View file

@ -194,12 +194,10 @@ public class RoundedImageView extends AppCompatImageView {
}
private void applyColorFilter() {
if (mBitmapPaint != null) {
mBitmapPaint.setColorFilter(mColorFilter);
}
mBitmapPaint.setColorFilter(mColorFilter);
}
private Bitmap getBitmapFromDrawable(Drawable drawable) {
private static Bitmap getBitmapFromDrawable(Drawable drawable) {
if (drawable == null) {
return null;
}