ListView in android from 2 dynamic strings arrays -


i have 2 string arrays, here s1[] contains list of names , s2[] contains url's associated respective name, need populate listview, names , on clicking of names, want start intent browser handle url.

how do that?

use array adapter populate listview s1, , in click handler listview find url given list position, , fire off intent browser.

for example of using array adapter see api demos , in particular list1.

for example of setting activity onitemclicklistener see https://github.com/nikclayton/android-squeezer/blob/cache-server-data/src/com/danga/squeezer/albumslistactivity.java#l88 , https://github.com/nikclayton/android-squeezer/blob/cache-server-data/src/com/danga/squeezer/albumslistactivity.java#l288.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -