0

If you notice at the top of the View. There is a light gradient.

How should I go about creating this ?

e.g.

  • Insert a view with a gradient background ?
  • Use a top border of sorts ?

Any help would be great !

enter image description here

Prakash Raman
  • 13,319
  • 27
  • 82
  • 132
  • add an imageview that is a 9 patch image of that gradient (just a rectangle) and set the width to match parent. As long as you make the right side a stretchable patch it should do just this sort of gradient properly. That's the easiest way I think to do it – Lucas Crawford Oct 09 '15 at 18:42

1 Answers1

1

create gradient.xml in /res/drawable:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient
        android:startColor="#FFFFFF"
        android:endColor="#00000000"
        android:angle="45"/>    
</shape>
Mike
  • 4,550
  • 4
  • 33
  • 47
Hardik Chauhan
  • 2,750
  • 15
  • 30