Passing custom variables via XML resource files

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Passing custom variables via XML resource files

Postby biosopher » Sat May 03, 2008 12:10 am

As I'm a strong proponent of object-oriented programming (and since Android is hip on abstracting all UI information to the XML resources files) , I wanted to pass on a new tutorial to the community here

I just extended a prior tutorial where I had made a custom View class so it now passes custom attributes from the resource XML file to the Class's constructor.

In this case I am passing additional text colors and images to a Button extension, but the logic works everywhere. If you don't know what I'm talking about then check out this tutorial. I had been looking for this solution since about day 5 of my Android coding, so I'm now happy to have this new skill under my belt.

Passing custom attributes tutorial (via XML resource files)

Cheers,
Anthony
biosopher
Developer
Developer
 
Posts: 26
Joined: Sat Mar 15, 2008 8:14 pm
Location: San Francisco, California

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests