Cover was not displayed correctly on some devices
This commit is contained in:
parent
336beae409
commit
034fa8a9e7
|
@ -11,7 +11,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:textSize="18dp"
|
android:textSize="18dp"
|
||||||
|
@ -38,10 +37,10 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imgvCover"
|
android:id="@+id/imgvCover"
|
||||||
android:layout_marginLeft="55dp"
|
android:layout_marginLeft="60dp"
|
||||||
android:layout_marginRight="55dp"
|
android:layout_marginRight="60dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class BitmapDecoder {
|
||||||
options.inJustDecodeBounds = false;
|
options.inJustDecodeBounds = false;
|
||||||
options.inSampleSize = sampleSize;
|
options.inSampleSize = sampleSize;
|
||||||
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
|
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
|
||||||
options.inScaled = false;
|
options.inScaled = true;
|
||||||
|
|
||||||
Bitmap decodedBitmap = BitmapFactory.decodeFile(fileUrl, options);
|
Bitmap decodedBitmap = BitmapFactory.decodeFile(fileUrl, options);
|
||||||
if (decodedBitmap == null) {
|
if (decodedBitmap == null) {
|
||||||
|
|
Loading…
Reference in New Issue