Alex Gladkov
10/13/2021, 8:36 AMCsaba Kozák
10/13/2021, 8:45 AMFragment
into a composable.
Create an XML file _my_fragment.xml_
<androidx.fragment.app.FragmentContainerView
xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
android:id="@+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.example.MyFragment"
android:tag="my_tag">
</androidx.fragment.app.FragmentContainerView>
Then you can use it in Compose:
AndroidViewBinding(MyFragmentBinding::inflate)
You have use FragmentActivity
and enable view binding for this.Alex Gladkov
10/13/2021, 9:02 AMephemient
10/13/2021, 9:14 AMAlex Gladkov
10/13/2021, 9:17 AMAlex Gladkov
10/13/2021, 9:17 AMAlex Gladkov
10/13/2021, 9:19 AMAmrJyniat
10/13/2021, 9:26 AMAlex Gladkov
10/13/2021, 9:32 AM