【发布时间】:2016-05-12 18:20:46
【问题描述】:
Android 经验级别:新手。
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="?android:attr/actionBarSize"
android:padding="10dp"
android:fillViewport="false">
我已将上边距应用于ScrollView,即actionBar 的高度。这在我的两个物理设备中运行良好,但不适用于一个。为什么一台设备不使用该值?
附上截图。
带有 Marshmallow 6.0 Stock ROM 的联想 A7000:
在操作栏下方,一两行不可见。可能在actionBar后面。
HTC 手机和三星平板电脑:文字显示正常。
【问题讨论】:
-
您是否检查了从哪个文件夹中选择 res ?
-
你使用 AppCompat 吗?尝试将边距更改为
?actionBarSize -
是的。使用 AppCompat。
-
这就是我用过的@ExceptionLover。
android:layout_marginTop="?android:attr/actionBarSize".
标签: android android-actionbar scrollview android-scrollview