Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,363 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
in platform xamarin android
I have a relative layout and inside some text view i try to add a scroll bar as parent to the text views
but when i debug the app i get an exception
android.views.inflateexception scrollview can hosts only one direct child
i tried using linear layout in place inside the relative layout now i don't have exception but all freezes
thanks
I resolved by using 2 relative layout one relative as parent scrollview as child and the other relative
layout as child of the scroll view
like this
<RelativeLayout
android:layout_width="3dp"
android:layout_height="wrap_content"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
</RelativeLayout>
</ScrollView>
</RelativeLayout>