Hallo Ich versuche, einen Hintergrund drawable
für meinen Splash-Screen zu erstellen, die ich in Thema selbst einstellen werde. Aber das Bitmap-Zeichen, das verwendet wurde, um in der Mitte zu bleiben, wird immer länger und ich kann nicht erkennen, wie es normal bleibt. Unten ist mein ziehbar Code: splash_screen_bg.xmlErstellen von Hintergrund mit Layern-Liste zeichnend, Symbol wird gestreckt
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="360"
android:centerColor="@color/colorAccentXDark"
android:endColor="@color/Black"
android:gradientRadius="500dp"
android:startColor="@color/colorAccentXDark"
android:type="radial"
android:useLevel="false" />
</shape>
</item>
<item
android:bottom="50dp"
android:top="50dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="500dp"
android:innerRadiusRatio="1"
android:shape="oval">
<gradient
android:angle="360"
android:centerColor="@color/colorAccentXDark"
android:endColor="@color/colorAccentXDark"
android:gradientRadius="400dp"
android:startColor="@color/colorAccent"
android:type="radial"
android:useLevel="false" />
</shape>
</item>
<item android:gravity="center">
<bitmap android:src="@drawable/ty_logo" />
</item>
</layer-list>
Hier Code ist, wo ich diesen ziehbar als Hintergrund einer Tätigkeit am Einstellung:
<style name="TYTheme" parent="SearchActivityTheme.NoActionBar">
<item name="colorPrimaryDark">@color/colorAccentXDark</item>
<item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
<item name="android:windowBackground">@drawable/splash_screen_bg</item>
</style>
Also hier die Bitmap ziehbar ty_logo
ist ein png
wird in meinem Handy gestreckt. Da es keine scaleType
Option mit bitmapDrawable
gibt weiß ich nicht, wie man damit umgeht.
Haben Sie irgendeine Antwort auf diese Frage gefunden? Ich habe das gleiche Problem und kann keine Lösung finden. – baal
hat die Lösung noch nicht bekommen. – himanshu1496