需要布局Android的语法解释 [英] need explanation for android layout syntax

查看:142
本文介绍了需要布局Android的语法解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是布局文件中的行

 <TextView 
        android:id="@+id/username"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/username"
        android:textAppearance="?android:attr/textAppearanceMedium"> 


中有关上下文是什么

android:textAppearance="?android:attr/textAppearanceMedium" 


是相关的是?[包:] [类型:]的名字?中,如果是的话那么什么引用

is that related to "?[package:][type:]name" , if yes then what that refers to ?

推荐答案

安卓?ATTR / textAppearanceMedium是指android.R.attr.textAppearanceMedium这是引用外部包资源内容的方式。

?android:attr/textAppearanceMedium is referring to the android.R.attr.textAppearanceMedium This is the way to reference to external package resource content.

下面是一个<一个href=\"http://www.linuxtopia.org/online_books/android/devguide/guide/topics/resources/android_resources-i18n_ReferencesToThemeAttributes.html\">article提到这一点。

Here's an article mentioned this.

这篇关于需要布局Android的语法解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆