Layout Issue On Android With Framelayout And Scrollview
I'm trying to split the screen in 2 areas, to the left an ImageView and to the right a ScrolView. I'm adding the ImageView and the content of the ScrollView programatically, so the
Solution 1:
I think you should make use of the LinearLayout
and the weight
parameter to solve this problem.
I have edited your snippet to give you an idea of how you should use it.
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"android:orientation="horizontal"><FrameLayoutandroid:id="@+id/scene_view"android:layout_width="0dp"android:layout_height="fill_parent"android:layout_gravity="left"android:layout_weight=1></FrameLayout><ScrollViewandroid:layout_height="fill_parent"android:layout_width="0dp"android:layout_weight=1android:layout_gravity="right"><LinearLayoutandroid:id="@+id/scrollmenu"android:layout_height="fill_parent"android:orientation="vertical"android:layout_width="fill_parent"></LinearLayout></ScrollView></FrameLayout>
I hope it helps..
Post a Comment for "Layout Issue On Android With Framelayout And Scrollview"