{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

WrongNestedHierarchyViolation

Added in 1.6.0

public final class WrongNestedHierarchyViolation extends Violation

java.lang.Object
   ↳ kotlin.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ androidx.fragment.app.strictmode.Violation
           ↳ androidx.fragment.app.strictmode.WrongNestedHierarchyViolation

See FragmentStrictMode.Policy.Builder.detectWrongNestedHierarchy.

Summary

Public methods

final int

Gets the unique ID of the container that the Fragment causing the Violation would have been added to.

final @NonNull Fragment

Gets the expected parent Fragment of the fragment causing the Violation.

Inherited methods

From kotlin.Throwable
From androidx.fragment.app.strictmode.Violation
final @NonNull Fragment

Gets the Fragment causing the Violation.

Public methods

getContainerId

Added in 1.6.0
public final int getContainerId()

Gets the unique ID of the container that the Fragment causing the Violation would have been added to.

getExpectedParentFragment

Added in 1.6.0
public final @NonNull Fragment getExpectedParentFragment()

Gets the expected parent Fragment of the fragment causing the Violation.