开发者

binding [row,col] value to a textView

this is my first Android App. and I have problems with choosing the bes开发者_运维技巧t Adapter for my application I have table like the one drawn, I would like to bind specified rows of VALUE column to TextView my Question is : 1- how can I bind [row 1,col 3] to textView


_ID | NODE | Value


1 |link |google.com


2 | description |search

 MyDataBase mDB = new MyDataBase(this);
    Cursor cursor = mDB.all(this);

    String[] from = new String[] {mDB.VALUE};
    int[] to = new int[] {R.id.text1View1};

    SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.main, cursor, from,to );


you can use "view.setTag(Object)" , in your case the view is textview and the object will be a struct probably with row and column information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜