Sdílet prostřednictvím


ActionBar.SetHomeButtonEnabled(Boolean) Method

Definition

Enable or disable the "home" button in the corner of the action bar.

[Android.Runtime.Register("setHomeButtonEnabled", "(Z)V", "GetSetHomeButtonEnabled_ZHandler")]
public virtual void SetHomeButtonEnabled (bool enabled);
[<Android.Runtime.Register("setHomeButtonEnabled", "(Z)V", "GetSetHomeButtonEnabled_ZHandler")>]
abstract member SetHomeButtonEnabled : bool -> unit
override this.SetHomeButtonEnabled : bool -> unit

Parameters

enabled
Boolean

true to enable the home button, false to disable the home button.

Attributes

Remarks

Enable or disable the "home" button in the corner of the action bar. (Note that this is the application home/up affordance on the action bar, not the systemwide home button.)

This defaults to true for packages targeting &lt; API 14. For packages targeting API 14 or greater, the application should call this method to enable interaction with the home/up affordance.

Setting the #DISPLAY_HOME_AS_UP display option will automatically enable the home button.

Java documentation for android.app.ActionBar.setHomeButtonEnabled(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