public class

MessageListFragment

extends Fragment
java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ com.urbanairship.messagecenter.MessageListFragment

Class Overview

Fragment that displays the Airship Message Center.

Summary

Nested Classes
interface MessageListFragment.OnListViewReadyCallback Interface that defines the callback when the list view is ready. 
[Expand]
Inherited Fields
From class androidx.fragment.app.Fragment
Public Constructors
MessageListFragment()
Public Methods
AbsListView getAbsListView()
Returns the AbsListView for the fragment.
void getAbsListViewAsync(MessageListFragment.OnListViewReadyCallback callback)
Gets the message list view once it is ready.
MessageViewAdapter getAdapter()
Returns the MessageViewAdapter for the list view.
Message getMessage(int position)
Returns a the Message at a given position.
void onCreate(Bundle savedInstanceState)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Subclasses can override to replace with their own layout.
void onDestroy()
void onDestroyView()
void onPause()
void onResume()
void onViewCreated(View view, Bundle savedInstanceState)
Protected Methods
MessageViewAdapter createMessageViewAdapter(Context context)
Called when the MessageViewAdapter needs to be created for the AbsListView.
[Expand]
Inherited Methods
From class androidx.fragment.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener
From interface androidx.activity.result.ActivityResultCaller
From interface androidx.lifecycle.HasDefaultViewModelProviderFactory
From interface androidx.lifecycle.LifecycleOwner
From interface androidx.lifecycle.ViewModelStoreOwner
From interface androidx.savedstate.SavedStateRegistryOwner

Public Constructors

public MessageListFragment ()

Public Methods

public AbsListView getAbsListView ()

Returns the AbsListView for the fragment.

Returns

public void getAbsListViewAsync (MessageListFragment.OnListViewReadyCallback callback)

Gets the message list view once it is ready. The callback will be called on the main thread. If the list view is already ready, the callback will be called immediately.

Parameters
callback The on ready callback.

public MessageViewAdapter getAdapter ()

Returns the MessageViewAdapter for the list view.

Returns

public Message getMessage (int position)

Returns a the Message at a given position.

Parameters
position The list position.
Returns

public void onCreate (Bundle savedInstanceState)

public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

Subclasses can override to replace with their own layout. If doing so, the returned view hierarchy must have an AbsListView (GridView or ListView) whose id is android.R.id.list.

Parameters
inflater The LayoutInflater object that can be used to inflate any views in the fragment,
container If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view.
savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.
Returns
  • Return the View for the fragment's UI, or null.

public void onDestroy ()

public void onDestroyView ()

public void onPause ()

public void onResume ()

public void onViewCreated (View view, Bundle savedInstanceState)

Protected Methods

protected MessageViewAdapter createMessageViewAdapter (Context context)

Called when the MessageViewAdapter needs to be created for the AbsListView.

Returns