简体   繁体   中英

?android:attr/actionBarSize not working in only one device. Why?

Android experience level: Novice.

<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">

I have applied top margin to the ScrollView which is the height of actionBar . That works well in two of my physical devices properly but not in one. Why the one device does not utilize the value?

Screenshots attached.

Lenovo A7000 with Marshmallow 6.0 Stock ROM:

Below the action bar, one or two lines are not visible. Probably behind the actionBar .

带有棉花糖6.0库存ROM的Lenovo A7000

HTC phone and Samsung tablet: The text appears fine.

带有KitKat Stock ROM的HTC Desire 620G 三星Galaxy Tab 2

尝试将属性值更改为?attr / actionBarSize,而不要使用?android:attr / actionBarSize

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM