0

I have created a view called RoundedImageView, the corners are rounded. I want an attribute called cornerRadius that lets me (from the XML) specify the radius. How in the Java code where I have

public class RoundedImageView extends ImageView 

can I actually look for the attribute "cornerRadius" that was specified in the XML?

hunterp
  • 15,716
  • 18
  • 63
  • 115

1 Answers1

0

Here's a link to an example. link

Search for "custom attributes android" for more examples.

Also follow this thread How to retrieve XML attribute for custom control

Community
  • 1
  • 1
Kumar Bibek
  • 9,016
  • 2
  • 39
  • 68