I'm using scrollable static cards as an item selector (scroll through until you find one, then use the onItemSelected event to catch the click). It works, but it doesn't show the scroll bar on the bottom like it does for menu items and all standard system cards. Is there a way to enable it?
Here's the adapter code:
private class FooCardScrollAdapter extends CardScrollAdapter {
@Override
public int findIdPosition(Object id) {
return -1;
}
@Override
public int findItemPosition(Object item) {
return mCards.indexOf(item);
}
@Override
public int getCount() {
return mCards.size();
}
@Override
public Object getItem(int position) {
return mCards.get(position);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return mCards.get(position).toView();
}
}
This is a known issue; there is no way to currently get the scroll indicator on a GDK CardScrollView
. Please follow issue 256 on our issue tracker to be updated as the GDK evolves!