Android, Programming

How to implement custom xml attributes to a custom component, part 2 and final

If you haven't read part 1, I advise you to do so before you continue. Click here. Now, our BlinkerTextView is working nicely. This time we want to be able to set blinkRate and startBlinking from xml. We need to tell android about these custom attributes. We do so by placing a file named "attrs.xml"… Continue reading How to implement custom xml attributes to a custom component, part 2 and final

Android, Programming

How to implement custom xml attributes to a custom component, part 1

Well. Android API comes with predefined components (views and layouts) that we can use. With attributes that can be set from XML. These are android attributes. android:layout_width="200dip" But most of these predefined components are single. We may have a desire of having one composite component, the one that combines 2 or more components. For that… Continue reading How to implement custom xml attributes to a custom component, part 1