开发者

Adding a textView

开发者 https://www.devze.com 2023-02-17 17:19 出处:网络
Just started with android development, I decided to work the api demos, trying to add little features, modifying them, etc.

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);
0

精彩评论

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