# GuidanceStylist.Guidance

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/GuidanceStylist.java+class:androidx.leanback.widget.GuidanceStylist.Guidance) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
public class GuidanceStylist.Guidance
```

<br />

*** ** * ** ***

A data class representing contextual information for a `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment`. Guidance consists of a short title, a longer description, a breadcrumb to help with global navigation (often indicating where the back button will lead), and an optional icon. All this information is intended to provide users with the appropriate context to make the decision(s) required by the current step.

Clients may provide a subclass of this if they wish to remember auxiliary data for use in a customized GuidanceStylist.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance#Guidance(java.lang.String,java.lang.String,java.lang.String,android.graphics.drawable.Drawable)( @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html title, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html description, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html breadcrumb, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html icon )` Constructs a Guidance object with the specified title, description, breadcrumb, and icon drawable. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance#getBreadcrumb()()` Returns the breadcrumb specified when this Guidance was constructed. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance#getDescription()()` Returns the description specified when this Guidance was constructed. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance#getIconDrawable()()` Returns the icon drawable specified when this Guidance was constructed. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance#getTitle()()` Returns the title specified when this Guidance was constructed. |

## Public constructors

### Guidance

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public Guidance(
    @Nullable String title,
    @Nullable String description,
    @Nullable String breadcrumb,
    @Nullable Drawable icon
)
```

Constructs a Guidance object with the specified title, description, breadcrumb, and icon drawable.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html title` | The title for the current guided step. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html description` | The description for the current guided step. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html breadcrumb` | The breadcrumb for the current guided step. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html icon` | The icon drawable representing the current guided step. |

## Public methods

### getBreadcrumb

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable String getBreadcrumb()
```

Returns the breadcrumb specified when this Guidance was constructed.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | The breadcrumb for this Guidance. |

### getDescription

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable String getDescription()
```

Returns the description specified when this Guidance was constructed.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | The description for this Guidance. |

### getIconDrawable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable Drawable getIconDrawable()
```

Returns the icon drawable specified when this Guidance was constructed.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | The icon for this Guidance. |

### getTitle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable String getTitle()
```

Returns the title specified when this Guidance was constructed.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | The title for this Guidance. |