在查看Fede的UberMusic主题后,我发现了文件album_screen.xml。下面是该文件的源代码。基本上我注意到他的主题有使用自定义视图的能力,这些视图可以成为他应用程序的一部分,并且它们在顶部有这个XML命名空间theme
。我不明白他如何能够将属性应用于他无法控制的视图,以及Eclipse如何能够成功编译以下代码。我将URL http://schemas.uberdroidstudio.com/theme
放入我的浏览器地址栏中,但没有任何结果,并且我无法弄清楚Eclipse从哪里知道命名空间支持的属性。谢谢您的帮助。
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:theme="http://schemas.uberdroidstudio.com/theme">
<TextView
android:id="@id/artist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.0"
theme:textFilter="uppercase" /> <!-- This is the interesting line -->