3

背景画像として、またはプログラムで(Android 4.0で)背景として(放射状)グラデーションを追加しようとしましたが、どれも機能しません。エミュレータでしかテストできませんが、4.0 デバイスでも同じだと思います。

これらの解決策は機能しません:

私はさらにいくつかのことを試したと思いますが、誰かが背景として作業グラデーションを作成する方法を知っているのでしょうか?

私の現在のコードは次のようになります。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".SplashScreen">

    <ImageView
        android:id="@+id/imageViewLogo"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@string/desc_string"
        android:scaleType="centerCrop"
        android:src="@drawable/background_image" />

</RelativeLayout>

および background_image.xml

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/background_image"
    android:antialias="true"
    android:dither="true"
    android:src="@drawable/bg_portrait" />
4

2 に答える 2

2

明らかに、それは単なるエミュレーターです。実際のデバイスでは、見栄えがします。

于 2014-02-26T12:18:55.493 に答える