Insert a view dynamically in a HorizontalScrollView in Android

前端 未结 4 742
轻奢々
轻奢々 2020-12-30 16:58

I\'m developing an application for Android tablet 3.0 that has one activity that should be scrollable in the horizontal axis, like an e-book.

For that, I\'m using a

4条回答
  •  天涯浪人
    2020-12-30 17:13

    Change the width of Relativelayout to wrap_content.

    Try using this method to add the view.

    void addView (View child, ViewGroup.LayoutParams params)
    

    EDIT:
    Remove android:orientation="horizontal" from the HorizontalScrollView

提交回复
热议问题