PreviewActivity

class PreviewActivity : Activity
kotlin.Any
   ↳ android.content.Context
   ↳ android.content.ContextWrapper
   ↳ android.view.ContextThemeWrapper
   ↳ android.app.Activity
   ↳ androidx.ui.tooling.preview.PreviewActivity

Activity used to run @Composable previews from Android Studio.

The @Composable function must have no parameters, and its name should be passed to this Activity through intent parameters, using composable as the key and the @Composable fully qualified name as the value.

Summary

Public constructors

Activity used to run @Composable previews from Android Studio.

Protected methods

Unit
onCreate(savedInstanceState: Bundle?)

Inherited extension functions

From androidx.compose.android.app.Activity
Unit

Disposes of a composition that was started using setContent.

Composition?
Activity.setViewContent(composable: () -> Unit)

Sets the contentView of an activity to a FrameLayout, and composes the contents of the layout with the passed in composable.

From androidx.ui.core.android.app.Activity
Composition
Activity.setContent(content: () -> Unit)

Composes the given composable into the given activity.

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Public constructors

<init>

PreviewActivity()

Activity used to run @Composable previews from Android Studio.

The @Composable function must have no parameters, and its name should be passed to this Activity through intent parameters, using composable as the key and the @Composable fully qualified name as the value.

Protected methods

onCreate

protected fun onCreate(savedInstanceState: Bundle?): Unit