public class TimeZoneFilterTypeAdapter extends BaseAdapter implements Filterable, View.OnClickListener
Modifier and Type | Class and Description |
---|---|
static interface |
TimeZoneFilterTypeAdapter.OnSetFilterListener |
Modifier and Type | Field and Description |
---|---|
static int |
FILTER_TYPE_COUNTRY |
static int |
FILTER_TYPE_EMPTY |
static int |
FILTER_TYPE_GMT |
static int |
FILTER_TYPE_NONE |
static int |
FILTER_TYPE_STATE |
static String |
TAG |
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Constructor and Description |
---|
TimeZoneFilterTypeAdapter(Context context,
TimeZoneData tzd,
TimeZoneFilterTypeAdapter.OnSetFilterListener l) |
Modifier and Type | Method and Description |
---|---|
int |
getCount()
How many items are in the data set represented by this Adapter.
|
Filter |
getFilter()
Returns a filter that can be used to constrain data with a filtering
pattern.
|
com.android.timezonepicker.TimeZoneFilterTypeAdapter.FilterTypeResult |
getItem(int position)
Get the data item associated with the specified position in the data set.
|
long |
getItemId(int position)
Get the row id associated with the specified position in the list.
|
View |
getView(int position,
View convertView,
ViewGroup parent)
Get a View that displays the data at the specified position in the data set.
|
void |
onClick(View v)
Called when a view has been clicked.
|
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
public static final String TAG
public static final int FILTER_TYPE_EMPTY
public static final int FILTER_TYPE_NONE
public static final int FILTER_TYPE_COUNTRY
public static final int FILTER_TYPE_STATE
public static final int FILTER_TYPE_GMT
public TimeZoneFilterTypeAdapter(Context context, TimeZoneData tzd, TimeZoneFilterTypeAdapter.OnSetFilterListener l)
public int getCount()
Adapter
public com.android.timezonepicker.TimeZoneFilterTypeAdapter.FilterTypeResult getItem(int position)
Adapter
public long getItemId(int position)
Adapter
public View getView(int position, View convertView, ViewGroup parent)
Adapter
LayoutInflater.inflate(int, android.view.ViewGroup, boolean)
to specify a root view and to prevent attachment to the root.getView
in interface Adapter
position
- The position of the item within the adapter's data set of the item whose view
we want.convertView
- The old view to reuse, if possible. Note: You should check that this view
is non-null and of an appropriate type before using. If it is not possible to convert
this view to display the correct data, this method can create a new view.
Heterogeneous lists can specify their number of view types, so that this View is
always of the right type (see Adapter.getViewTypeCount()
and
Adapter.getItemViewType(int)
).parent
- The parent that this view will eventually be attached topublic void onClick(View v)
View.OnClickListener
onClick
in interface View.OnClickListener
v
- The view that was clicked.public Filter getFilter()
Filterable
Returns a filter that can be used to constrain data with a filtering pattern.
This method is usually implemented by Adapter
classes.
getFilter
in interface Filterable