ListFragment
open class ListFragment : Fragment
kotlin.Any | ||
↳ | androidx.fragment.app.Fragment | |
↳ | androidx.fragment.app.ListFragment |
Static library support version of the framework's android.app.ListFragment
. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.
Summary
Public constructors | |
---|---|
<init>() |
Public methods | |
---|---|
open ListAdapter? |
Get the ListAdapter associated with this fragment's ListView. |
open ListView |
Get the fragment's list view widget. |
open Long |
Get the cursor row ID of the currently selected list item. |
open Int |
Get the position of the currently selected list item. |
open View? |
onCreateView(@NonNull inflater: LayoutInflater, @Nullable container: ViewGroup?, @Nullable savedInstanceState: Bundle?) Provide default implementation to return a simple list view. |
open Unit |
Detach from list view. |
open Unit |
onListItemClick(@NonNull l: ListView, @NonNull v: View, position: Int, id: Long) This method will be called when an item in the list is selected. |
open Unit |
onViewCreated(@NonNull view: View, @Nullable savedInstanceState: Bundle?) Attach to list view once the view hierarchy has been created. |
ListAdapter |
Get the ListAdapter associated with this fragment's ListView. |
open Unit |
setEmptyText(@Nullable text: CharSequence?) The default content for a ListFragment has a TextView that can be shown when the list is empty. |
open Unit |
setListAdapter(@Nullable adapter: ListAdapter?) Provide the cursor for the list view. |
open Unit |
setListShown(shown: Boolean) Control whether the list is being displayed. |
open Unit |
setListShownNoAnimation(shown: Boolean) Like |
open Unit |
setSelection(position: Int) Set the currently selected list item to the specified position with the adapter's data |
Inherited functions | |
---|---|