In AndroidStudio in an XML file, I do not understand the difference between an element with the android prefix and without it part of my source code, for example:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:textColorPrimary">@color/white</item> <item name="android:textColorSecondary">@color/white</item> <item name="actionMenuTextColor">@color/white</item> </style> <style name="AppTheme.toolbar" parent="Widget.AppCompat.Toolbar"> <item name="android:background">@color/grey</item> </style>
in this XML file, why some attributes require a prefix (android :) and others not. for example:
<item name="android:textColorPrimary">@color/white</item>
this part of the code works correctly, but when the code below is used, it does not work: <item name="textColorPrimary">@color/white</item> So can someone help me find out the difference between the prefix and when I use it. thanks
source share