Skip to content Skip to sidebar Skip to footer

The Last Element In The Row Browsefragment

I have a Fragment: public class FilmFragment extends BrowseFragment implements LoaderManager.LoaderCallbacks In BrowseFragment I add several rows with items: private

Solution 1:

You can get all the information you need out of the Row row, Object item, and the ArrayObjectAdapter on the Row that are handed back in the onItemSelected(...) event.

Something like:

finalListRowlistRow= (ListRow) row;
finalArrayObjectAdaptercurrentRowAdapter= listRow.getAdapter();
intselectedIndex= currentRowAdapter.indexOf(item);
if (selectedIndex != -1 && (currentRowAdapter.size() - 1) == selectedIndex ) {
    // The last item was selected
}

Post a Comment for "The Last Element In The Row Browsefragment"