I would like to create a textview with stroke along with shadow as shown in the image, Can anyone please help me solving this issue.
Asked
Active
Viewed 1,106 times
-1

Parthiban M
- 1,104
- 1
- 10
- 30
1 Answers
0
Try with something like this:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item android:right="5dp" android:top="5dp">
<shape>
<corners android:radius="3dp" />
<solid android:color="#8f0222" />
</shape>
</item>
<item android:bottom="2dp" android:left="2dp">
<shape>
<gradient android:angle="270"
android:endColor="#E2E2E2"
android:startColor="#BABABA" />
<stroke android:width="1dp" android:color="#111111" />
<corners android:radius="4dp" />
<padding android:bottom="10dp" android:left="10dp"
android:right="10dp" android:top="10dp" />
</shape>
</item>
</layer-list>
</item>
</selector>
or some of the suggestions in this SO question: Add shadow to custom shape on Android

Community
- 1
- 1

Gabriella Angelova
- 2,985
- 1
- 17
- 30