Tuesday, June 21, 2011

Set shadow of TextView in Java code, setShadowLayer()

Example:
        TextView textHello = (TextView)findViewById(R.id.hello);
textHello.setShadowLayer(
5f, //float radius
10f, //float dx
10f, //float dy
0xFFffffff //int color
);




Related article:
- Place shadow behind text using XML

No comments:

Post a Comment