how to get data from online database in recyclerview on an item selected of searchable spinner

  • Thread starter Android Central Question
  • Start date
A

Android Central Question

I am making an online food ordering app in which first page i.e. CityActivity I getting the city and area name from online database and passing only areaname to MainActivity through Shared preference in a textbox. Now according to the area I have fetched I need to get only that area restaurants data from online database in recyclerview in android studio.

In databse ,in restro_tbl I have added restroid,restroname,cityid,areaid(foreign key as i have made city and area separate tables),restrodiscount,restrodescription,restroimg
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
26
0
Visit site
I'm not an Android developer, but if the database uses SQL, it would be a select statement ending in where restroid = <whatever the id of the restaurant is - without the brackets>; You can select individual fields or * for all fields.
 

Robert son

New member
Dec 1, 2017
1
0
0
Visit site
In Android, Spinner is like a dropdown list. It displays a list of items. One of its items can be selected at a time. You can use an array or an ArrayList object that contains items as its data source. Typically the array or ArrayList object is not directly set to the Spinner.
 

Trending Posts

Forum statistics

Threads
943,122
Messages
6,917,374
Members
3,158,833
Latest member
asha_kanta_sharma