https://kotlinlang.org logo
#compose
Title
# compose
g

Gabriel

10/09/2020, 11:08 AM
Do we still use xml files for values? I've tried pruning the ones generated down but I still have colors, strings and 2xthemes files
a

Adam Powell

10/09/2020, 1:25 PM
Strings, yes, but the others, only if you really want to
g

Gabriel

10/09/2020, 1:34 PM
@Adam Powell so I can remove the
android:theme="@style/Theme.MyAwesomeTheme"
from the manifest?
When I try that I get
You need to use a Theme.AppCompat theme (or descendant) with this activity.
n

nickbutcher

10/09/2020, 1:47 PM
You still need a theme for content "above" compose e.g. the window decor like the
android:windowBackground
used at startup. If you're writing an all compose app then you shouldn't need an AppCompat dependency; we've started moving some of our samples to using
ComponentActivity
and
Theme.Material[.Light]
e.g. https://github.com/android/compose-samples/blob/main/Jetsnack
2
g

Gabriel

10/09/2020, 2:14 PM
@nickbutcher @Adam Powell thank you both <3