title: ContentResolver$CursorWrapperInner cannot be cast
body: <p>My app uses a cursorloader to populate sqlite data into a ListView. Actually, the cursorloader should only populate one column (COLUNM_NAME_SITE) from the DB into the listview. </p>
  
  <p>The issue I have is.... once information is inserted in the db, a list item is created ( I can tell by the row lines shown every time data is inserted) but no text is shown in the listview the listview is basically blank. I believe this also makes the app crash once the list view item is clicked. </p>
  
  <p>The logcat is below but I do not understand how to decipher what it is saying. I have determined the issue may be in the area of line 98 [ loginBundle.putString("clickedWebSite",((LoginDetails) clickedObject).getsName());] but dont know how to correct issue.</p>
  
  <p>LOGCAT:</p>
  
  <pre><code>05-02 15:51:21.573: E/AndroidRuntime(965): FATAL EXCEPTION: main
  05-02 15:51:21.573: E/AndroidRuntime(965): java.lang.ClassCastException: android.content.ContentResolver$CursorWrapperInner cannot be cast to com.loginplus.home.LoginDetails
  05-02 15:51:21.573: E/AndroidRuntime(965):  at com.loginplus.home.LoginList.onItemClick(LoginList.java:98)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.widget.AdapterView.performItemClick(AdapterView.java:292)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.widget.AbsListView.performItemClick(AbsListView.java:1058)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.widget.AbsListView$PerformClick.run(AbsListView.java:2514)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.widget.AbsListView.onTouchEvent(AbsListView.java:3180)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.View.dispatchTouchEvent(View.java:5541)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1951)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1712)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1912)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1371)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.app.Activity.dispatchTouchEvent(Activity.java:2364)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1860)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.View.dispatchPointerEvent(View.java:5721)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2890)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2466)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:845)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2475)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.os.Handler.dispatchMessage(Handler.java:99)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.os.Looper.loop(Looper.java:137)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at android.app.ActivityThread.main(ActivityThread.java:4424)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at java.lang.reflect.Method.invokeNative(Native Method)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at java.lang.reflect.Method.invoke(Method.java:511)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  05-02 15:51:21.573: E/AndroidRuntime(965):  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>CursorLoader:</p>
  
  <pre><code>public class LoginList extends FragmentActivity implements AdapterView.OnItemClickListener, OnClickListener, LoaderManager.LoaderCallbacks&lt;Cursor&gt; {
  
  private ListView loginList;
  private Button webLogin;
  private SimpleCursorAdapter adapter;
  
  @Override 
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.login_listview);
  
  loginList = (ListView)findViewById(R.id.loginlist);
  loginList.setOnItemClickListener(this);
  
  webLogin = (Button)findViewById(R.id.button3);
  webLogin.setOnClickListener(this);
  
  //Specify fileds to display in the list
  String[] from = new String[] { ListProvider.COLUMN_NAME_SITE };
  
  //Bind fields to listview
  int[] to = new int[] {R.id.loginlist };
  
  // Create CursorAdapter and set it to display
  adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, null, from, to, 0 );
  
  loginList.setAdapter(adapter);
  
  getSupportLoaderManager().initLoader( 0, null, this);
  }
  
  
  @Override
  public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) {
  // TODO Auto-generated method stub
  Toast.makeText(getApplicationContext(), "Selected ID :" + arg2, Toast.LENGTH_SHORT).show();
  
  Intent updateDeleteLoginInfo = new Intent (this, UpdateDeleteLoginList.class);
  
  Cursor clickedObject = (Cursor)loginList.getItemAtPosition(0);
  
  Bundle loginBundle = new Bundle();
  loginBundle.putString("clickedWebSite",((LoginDetails) clickedObject).getsName());  //this is line 98
  loginBundle.putString("clickedWebAddress",((LoginDetails) clickedObject).getwUrl());
  loginBundle.putString("clickedUserName",((LoginDetails) clickedObject).getuName());
  loginBundle.putString("clickedPassWord",((LoginDetails) clickedObject).getpWord());
  loginBundle.putString("clickedNotes",((LoginDetails) clickedObject).getlNotes());
  
  updateDeleteLoginInfo.putExtras(loginBundle);
  
  startActivityForResult(updateDeleteLoginInfo, 0); 
  } 
  
  @Override
  public void onClick(View arg0) {
  // TODO Auto-generated method stub
  Intent webLoginIntent = new Intent (this, LoginPlusActivity.class);
  startActivity(webLoginIntent);
  }
  </code></pre>
  
  <p>loginDetail class:</p>
  
  <pre><code>public class LoginDetails {
  
  private int id;
  private String sName;
  private String wUrl;
  private String uName;
  private String pWord;
  private String lNotes;
  
  
  // getting ID
  public int getid(){
      return id;
      }
      // setting id
      public void setid(int id){
      this.id = id;
      }
  
  public String getsName() {
     return sName;
     }
     public void setsName(String sName) {
     this.sName = sName;
     }
  
  public String getwUrl() {
     return wUrl;
     }
     public void setwUrl(String wUrl) {
     this.wUrl = wUrl;
     }
  
  public String getuName() {
    return uName;
    }
    public void setuName(String uName) {
    this.uName = uName;
    }
  
  public String getpWord() {
    return pWord;
    }
    public void setpWord(String pWord) {
    this.pWord = pWord;
    }
  
  public String getlNotes() {
    return lNotes;
    }
    public void setlNotes(String lNotes) {
    this.lNotes = lNotes;
    }
  }
  </code></pre>