我正在尝试将屏幕分成 2 个区域,左侧是ImageView
a ,右侧是 a ScrolView
。我正在以ImageView
编程方式添加 ScrollView 的内容,因此布局的 xml 文件如下所示:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<FrameLayout
android:id="@+id/scene_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="left"
>
</FrameLayout>
<ScrollView
android:layout_height="fill_parent"
android:layout_width="@dimen/scrollmenu_width"
android:layout_gravity="right"
>
<LinearLayout
android:id="@+id/scrollmenu"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_width="fill_parent"
>
</LinearLayout>
</ScrollView>
</FrameLayout>
我究竟做错了什么?因为我要ScrollView
向右,但ImageView
居中(相对于屏幕)位于屏幕左侧。图像的分辨率超过了屏幕的分辨率,所以我得到黑色 sp