public class

HtcFragmentBreadCrumbs

extends ViewGroup
implements FragmentManager.OnBackStackChangedListener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.app.HtcFragmentBreadCrumbs

Class Overview

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

The default style for this view is Widget_FragmentBreadCrumbs.

Summary

Nested Classes
interface HtcFragmentBreadCrumbs.OnBreadCrumbClickListener Interface to intercept clicks on the bread crumbs. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.ViewGroup
From class android.view.View
Public Constructors
HtcFragmentBreadCrumbs(Context context)
HtcFragmentBreadCrumbs(Context context, AttributeSet attrs)
HtcFragmentBreadCrumbs(Context context, AttributeSet attrs, int defStyle)
Public Methods
void onBackStackChanged()
void setActivity(Activity a)
Attach the bread crumbs to their activity.
void setMaxVisible(int visibleCrumbs)
The maximum number of breadcrumbs to show.
void setOnBreadCrumbClickListener(HtcFragmentBreadCrumbs.OnBreadCrumbClickListener listener)
Sets a listener for clicks on the bread crumbs.
void setParentTitle(CharSequence title, CharSequence shortTitle, View.OnClickListener listener)
Inserts an optional parent entry at the first position in the breadcrumbs.
void setTitle(CharSequence title, CharSequence shortTitle)
Set a custom title for the bread crumbs.
Protected Methods
void onLayout(boolean changed, int l, int t, int r, int b)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.app.FragmentManager.OnBackStackChangedListener
From interface android.graphics.drawable.Drawable.Callback
From interface android.graphics.drawable.Drawable.Callback2
From interface android.view.HtcIfViewGroup
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public HtcFragmentBreadCrumbs (Context context)

public HtcFragmentBreadCrumbs (Context context, AttributeSet attrs)

public HtcFragmentBreadCrumbs (Context context, AttributeSet attrs, int defStyle)

Public Methods

public void onBackStackChanged ()

public void setActivity (Activity a)

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

public void setMaxVisible (int visibleCrumbs)

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

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

public void setOnBreadCrumbClickListener (HtcFragmentBreadCrumbs.OnBreadCrumbClickListener listener)

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

Parameters
listener The new listener to set. Replaces any existing listener.

public void setParentTitle (CharSequence title, CharSequence shortTitle, View.OnClickListener listener)

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 onClick(View) method.

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

public void setTitle (CharSequence title, CharSequence shortTitle)

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

protected void onLayout (boolean changed, int l, int t, int r, int b)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

Since: API Level