Helpful Information
 
 
Category: Android Development
Create buttons dynamicly

Hi guys, im trying to make my first app on anadoird.

The application im trying to make is a application to view information on items from a game.
I want it to parse an xml-document and create one button for each item defined in there.

Just now i have one button for each type of equipment; weapon, armor, ability, ring, rest.
What I would like you help with is if you know a way to generate some buttons.
Im not sure if what i'm asking for is possible, but any help/direction will help :)

I'v cut out a little bit of the weapon-section


<items>
<weapons status="done">
<tier0>
<item name="Steel Dagger" type="dagger" damage="20-60 (40)" image="steeldagger" />
<item name="Short Bow" type="bow" damage="10-40 (25)" image="shortbow" />
<item name="Energy Staff" type="staff" damage="10-25 (17.5)" image="energystaff" />
<item name="Fire Wand" type="wand" damage="20-40 (30)" image="firewand" />
<item name="Short Sword" type="sword" damage="45-90 (67.5)" image="shortsword" />
</tier0>
<tier1>
<item name="Dirk" type="dagger" damage="20-70 (45)" image="dirk" />
<item name="Reinforced-Bow" type="bow" damage="15-45 (30)" image="forcedbow" />
<item name="Firebrand Staff" type="staff" damage="10-30 (20)" image="firestaff" />
<item name="Force Wand" type="wand" damage="30-50 (40)" image="forcewand" />
<item name="Broad Sword" type="sword" damage="60-105 (82.5)" image="broadsword" />
</tier1>
<tier2>
<item name="Blue Steel Dagger" type="dagger" damage="20-75 (47.5)" image="bluedagger" />
<item name="Crossbow" type="bow" damage="20-50 (35)" image="crossbow" />
<item name="Comet Staff" type="staff" damage="15-35 (25)" image="cometstaff" />
<item name="Power Wand" type="wand" damage="35-55 (45)" image="powerwand" />
<item name="Saber" type="sword" damage="75-105 (90)" image="sabersword" />
</tier2>
</weapons>
</items>

http://i.imgur.com/FDBYv.png

/MrYoda










privacy (GDPR)