Andy Andy - 3 years ago 213
Android Question

How to access getLoaderManager() inside a setOnItemClickListener() overriding an onItemClick()?

So I am stuck on how to access my getLoadManager from within that scope. All I really want to do is refresh the cursor since the LoaderManager is already created before it reaches that point, but I don't really now how to accomplish that besides calling getLoaderManager(). Problem is I can't in that scope. Any ideas? thanks in advance.

calendar.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
/*Stuff thats not really important to show*/

}
});

Answer Source

You can use,

ActivityName.this.getLoaderManager();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download