0

Possible Duplicate:
Android, sqlite,spinner :)

Hi guys,

I want to use 2 spinners and one edittext in my Android project.

The first spinner includes "Countries" The second spinner includes "Cities" but it should be affected by first spinner selection.

Then if i choose any countries from second spinner i want to give some information in "editext"

How i can do it? I know I have to use SQLite and create a table, but I know the logical things but I couldn't write the code on Eclipse..

Community
  • 1
  • 1

1 Answers1

0

Take two Spinner say countrySpinner and citySpinner. bind your countrySpinner from DB. and use OnItemSelectedListener to bind the citySpinner from DB according to selected country. then OnItemSelectedListener for citySpinner set data in EditText. Here are the tutorial for Using SQLite DB in Android

Android SQLite Database - Tutorial

Android SQLite Basics

Adil Soomro
  • 37,609
  • 9
  • 103
  • 153