TabWidget.FocusCurrentTab(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the current tab and focuses the UI on it.
[Android.Runtime.Register("focusCurrentTab", "(I)V", "GetFocusCurrentTab_IHandler")]
public virtual void FocusCurrentTab (int index);
[<Android.Runtime.Register("focusCurrentTab", "(I)V", "GetFocusCurrentTab_IHandler")>]
abstract member FocusCurrentTab : int -> unit
override this.FocusCurrentTab : int -> unit
Parameters
- index
- Int32
The tab that you want focused (highlighted in orange) and selected (tab brought to the front of the widget)
- Attributes
Remarks
Sets the current tab and focuses the UI on it. This method makes sure that the focused tab matches the selected tab, normally at #setCurrentTab
. Normally this would not be an issue if we go through the UI, since the UI is responsible for calling TabWidget.onFocusChanged(), but in the case where we are selecting the tab programmatically, we'll need to make sure focus keeps up.
Java documentation for android.widget.TabWidget.focusCurrentTab(int)
.
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.