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

WrongFragmentContainerViolation

Added in 1.4.0

public final class WrongFragmentContainerViolation extends Violation

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

See FragmentStrictMode.Policy.Builder.detectWrongFragmentContainer.

Summary

Public methods

final @NonNull ViewGroup

Gets the container that the Fragment causing the Violation was being added to.

Inherited methods

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

Gets the Fragment causing the Violation.

Public methods

getContainer

Added in 1.4.0
public final @NonNull ViewGroup getContainer()

Gets the container that the Fragment causing the Violation was being added to.