【发布时间】:2014-08-19 08:28:39
【问题描述】:
我在使用 ScrollView 时遇到了奇怪的问题,它包含一个带有 topMargin 的 relativeLayout
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
android:fillViewport="true"
android:focusableInTouchMode="true">
<RelativeLayout
android:id="@+id/cp_editor_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:layout_marginTop="270dp"
>
...
此代码示例不起作用。滚动在大约 20 像素后停止。如果我要删除 margin_top 属性,那么滚动会按预期工作。
感谢您的帮助
【问题讨论】:
标签: android android-layout scrollview