title: Android - Fetching string data from sqlite and change listview input with if condition
body: <p>I am fetching data from sqlite and displaying in a list view.  All the data in sqlite is stored as <code>String</code>.  For example,</p>
  
  <pre><code>ImageName   UploadStatus
  test1.jpg       1
  test2.jpg       2
  </code></pre>
  
  <p>I am using cursor to fetch the data as follows:</p>
  
  <pre><code>cursor = sqLiteDatabase.rawQuery("SELECT * from activityRes", null);
          ImageName_Array.clear();
          UploadStatus_Array.clear();
          if (cursor != null &amp;&amp; cursor.getCount() &gt; 0) {
              if (cursor.moveToFirst()) {
                  do {
                      ImageName_Array.add(cursor.getString(cursor.getColumnIndex("ImageName"))); 
                      UploadStatus_Array.add(cursor.getString(cursor.getColumnIndex("UploadStatus")));
  //                    if (cursor.getString(cursor.getColumnIndex("UploadStatus")) == "1") {
  //                        UploadStatus_Array.add("Y");
  //                    } else if (cursor.getString(cursor.getColumnIndex("UploadStatus")) == "2") {
  //                        UploadStatus_Array.add("N");
  //                    }
                  } while (cursor.moveToNext());
              }
          }
  </code></pre>
  
  <p>The UploadStatus_Array.add gets me the data and displays it as 1 and 2.  However, I want to change the display as <code>Y</code> and <code>N</code>.  I tried with the commented codes...but it is throwing the entire table out.</p>