我的textview -
TextView doses = (TextView) findViewById(R.id.doses);
获取代码 -
int nIndex = cursor.getColumnIndexOrThrow(DictionaryDatabase.KEY_DOSES);
我想要的是在nIndex
之前添加一些预定义的TEXT,如“ DOSE:”。
我的预期结果将是 -
doses.setText(cursor.getString("DOSE"+nIndex));
怎么做?
答案 0 :(得分:2)
请使用:
doses.setText("DOSE" + cursor.getString(nIndex));