Android布局语法解释

3

here is a line in layout file

 <code><TextView 
        android:id="@+id/username"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/username"
        android:textAppearance="?android:attr/textAppearanceMedium"</code>> 
in about context what is the exact meaning of
android:textAppearance="?android:attr/textAppearanceMedium" 
is that related to "?[package:][type:]name" , if yes then what that refers to ?


"?" 用于什么?我们也可以定义相同的东西吗?如何定义一个新的包?" - Shrenik
1个回答

7

?android:attr/textAppearanceMedium 是指 android.R.attr.textAppearanceMedium。这是引用外部包资源内容的方法。

这篇文章有提到这个内容。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接