title: Displaying score from sql android using textview
body: <p>Ok so im trying to make highscore for my app, and i am not sure how to make strings that contain date, score and name(they are already in sql, now i need to pull them out) appear in textview</p>
  
  <pre><code>    public String[] getAllScores(){
  
          String selectQuery = "SELECT  * FROM " + TABLE_SCORE + "LIMIT 10";
  
  
  
          SQLiteDatabase hs = this.getWritableDatabase();
          Cursor cursor = hs.rawQuery(selectQuery, null);
  
          int i = 0;
  
          String[] data = new String[cursor.getCount()];
  
          while (cursor.moveToNext()) {
  
              data[i] = cursor.getString(1);
  
              i = i++;
  
          }
          cursor.close();
          hs.close();
          // return score array
          return data;
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Activity to display score</p>
  
  <pre><code>Highscore hs=new Highscore(this);
       hs.addScore(name, currentDTS, scukupno);
       hs.getAllScores();
       TextView score1=(TextView) findViewById(R.id.Rezultat);
       score1.setText( What to write here???? );
  </code></pre>