04-09-2011 12:36 AM
hi, i want to create an application that displays a detailed information about something. for example like the profile of the users. my application will read an xml response from the server that includes the list of names of the users. How to create a list of buttons using the names and then each button which shows the name that can be pressed and displayed the detailed information about the name ? i think it is similar to BBM app which shows a list of the user's contact. thanks a lot
Solved! Go to Solution.
04-09-2011 03:37 AM
Create an Array of ButtonField like:
ButtonField[ ] users_buttons=new ButtonField[number of Users];
Initialize dem uasing:
for(int i=0;i<no.ofusers;i++)
users_buttons[i]=new ButtonField("user no.",Field.FIELD_HCENTER|ButtonField.CONSUME_CLICK
Make dem Clickable using setchangeListener method of buttonField and Ooveride Navigation click to do some operatoin on clicking specific Button!!
04-11-2011 05:21 AM
thanks mate, your idea is very helpful.
04-11-2011 07:00 AM
What kiran told thats exactly right. If you want to place the button in horizontally or vertically then you have to use some managers. And when you click each button you can push one screen to see every users profile or something like that. This you can do using fieldChanged() method.