ウィジェットにグラデーションの背景を付けたいです。このために、グラデーションに次のxmlを使用しました。
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/general_listrow_background_start"
android:endColor="@color/general_listrow_background_end"
android:angle="270"/>
</shape>
レイアウト内にこれを追加します。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget_main_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="@dimen/widget_margin"
android:padding="@dimen/widget_padding"
android:orientation="vertical"
android:background="@drawable/background_gradient">
....
</LinearLayout>
アプリケーション内でこのレイアウトを使用すると表示されますが、ウィジェットでは白い画面しか表示されません。私は何かが恋しいですか?RemoteViews内にxmlグラデーションを与えることはできませんか?