Hi, i am having dfficulty showing a compose view i...
# compose
t
Hi, i am having dfficulty showing a compose view inside an android xml layout whose parent is a ScrollView, the compose view is intermitently displaying, how can i get it to show consistently?
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="5dp"> ... Other items <LinearLayout android:id="@+id/llDisplayNetworkLogging" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:visibility="visible"> <include layout="@layout/settings_button_divider" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageView android:id="@+id/ivIcon" android:layout_width="50dp" android:layout_height="50dp" android:layout_marginStart="40dp" android:contentDescription="@string/network_logging_level" android:src="@drawable/ic_database_white" app:tint="@color/white" /> <TextView android:id="@+id/tvDisplayNetworkLoggingTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:ellipsize="end" android:fontFamily="@font/roboto_bold" android:gravity="start" android:maxLines="1" android:paddingStart="10.dp" android:paddingEnd="40.dp" android:text="@string/network_logging_level" android:textColor="@color/white" android:textSize="20sp" /> </LinearLayout> <androidx.compose.ui.platform.ComposeView android:id="@+id/ddNetworkLoggingCompose" android:layout_width="match_parent" android:layout_height="100dp" android:paddingStart="40dp" android:paddingTop="30dp" android:paddingEnd="40dp" android:paddingBottom="20dp" /> </LinearLayout> ... More Other items </LinearLayout> </ScrollView>
thats my xml layout, with this view to hold my compose UI, a drop down menu
<androidx.compose.ui.platform.ComposeView
android:id="@+id/ddNetworkLoggingCompose"
android:layout_width="match_parent"
android:layout_height="100dp"
android:paddingStart="40dp"
android:paddingTop="30dp"
android:paddingEnd="40dp"
android:paddingBottom="20dp" />