If I'm in a pure compose app (no fragments), what ...
# compose
c
If I'm in a pure compose app (no fragments), what Activity should I be extending and which artifacts can I remove from my app? I could have sworn that Ian said that once I go full compose I can remove appcompat libs entirely? (but my slack search is failing me)
h
Yes you can remove appcompat and extend from ComponentActivity once you depend on
androidx.activity:activity-compose
😱 1
☝️ 1
c
Remove appcompat? Never thought I'd live to see the day. ☠️
💯 3
h
c
Nice. I think I'll be safe with ComponentActivity then. I wonder if having to use AndroidView every now and then (for maps and webView) will force me to use appCompat, but I suppose I will find out. @Halil Ozercan any idea about this PR desc from the link you sent? "Force exclude AppCompat + MDC dependencies" How do you force exclude a dep?
a
You only need AppCompat if you are using AppCompat versions of standard framework views (e.g.
AppCompatTextView
,
AppCompatButton
, etc).
MapView
and
WebView
are safe.
y
This is where excluding dependencies happen. you can read more about it in gradle docs
c
Please bear in mind that force-excluding dependencies could break libraries, etc. Only do this if you have a good test setup