Android - Dynamically Add Views into View

后端 未结 5 2115
情书的邮戳
情书的邮戳 2020-11-22 03:58

I have a layout for a view -



        
5条回答
  •  星月不相逢
    2020-11-22 04:25

    It looks like what you really want a ListView with a custom adapter to inflate the specified layout. Using an ArrayAdapter and the method notifyDataSetChanged() you have full control of the Views generation and rendering.

    Take a look at these tutorials

    • http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/
    • http://developerlife.com/tutorials/?p=327
    • http://www.androidguys.com/2008/07/14/fancy-listviews-part-one/

提交回复
热议问题