Hi am testing horizontal scrollview i came to a strange problem ,i put one button in horizontal scrollview with layout height and width fill_parent but that tag have no effect in layout ,lets look in to my layout
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:fillViewport="true"
>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:text="Button"
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</Button>
</LinearLayout>
</HorizontalScrollView>
How can i fill the layout with my button inside horizontal scrollview
the problem might be in android:width="wrap_content"
....
as u did wrap content for horizontal scrollview and it is parent of linearlayout and button in above case.......
that might be creating all the problem...
either hard code size of linear layout or put android:width="fill_parent"
in horizontal scroll view.....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With