6

Possible Duplicate:
Question mark (?) in XML attributes for Android

<TextView android:id="@+android:id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:ellipsize="marquee"
        android:fadingEdge="horizontal" />

what does "?android:attr/textAppearanceLarge" do? Does it have a name? Why doesn't it use an "@" instead? Can I use this syntax in my own code? Where can I read more about this? Since I don't know what it is, it's kind of hard to find more information about it. Any guidance would be greatly appreciated.

Community
  • 1
  • 1
user123321
  • 12,593
  • 11
  • 52
  • 63

2 Answers2

9

This question has already been asked on stackoverflow. The answer given was:

The question mark means it's a reference to a resource value in the currently applied theme.

Look here for more details.

Community
  • 1
  • 1
lc2817
  • 3,722
  • 16
  • 40
4

It is a reference to style attribute. Check this reference:

References To Theme Attributes

Kash
  • 8,799
  • 4
  • 29
  • 48