To split a string, use String.split(): http://developer.android.com/reference/java/lang/String.html#split(java.lang.String)
For the ListView, use an ArrayAdapter that maps an array of items to be displayed in a a list. Each item can be of a class you define that contains the name and id. Tell the ListView to display each row with the name only. There are tutorials that describe how to do this. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Oct 12, 4:43 am, ragavendran s <[email protected]> wrote: > Can anybody tell pls..... > I m new to android..... > > Here is my question: > > example: > |4|2|raghav|4|Roshan|5|raghul|6|sachin > > Wat i need means i want to separate this by string tokenizer("|") and store > it into separate values....the first number "4"indicates i need 4 list itms > should display with name specified above ....the second indicates "2"are > unique id for each member like"2"for raghav ,"4" for Roshan and "5"for > raghul and "6" for Sachin.... > > How i can display certain listitem based upon number indicating in first > (i.e)"4" above given example... > > when i display list it should consists only name not the unique id....if i > click the name the particular unique id should display...... > > Pls its urgent.... > > Thanks in anvance.... > Raghav.S --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

