I create a list of databases, while trying to find a TextView
in another Layout
(item.xml), to insert text into it. Why is TextView
running empty?
protected void insertElementOfListFromBase(){ View itemLayout = View.inflate(this, R.layout.item, null); // TextView money_unit = (TextView) itemLayout.findViewById(R.id.money_unit); money_unit.setText("usd"); String[] from = new String[] { SCHETCHIK, STIOMOST }; int[] to = new int[] { R.id.number, R.id.printStoimost }; scAdapter = new SimpleCursorAdapter(this, R.layout.item, cursor, from, to); Spisok = (ListView) findViewById(R.id.spisok); Spisok.setAdapter(scAdapter); }
itemLayout
into View?View itemLayout = (View) View.inflate(this, R.layout.item, null);
- ikerya