2013-06-06 3 views
5

いくつかのデモコードには2つのケースがありますが、違いは何ですか?android:attr/textAppearanceMediumと?android:textAppearanceMedium?ありがとう!android:attr/textAppearanceMediumと?android:textAppearanceMediumの違いは何ですか?

ケース1

<resources> 
    <style name="myTextAppearance"> 
     <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> 
    </style> 

ケース2

<resources> 
    <style name="myTextAppearance"> 
     <item name="android:textAppearance">?android:textAppearanceMedium</item> 
    </style> 
</resources> 

答えて

3

私は彼らがどちらも同じことをすると思います。それはです。テーマ属性を参照してください。

DOCSはオプションであること

Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

[type:] ...と言います。

以下のリンクでもっと説明...

need explanation for android layout syntax

References to Theme Attributes

関連する問題