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

后端 未结 3 1522
清歌不尽
清歌不尽 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:35

    While building android apps, one requires to know the properties of the Android client. Such as screen size etc. One such method is by using android:attr which is android attributes. Here you have mentioned to return a specific attribute by mentioning the keyword after / symbol. Here the keyword is actionBarSize.

    The ? symbol is an operator which is used to access system configurations and properties in Android

提交回复
热议问题