What are the differences between extending Activity and extending ListActivity?

前端 未结 4 1742
眼角桃花
眼角桃花 2021-02-14 03:47

I am using a class which extends Activity to obtain a list from an API...

In some apps which do basically the same, the devs extended ListActivity...

Which are t

4条回答
  •  无人共我
    2021-02-14 04:16

    Extending from the ListActivity you agree with the contract that in the layout of your activity a ListView component will be available.

    Your ListView component should have the id: @android:id/list

    The ListView class provides convenient methods for working and manipulating the ListView

提交回复
热议问题