So i am trying to add TextView's into my main ListView within JAVA, And i am encountering some problems...
instead of giving me the Value of the TextView, all i get is some random rubbish like:
android.Widget.TextView@somerandomnumbersandtext
I am adding the textview like this:
adapter=new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, listItems);
setListAdapter(adapter);
TextView tv = new TextView(SpellCast.this);
TextView tvC = new TextView(SpellCast.this);
tv.setText(name[i]);
tvC.setText(Integer.toString(current[i]));
tvC.setId(i);
tv.setGravity(Gravity.LEFT);
tvC.setGravity(Gravity.RIGHT);
listItems.add(tv + "");
adapter.notifyDataSetChanged();
Why isn't this working??
thanks :)