2016-05-12 117 views
0

Android体验级别:新手。?android:attr/actionBarSize只能在一个设备上工作。为什么?

<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高度。这在我的两个物理设备中运行良好,但不是一个。为什么一个设备不使用该值?

附上截图。

联想A7000与棉花糖6.0股票ROM:

下面的操作栏,一行或两行是不可见的。可能落后于actionBar

Lenovo A7000 with Marshmallow 6.0 Stock ROM

HTC手机与三星平板:文本显示正常。

HTC Desire 620G with KitKat Stock ROM Samsung Galaxy Tab 2

+0

你从越来越挑哪个文件夹水库检查? –

+0

你使用AppCompat吗?试着将margin改为'?actionBarSize' –

+0

是的。使用AppCompat。 –

回答

1

尝试使用安卓改变属性值ATTR/actionBarSize而不是:??ATTR/actionBarSize

+0

已经尝试过。没有工作。 –

相关问题