FileDocCategorySizeDatePackage
ZonePicker.javaAPI DocAndroid 1.5 API2244Wed May 06 22:42:48 BST 2009com.android.settings

ZonePicker

public class ZonePicker extends android.app.ListActivity

Fields Summary
private android.widget.ArrayAdapter
mFilterAdapter
Constructors Summary
Methods Summary
protected voidaddItem(java.util.List data, java.lang.String name, java.lang.String zone)

        HashMap temp = new HashMap();
        temp.put("title", name);
        temp.put("zone", zone);
        data.add(temp);
    
protected voidonActivityResult(int requestCode, int resultCode, android.content.Intent data)

        // If subactivity has resulted in a timezone selection, close this act.
        if (resultCode == RESULT_OK) {
            finish();
        }
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);
        mFilterAdapter = ArrayAdapter.createFromResource(this,
                R.array.timezone_filters, android.R.layout.simple_list_item_1);
        setListAdapter(mFilterAdapter);
    
protected voidonListItemClick(android.widget.ListView l, android.view.View v, int position, long id)

        String filter = (String) mFilterAdapter.getItem(position);
        // If All is chosen, reset the filter
        if (filter.equals("All")) {
            filter = null;
        }
        Intent zoneList = new Intent();
        zoneList.setClass(this, ZoneList.class);
        zoneList.putExtra("filter", filter);
        
        startActivityForResult(zoneList, 0);