-1

My textview -

TextView doses = (TextView) findViewById(R.id.doses);

int getting code -

int nIndex = cursor.getColumnIndexOrThrow(DictionaryDatabase.KEY_DOSES);

What I want is add some pre defined TEXT like "DOSE:" before nIndex. My expected result will be like-

doses.setText(cursor.getString("DOSE"+nIndex));

How to do that??

Zils
  • 403
  • 2
  • 4
  • 19

1 Answers1

2

Just use this:

doses.setText("DOSE" + cursor.getString(nIndex));
FD_
  • 12,888
  • 4
  • 33
  • 62