I want show a ListView
that will contain a list of cities.When the user click of the edit text.I want to open a dialog in that i want to show a ListView
.As the user select the city i want to set that as the value of the edit text.And after selecting the value from the edit if the user again touches the edit again i want to open the dialog and focus will be on the previous value that the user have selected .How can we do this please help me i am new in android.
This is my activity file XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Select City"
android:ems="10" >
<requestFocus />
</EditText>
</LinearLayout>