I copy this code from styles.xml file in framework-res module
<style name="Theme"> <item name="colorForeground">@android:color/bright_foreground_dark</item> <item name="colorForegroundInverse">@android:color/bright_foreground_dark_inverse</item> <item name="colorBackground">@android:color/background_dark</item> .<style name="Theme.Black"> <item name="android:windowBackground">@android:color/black</item> <item name="android:colorBackground">@android:color/black</item> </style>
<style name="Theme"> <item name="colorForeground">@android:color/bright_foreground_dark</item> <item name="colorForegroundInverse">@android:color/bright_foreground_dark_inverse</item> <item name="colorBackground">@android:color/background_dark</item>
.
<style name="Theme.Black"> <item name="android:windowBackground">@android:color/black</item> <item name="android:colorBackground">@android:color/black</item> </style>
As you can see, they all have an attribute name whose value is windowBackground. But formar has a android:, and the latter does not. Is it really necessary to write a prefix android:in the android framework?
android:
I found this interesting question and tried to study it to find the answer. Here is what I found ..
from: http://developer.android.com/guide/topics/resources/style-resource.html
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="style_name" parent="@[package:]style/style_to_inherit"> <item name="[package:]style_property_name" >style_value</item> </style> </resources>
item - . . : . . , , , (, android: textColor).
from: http://developer.android.com/guide/topics/manifest/manifest-intro.html
, - , . . :
@[package:]type:name
, , , - - , "" "" - - , . : , "?" "@":
?[package:]type:name
, , android:, , .
Android , , . , android. , Android , ListAdapter:
ListAdapter
setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myarray));
simple_list_item_1 - , ListView. . ( ListView . .)
ListView