Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eventListAdapter = new SimpleCursorAdapter(this,
- R.layout.event_list_item,
- null,
- new String[]{OVirtContract.Event.TIME, OVirtContract.Event.DESCRIPTION},
- new int[]{R.id.event_timestamp, R.id.event_description}, 0);
- panelEvents.setAdapter(eventListAdapter);
- cursorAdapterLoader = new CursorAdapterLoader(eventListAdapter) {
- @Override
- public synchronized Loader<Cursor> onCreateLoader(int id, Bundle args) {
- final ProviderFacade.QueryBuilder<Event> query = provider.query(Event.class);
- if (lastHost != null){
- query.where(HOST_ID, lastHost.getId());
- }
- return query.orderByDescending(ID).limit(20).asLoader();
- }
- };
- getLoaderManager().initLoader(0, null, cursorAdapterLoader);
- Error:(165, 27) error: method initLoader in class LoaderManager cannot be applied to given types;
- required: int,Bundle,LoaderCallbacks<D>
- found: int,<null>,CursorAdapterLoader
- reason: cannot infer type-variable(s) D
- (argument mismatch; CursorAdapterLoader cannot be converted to LoaderCallbacks<D>)
- where D is a type-variable:
- D extends Object declared in method <D>initLoader(int,Bundle,LoaderCallbacks<D>)
Advertisement
Add Comment
Please, Sign In to add comment