2

How i can set inner shadow on right side in LinearLayout ?

Like below:

image
(source: part.lt)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
user1582087
  • 93
  • 1
  • 3
  • 10

2 Answers2

7

you can just use simple View with background which will be gradient.

this gradient could be a shape drawable eg

 <shape>
   <gradient android:startColor="#000000" android:endColor="#FFFFFF" android:angle="90"/>
 </shape>

you just need to set appropriate angle for your shadow.

fgeorgiew
  • 1,194
  • 2
  • 8
  • 25
0

create a drawable file and use the view as background.

<?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
        <gradient
            android:startColor="#72CA5C54"
            android:centerColor="#43F71803"
            android:endColor="#272525"
            android:angle="45"/>

    </shape>
Marium Jawed
  • 391
  • 4
  • 9