On Sat, Jun 4, 2016 at 6:35 PM, <abeer.sh...@gmail.com> wrote:

> What i need to do is add button to the main activity layout when i press
> on button get to me list of restaurant item by item
> from json file and display it in list view but not display all restaurants
> in one click but show item by item
> every click get restaurant
> suppose i have 3 restaurant in json file
> when i click on button for first click get me first restaurant
> when i click on button for second click get me second restaurant
> when i click on button for third click get me third restaurant
> How to customize this code to accept get item by item restaurant from json
> file
>

When you parse you JSON save the items in a separate array and don't add to
the list adapter.
On press of your button, remove the next item from the array cache and add
to the adapter.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScggiLk1WOMsdpeXmuBdOytn8bUNFYkvT2EXNJpoLQnCEdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to