Create listview in fragment android

后端 未结 5 580
难免孤独
难免孤独 2020-12-05 07:24

As the title I want to create a listview with custom row in Fragment. My code below.

Fragment class

public class PhotosFragment extends Fragment{

pu         


        
5条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 07:53

    Please use ListFragment. Otherwise, it won't work.

    EDIT 1: Then you'll only need setListAdapter() and getListView().

提交回复
热议问题