I need relative layout background with some transparent for that i used gradient option, But it is affecting text view color also , I gave color of text view is white color but it looks like gray color. Please help me to get out of this issue.
<RelativeLayout
android:id="@+id/topLayout1"
android:layout_width="match_parent"
android:layout_height="210dp"
android:layout_alignParentTop="true"
android:foreground="@drawable/image_overlay"
>
<RelativeLayout
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/preloader_image"
>
<TextView
android:id="@+id/resName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="100dp"
android:text="Green Way"
android:textColor="@color/White"
android:textSize="25sp"
android:backgroundTint="@color/White"
/>
<TextView
android:id="@+id/desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/resName"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:text="@string/items"
android:textColor="@color/White"
android:textSize="16sp"
/>
</RelativeLayout>
</RelativeLayout>
and image overlay code,
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#B0000000"
android:centerColor="#A0000000"
android:endColor="#00FFFFFF"
android:angle="270"
/>
</shape>
<color name="White">#FFFFFF</color>