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

FragmentReuseViolation

Added in 1.4.0

public final class FragmentReuseViolation extends Violation

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

See FragmentStrictMode.Policy.Builder.detectFragmentReuse.

Summary

Public methods

final @NonNull String

Gets the unique ID of the previous instance 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

getPreviousFragmentId

Added in 1.4.0
public final @NonNull String getPreviousFragmentId()

Gets the unique ID of the previous instance of the Fragment causing the Violation.