Im using a SpinnerAdapter to display a Spinner. For that i defined a class which implements SpinnerAdapter. Unfortunately I don’t know how to override some methods of SpinnerAdapter:
@Override
public View getDropDownView(int position, View arg1, ViewGroup arg2) {
}
@Override
public int getItemViewType(int arg0) {
}
@Override
public boolean hasStableIds() {
}
@Override
public void registerDataSetObserver(DataSetObserver arg0) {
}
@Override
public void unregisterDataSetObserver(DataSetObserver observer) {
}
Does anybody know what i have to code in each of these methods?
Thanks for the answers, but nevertheless I want to share with you the solution I used after searching more references:
Instead that just implementing SpinnerAdapter in my Adapter, I extend BaseAdapter and implement SpinnerAdapter:
Then it isn’t necessary to override all this strange methods such as isEmpty(), registerDataObserver(), etc.
And if necessry one can still override getDropDownView(…)
Additionally using this solution, one can call adapter.notifyDatasetChanged() which isn’t as easy if the adapter just implements SpinnerAdapter and doesn’t extend BaseAdapter.