help with listview and R.layout.main (Android)

前端 未结 2 1579
难免孤独
难免孤独 2021-01-29 04:28

im quite new to android, so i apologise if this is a noob-ish question (:

i designed my list following the example found here: http://android-er.blogspot.com/2010/06/cus

2条回答
  •  误落风尘
    2021-01-29 04:47

    You just edit your main.xml to look whatever you want it to look, eg:

    
    
      
      
      
    

    Change your activity to extend only Activity, not ListActivity. Finally, in your activity you can then fetch your list view with:

    ListView list = (ListView) findViewById(R.id.listview);
    

    and do whatever you need to do with the list.

提交回复
热议问题