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

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

    Instead of write Numerical number in value of android:layout_marginTop , you can use the height specified by actionBarSize like an Example in Android Training .

    You can use ?android:attr or ?attr [ in case support library ] If you need to use any android attributes[ attr ] can be found in R.attr

    For More Description about ?android:attr Quiz 1 ,Quiz 2

提交回复
热议问题