FileDocCategorySizeDatePackage
TimeZonePickerDialog.javaAPI DocAndroid 5.1 API4236Thu Mar 12 22:22:54 GMT 2015com.android.timezonepicker

TimeZonePickerDialog

public class TimeZonePickerDialog extends android.app.DialogFragment implements TimeZonePickerView.OnTimeZoneSetListener

Fields Summary
public static final String
TAG
public static final String
BUNDLE_START_TIME_MILLIS
public static final String
BUNDLE_TIME_ZONE
private static final String
KEY_HAS_RESULTS
private static final String
KEY_LAST_FILTER_STRING
private static final String
KEY_LAST_FILTER_TYPE
private static final String
KEY_LAST_FILTER_TIME
private static final String
KEY_HIDE_FILTER_SEARCH
private OnTimeZoneSetListener
mTimeZoneSetListener
private TimeZonePickerView
mView
private boolean
mHasCachedResults
Constructors Summary
public TimeZonePickerDialog()

        super();
    
Methods Summary
public android.app.DialogonCreateDialog(android.os.Bundle savedInstanceState)

        Dialog dialog = super.onCreateDialog(savedInstanceState);
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
        return dialog;
    
public android.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)

        long timeMillis = 0;
        String timeZone = null;
        Bundle b = getArguments();
        if (b != null) {
            timeMillis = b.getLong(BUNDLE_START_TIME_MILLIS);
            timeZone = b.getString(BUNDLE_TIME_ZONE);
        }
        boolean hideFilterSearch = false;

        if (savedInstanceState != null) {
            hideFilterSearch = savedInstanceState.getBoolean(KEY_HIDE_FILTER_SEARCH);
        }
        mView = new TimeZonePickerView(getActivity(), null, timeZone, timeMillis, this,
                hideFilterSearch);
        if (savedInstanceState != null && savedInstanceState.getBoolean(KEY_HAS_RESULTS, false)) {
            mView.showFilterResults(savedInstanceState.getInt(KEY_LAST_FILTER_TYPE),
                                    savedInstanceState.getString(KEY_LAST_FILTER_STRING),
                                    savedInstanceState.getInt(KEY_LAST_FILTER_TIME));
        }
        return mView;
    
public voidonSaveInstanceState(android.os.Bundle outState)

        super.onSaveInstanceState(outState);
        outState.putBoolean(KEY_HAS_RESULTS, mView != null && mView.hasResults());
        if (mView != null) {
            outState.putInt(KEY_LAST_FILTER_TYPE, mView.getLastFilterType());
            outState.putString(KEY_LAST_FILTER_STRING, mView.getLastFilterString());
            outState.putInt(KEY_LAST_FILTER_TIME, mView.getLastFilterTime());
            outState.putBoolean(KEY_HIDE_FILTER_SEARCH, mView.getHideFilterSearchOnStart());
        }
    
public voidonTimeZoneSet(TimeZoneInfo tzi)

        if (mTimeZoneSetListener != null) {
            mTimeZoneSetListener.onTimeZoneSet(tzi);
        }
        dismiss();
    
public voidsetOnTimeZoneSetListener(com.android.timezonepicker.TimeZonePickerDialog$OnTimeZoneSetListener l)


       
          
    

        
        mTimeZoneSetListener = l;