What are the differences between extending Activity and extending ListActivity?

前端 未结 4 1728
眼角桃花
眼角桃花 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:24

    Also, in a regular Activity you can use the code below in onCreate to hide the app titlebar. It seems that you can't do the same in a ListActivity. (learned this the hard way)

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_list);
    // The rest of the content of onCreate
    

提交回复
热议问题