Open rosenpin opened 1 year ago
Hi @rosenpin, you don't have to use a ComponentActivity
for Jetpack Compose. Instead it is the minimum required type of activity but you can also use a AppCompatActivity
or FragmentActivity
(because AppCompatActivity
extends FragmentActivity
which extends ComponentActivity
).
That's not the case AFAIK. The ComponentActivity you inherit to use Jetpack compose is different from the regular base ComponentActivity which in turn inherits directly from Activity
. See here
They are named the same which is hella confusing, but the compose ComponentActivity
, the one that supplies the setContent
method required to set compose views as your layout is not the same as the ComponentActivity
that FragmentActivity
and AppCompatActivity
inherit from
When trying to show the rating dialog from the compose component activity I get this error:
Actually seems like adding this library allows the use of setContent
in an AppCompatActivity
.
implementation "androidx.compose.ui:ui:1.5.1"
https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.1
Might be worth adding it to the README :)
The README currently falsely claims that this library has jetpack compose support.
You also mention later in the README that to use this library with jetpack compose users should use an AppCompatActivity instead of a ComponentActivity, but the latter is required to use compose.
To add proper compose support we should create a dialog view specifically for compose