New to android need to understand “?android:attr/actionBarSize”

后端 未结 3 1563
清歌不尽
清歌不尽 2021-02-05 00:50

I was going through Lars Vogel\'s tutorial on using Fragments and I came across the following code:

android:layout_marginTop=\"?android:attr/actionBarSize\"
         


        
3条回答
  •  天命终不由人
    2021-02-05 01:30

    android:attr
    

    is an attribute.

    In specific,

    android:layout_marginTop="?android:attr/actionBarSize"
    

    means: "the size (height) of the action bar".
    ? is a special character that means it's an Android internal feature.

提交回复
热议问题