Ich habe einen Startbildschirm mit einem ImageView
Teil des Hintergrunds. Unabhängig davon, ob ich meine Bitmap skalieren lasse (was ich tue), ist die Bildqualität schrecklich. Ich denke, es reduziert die Farbtiefe. Ich habe mich schon SO umgeschaut und ein Vorschlag war, mein Bild in raw
statt drawable
zu setzen, aber das half auch nicht. Hier ist ein Screenshot:Schreckliche ImageView Bitmap-Qualität?
Was genau ist hier los, und wie kann ich es beheben?
EDIT: Ich habe diese Bitmap nicht programmgesteuert angewendet, so dass es keinen relevanten Java-Code gibt. Hier ist der XML-Code für diese Aktivität:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/RelativeLayoutSplash"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawingCacheQuality="high"
android:orientation="vertical"
android:padding="@dimen/splash_padding"
android:scrollbarAlwaysDrawVerticalTrack="true"
tools:context=".SplashActivity" >
<ImageView
android:id="@+id/ImageViewBg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/logo_description"
android:scaleType="centerCrop"
android:src="@drawable/splash_bg_register" />
<ImageView
android:id="@+id/ImageViewLogo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/logo_description"
android:maxHeight="@dimen/logo_maxheight"
android:maxWidth="@dimen/logo_maxwidth"
android:layout_centerVertical="true"
android:src="@drawable/logo" />
<TextView
android:id="@+id/TextViewCopyright"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="@string/copyright"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/white_50"
android:textSize="@dimen/copyright_size" />
</RelativeLayout>
EDIT: Ich habe versucht, getWindow().setFormat(PixelFormat.RGBA_8888);
wie vorgeschlagen, die einen sichtbaren Unterschied gemacht, aber das Banding ist noch vorhanden. This ist das Bild, das ich als Hintergrund verwende.
poste deinen Code. –
Entschuldigung. –
Wie groß ist das Bild? –