Added in API level 11
Deprecated in API level 21

FragmentBreadCrumbs


open class FragmentBreadCrumbs : ViewGroup, FragmentManager.OnBackStackChangedListener
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.app.FragmentBreadCrumbs

Helper class for showing "bread crumbs" representing the fragment stack in an activity. This is intended to be used with ActionBar.setCustomView(View) to place the bread crumbs in the action bar.

The default style for this view is android.R.style#Widget_FragmentBreadCrumbs.

Summary

Nested classes
abstract

Interface to intercept clicks on the bread crumbs.

Inherited XML attributes
Inherited constants
Public constructors

FragmentBreadCrumbs(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Public methods
open Unit

open Unit

Attach the bread crumbs to their activity.

open Unit
setMaxVisible(visibleCrumbs: Int)

The maximum number of breadcrumbs to show.

open Unit

Sets a listener for clicks on the bread crumbs.

open Unit
setParentTitle(title: CharSequence!, shortTitle: CharSequence!, listener: View.OnClickListener!)

Inserts an optional parent entry at the first position in the breadcrumbs.

open Unit
setTitle(title: CharSequence!, shortTitle: CharSequence!)

Set a custom title for the bread crumbs.

Protected methods
open Unit
onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int)

open Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

Inherited functions
Inherited properties

Public constructors

FragmentBreadCrumbs

Added in API level 11
FragmentBreadCrumbs(context: Context!)

FragmentBreadCrumbs

Added in API level 11
FragmentBreadCrumbs(
    context: Context!,
    attrs: AttributeSet!)

FragmentBreadCrumbs

Added in API level 11
FragmentBreadCrumbs(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int)

Public methods

onBackStackChanged

Added in API level 11
open fun onBackStackChanged(): Unit

Deprecated: Deprecated in Java.

setActivity

Added in API level 11
open fun setActivity(a: Activity!): Unit

Deprecated: Deprecated in Java.

Attach the bread crumbs to their activity. This must be called once when creating the bread crumbs.

setMaxVisible

Added in API level 11
open fun setMaxVisible(visibleCrumbs: Int): Unit

Deprecated: Deprecated in Java.

The maximum number of breadcrumbs to show. Older fragment headers will be hidden from view.

Parameters
visibleCrumbs Int: the number of visible breadcrumbs. This should be greater than zero.

setOnBreadCrumbClickListener

Added in API level 12
Deprecated in API level 21
open fun setOnBreadCrumbClickListener(listener: FragmentBreadCrumbs.OnBreadCrumbClickListener!): Unit

Deprecated: Deprecated in Java.

Sets a listener for clicks on the bread crumbs. This will be called before the default click action is performed.

Parameters
listener FragmentBreadCrumbs.OnBreadCrumbClickListener!: The new listener to set. Replaces any existing listener.

setParentTitle

Added in API level 11
open fun setParentTitle(
    title: CharSequence!,
    shortTitle: CharSequence!,
    listener: View.OnClickListener!
): Unit

Deprecated: Deprecated in Java.

Inserts an optional parent entry at the first position in the breadcrumbs. Selecting this entry will result in a call to the specified listener's android.view.View.OnClickListener#onClick(View) method.

Parameters
title CharSequence!: the title for the parent entry
shortTitle CharSequence!: the short title for the parent entry
listener View.OnClickListener!: the android.view.View.OnClickListener to be called when clicked. A null will result in no action being taken when the parent entry is clicked.

setTitle

Added in API level 11
open fun setTitle(
    title: CharSequence!,
    shortTitle: CharSequence!
): Unit

Deprecated: Deprecated in Java.

Set a custom title for the bread crumbs. This will be the first entry shown at the left, representing the root of the bread crumbs. If the title is null, it will not be shown.

Protected methods

onLayout

Added in API level 11
protected open fun onLayout(
    changed: Boolean,
    l: Int,
    t: Int,
    r: Int,
    b: Int
): Unit

Deprecated: Deprecated in Java.

Parameters
changed Boolean: This is a new size or position for this view
left Left position, relative to parent
top Top position, relative to parent
right Right position, relative to parent
bottom Bottom position, relative to parent

onMeasure

Added in API level 11
protected open fun onMeasure(
    widthMeasureSpec: Int,
    heightMeasureSpec: Int
): Unit

Deprecated: Deprecated in Java.

Parameters
widthMeasureSpec Int: horizontal space requirements as imposed by the parent. The requirements are encoded with android.view.View.MeasureSpec.
heightMeasureSpec Int: vertical space requirements as imposed by the parent. The requirements are encoded with android.view.View.MeasureSpec.