On Sep 14, 6:50 am, Jhew SAN <[email protected]> wrote:
> listViewInfo.setOnItemClickListener(new OnItemClickListener() {
>
> @Override
> public void onItemClick(AdapterView<?> a, View v,
> final int position, long id) {
> // TODO Auto-generated method stub
> AlertDialog.Builder adb = new AlertDialog.Builder(
> EditCity.this);
> adb.setTitle("Delete?");
> adb.setMessage("Are you sure you want to delete ");
> // final int positionToRemove = position;
> adb.setNegativeButton("Cancel", null);
> adb.setPositiveButton("Ok",
> new AlertDialog.OnClickListener() {
> @Override
> public void onClick(DialogInterface dialog,
> int which) {
> // TODO Auto-generated method stub
> try
> {
> weatherlist.remove(position);
> listViewInfo.setAdapter(tempListAdapter);
> System.out.println(position);
> WriteIntoXML(weatherlist);}catch(Exception e)
>
> {
> //
>
> }
> }
>
> private void WriteIntoXML(ArrayList<HashMap<String, String>> weatherlist) {
> // TODO Auto-generated method stub
> System.out.println(weatherlist);
> // addListCity();
>
>
>
> }
> });
> adb.show();
> }
> });
> }
> }

hey dude, you seem to post the same piece of code over again and again
- i've seen it at least three times or more.

what exactly is your problem?

pskink

-- 
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

Reply via email to