use of android.widget.BaseAdapter in project KeepScore by nolanlawson.
the class CustomFastScrollView method getSections.
private void getSections() {
Adapter adapter = mList.getAdapter();
if (adapter instanceof HeaderViewListAdapter) {
mListOffset = ((HeaderViewListAdapter) adapter).getHeadersCount();
adapter = ((HeaderViewListAdapter) adapter).getWrappedAdapter();
}
if (adapter instanceof SectionIndexer) {
mListAdapter = (BaseAdapter) adapter;
mSections = ((SectionIndexer) mListAdapter).getSections();
}
}
use of android.widget.BaseAdapter in project SuperSaiyanScrollView by nolanlawson.
the class SuperSaiyanScrollView method getSections.
private void getSections() {
Adapter adapter = mList.getAdapter();
if (adapter instanceof HeaderViewListAdapter) {
mListOffset = ((HeaderViewListAdapter) adapter).getHeadersCount();
adapter = ((HeaderViewListAdapter) adapter).getWrappedAdapter();
}
if (adapter instanceof SectionIndexer) {
mListAdapter = (BaseAdapter) adapter;
mSections = ((SectionIndexer) mListAdapter).getSections();
}
}
use of android.widget.BaseAdapter in project android-flip by openaphid.
the class FlipTextViewActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this);
flipView.setAdapter(new BaseAdapter() {
@Override
public int getCount() {
return 10;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
NumberTextView view;
if (convertView == null) {
final Context context = parent.getContext();
view = new NumberTextView(context, position);
view.setTextSize(context.getResources().getDimension(R.dimen.textSize));
} else {
view = (NumberTextView) convertView;
view.setNumber(position);
}
return view;
}
});
setContentView(flipView);
}
use of android.widget.BaseAdapter in project android-flip by openaphid.
the class FlipTextViewXmlActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
setContentView(R.layout.xml_layout);
flipView = (FlipViewController) findViewById(R.id.flipView);
flipView.setAdapter(new BaseAdapter() {
@Override
public int getCount() {
return 10;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
NumberTextView view;
if (convertView == null) {
final Context context = parent.getContext();
view = new NumberTextView(context, position);
view.setTextSize(context.getResources().getDimension(R.dimen.textSize));
} else {
view = (NumberTextView) convertView;
view.setNumber(position);
}
return view;
}
});
}
use of android.widget.BaseAdapter in project bee by orhanobut.
the class UiHandler method initSettingsContent.
void initSettingsContent(List<MethodInfo> list) {
BaseAdapter adapter = SettingsAdapter.newInstance(context, list);
listView.setAdapter(adapter);
}
Aggregations