Newbie needs good practice info

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Newbie needs good practice info

Postby galaad1982 » Tue Aug 18, 2009 7:18 am

Hi guys,

As a newbie on this forum and on Android, I'd like to have some advices and help on the development of a first simple application.

My goal is to display in 4 different ways a list of items stored in a local xml data file.

So there would be a tab at the bottom of the screen with 4 buttons:
- 1 for alphabetical sorting list
- 1 for image grid view
- 1 for whole image page
- 1 for the display of all the information I got on the item.
I could slide the screen from left to right and right to left to pass from an item to another

Nothing that seems too difficult but I already experience problems structuring my app.

1. Should I have 4 activities (one for each view)
2. How do I read from a local xml file and iterate through each item
3. What layout object is the most appropriate to have this button bar at the bottom of my screen

Thanks a lot for your help
galaad1982
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Aug 18, 2009 7:08 am

Top

Postby tinyang » Sun Aug 23, 2009 2:25 pm

Hello. I am also pretty new to Android, but I do have some thoughts about what you are trying to accomplish. You don't say specifically what the items are that you want to display, but I get the feeling they might be images (since you mention image grid view and whole image page). If the items are images, you will not be reading them from an xml file, but you would be getting them from elsewhere like the sdcard or the res/drawable folder.

If you are wanting to use an array from an xml file, follow the example here: example

I would also suggest that you could just have the one view for your one activity that has a menu or spinner with options for each different view layout that the user could pick from the menu or spinner. Using one of those widgets instead of buttons would leave the screen much less cluttered, especially considering the limited space it allows to begin with. Hope this helps.
--
Moderation is the key to happiness and harmony in one's life.
User avatar
tinyang
Freshman
Freshman
 
Posts: 6
Joined: Sat Jan 03, 2009 4:50 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests