# SetUserVisibleHintViolation

Artifact: [androidx.fragment:fragment](https://developer.android.com/jetpack/androidx/releases/fragment) [View Source](https://cs.android.com/search?q=file:androidx/fragment/app/strictmode/SetUserVisibleHintViolation.kt+class:androidx.fragment.app.strictmode.SetUserVisibleHintViolation) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.4.0)

*** ** * ** ***

<br />

```
class SetUserVisibleHintViolation : Violation
```

<br />

|---|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html) |||
|   |   |   | ↳ | [androidx.fragment.app.strictmode.Violation](https://developer.android.com/reference/kotlin/androidx/fragment/app/strictmode/Violation) ||
|   |   |   |   | ↳ | [androidx.fragment.app.strictmode.SetUserVisibleHintViolation](https://developer.android.com/reference/kotlin/androidx/fragment/app/strictmode/SetUserVisibleHintViolation) |

*** ** * ** ***

See `https://developer.android.com/reference/kotlin/androidx/fragment/app/strictmode/FragmentStrictMode.Policy.Builder#detectSetUserVisibleHint()`.

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/fragment/app/strictmode/SetUserVisibleHintViolation#isVisibleToUser()` Indicates what the `isVisibleToUser` field for the `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` causing the Violation was being set to. |

### Inherited functions

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintStream.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintWriter.html)`

### Inherited properties

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/localized-message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/stack-trace.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/suppressed.html` From [androidx.fragment.app.strictmode.Violation](https://developer.android.com/reference/kotlin/androidx/fragment/app/strictmode/Violation) `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` `https://developer.android.com/reference/kotlin/androidx/fragment/app/strictmode/Violation#fragment()`

Gets the `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` causing the Violation.

## Public properties

### isVisibleToUser

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

```
val isVisibleToUser: Boolean
```

Indicates what the `isVisibleToUser` field for the `https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment` causing the Violation was being set to.