dynamically generate links .........

Put your problem here if it does not fit any of the other categories.

dynamically generate links .........

Postby abhilash » Thu Feb 28, 2008 12:03 pm

hi i am getting some list of user ids from my database and displaying on emulator ...............
likethis ..........
india
usa
germany....etc..........
now i want them to be hyperlinked how can i do in android can you pls say...............loke that everycountry should have a hyper link............ now currently i am displaying only 4 countries it might increase to 50 also..... so how generate it.......
abhilash
Developer
Developer
 
Posts: 26
Joined: Fri Feb 22, 2008 11:21 am
Location: HYDERABAD

Top

Postby plusminus » Thu Feb 28, 2008 12:35 pm

Hello abhilash,......

Use an AdapterView (like GridView) and set an OnItemClickListener to it.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Can you Give an Example for Dynamically generating AdapterVi

Postby abhilash » Thu Feb 28, 2008 1:21 pm

hi
hoiw to generate AdapterView Dynamically...............
pls give example.....
abhilash
Developer
Developer
 
Posts: 26
Joined: Fri Feb 22, 2008 11:21 am
Location: HYDERABAD

Postby plusminus » Thu Feb 28, 2008 2:26 pm

Hello abhilash,

AdapterViews are not generated dynamically, but can be filled dynamically.

something similar to this should work (in your adapter):
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 public void addItem(Object o){
  2.  
  3.                         this.arrayListOfItems.add(o);
  4.  
  5.                         this.notifyDataSetChanged();
  6.  
  7.                 }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


(untested)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

didnt get

Postby abhilash » Fri Feb 29, 2008 5:40 am

hi plus minus ...........
i couldn't get you can you post simple example.........
abhilash
Developer
Developer
 
Posts: 26
Joined: Fri Feb 22, 2008 11:21 am
Location: HYDERABAD

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests