inner shadow on Android TextView

alxscms picture alxscms · Nov 1, 2011 · Viewed 11.1k times · Source

is it possible to put an inner shadow on the text of a TextView in Android like this one :

http://i.stack.imgur.com/88Mxd.png

Thanks !

Answer

ABentSpoon picture ABentSpoon · Apr 24, 2012

MagicTextView will do inner shadows.

enter image description here

    <com.qwerjk.better_text.MagicTextView
        xmlns:qwerjk="http://schemas.android.com/apk/res/com.qwerjk.better_text"
        android:textSize="42dp"
        android:textColor="#FFffff00"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textStyle="bold"
        android:padding="10dp"
        qwerjk:innerShadowDy="3"
        qwerjk:innerShadowColor="#FF000000"
        qwerjk:innerShadowRadius="5"
        android:text="InnerShadow" />

Note: I made this, and am posting more for the sake of future travelers than the OP. It's borderline spam, but being on-topic, perhaps acceptable?