Erstellen Sie einen vertikalen Farbverlauf in Android

Ich soll zur Erstellung von vertikalen gradient separator in android

Ich bin able to create for horizontal separator aber in vertical gradient nothing appears

code für die horizontale

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
       <gradient       
                android:startColor="#DEDEDE"
                android:centerColor="#F52578"
                android:endColor=  "#DEDEDE"
      /> 
</shape>

dies ist, wie verwende ich in meinem Projekt

  <View 
            android:background="@drawable/divider_gradient"
            android:layout_width="fill_parent"
            android:layout_height="1.0px"

     />

versuchte ich layout_width="1dp" und layout_height="fill_parent" für
Trennsteg aber nichts angezeigt

Kommentar zu dem Problem
@Waqas die Frage, die Sie vorgeschlagen haben, ist für die durchgezogene Linie und das, was ich fordere, ist ein Farbverlauf Kommentarautor: Hunt

InformationsquelleAutor der Frage Hunt | 2012-03-03

Schreibe einen Kommentar