Adding a textView
Just started with android development, I decided to work the api demos, trying to add little features, modifying them, etc.
I'm currently on List8 and I want to add a textView to it, like a little desc开发者_开发百科ription of the photos on each ListView row. So, how do I do that keeping the main.xml layout, I tried "drawing" a TextView object in public View getView()
But they won't show up.
ListView view = (ListView) findViewById(R.id.listview);
TextView textView = new TextView(this);
textView.setText("test");
view.addView(textView);
精彩评论