위젯에 그라데이션 배경을 지정하고 싶습니다. 이를 위해, 나는 그라데이션을 위해 다음과 같은 XML을 사용 :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>
내 응용 프로그램 내에서이 레이아웃을 사용하는 경우가 나타납니다,하지만 내 위젯 I에 흰색 화면 만 가져옵니다. 내가 놓친 게 있니? RemoteViews에서 xml 그라디언트를 제공 할 수 있습니까?
를 그냥 청소 수 및 작동해야 확인 : – Sumant
어, 당신 말이 맞아 다음 프로젝트를 빌드 및 다음 프로젝트 &을 구축 할 수 있습니다. "당신이 나를 깨끗이하기 전까지는 내가 원하는 것을합니다." 답변으로 올리면 받아 들일 것입니다 –
답변을 게시했습니다 .. – Sumant