Share via


ListFragment.SetListShown(Boolean) Method

Definition

Control whether the list is being displayed.

[Android.Runtime.Register("setListShown", "(Z)V", "GetSetListShown_ZHandler")]
public virtual void SetListShown (bool shown);
[<Android.Runtime.Register("setListShown", "(Z)V", "GetSetListShown_ZHandler")>]
abstract member SetListShown : bool -> unit
override this.SetListShown : bool -> unit

Parameters

shown
Boolean

If true, the list view is shown; if false, the progress indicator. The initial value is true.

Attributes

Remarks

Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead.

Applications do not normally need to use this themselves. The default behavior of ListFragment is to start with the list not being shown, only showing it once an adapter is given with #setListAdapter(ListAdapter). If the list at that point had not been shown, when it does get shown it will be do without the user ever seeing the hidden state.

Java documentation for android.app.ListFragment.setListShown(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to