TimeZonePickerDialogpublic 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.Dialog | onCreateDialog(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.View | onCreateView(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 void | onSaveInstanceState(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 void | onTimeZoneSet(TimeZoneInfo tzi)
if (mTimeZoneSetListener != null) {
mTimeZoneSetListener.onTimeZoneSet(tzi);
}
dismiss();
| public void | setOnTimeZoneSetListener(com.android.timezonepicker.TimeZonePickerDialog$OnTimeZoneSetListener l)
mTimeZoneSetListener = l;
|
|