use android prefix on xml (android:, app:, @.., ...)

Viewed 489

On AndroidStudio in xml file i don't understand the difference between item with android prefix and item 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 want the prefix (android:) and other not. for the example:

<item name="android:textColorPrimary">@color/white</item>

this part of code works correctly, but when the code below is used, it doesn't works: <item name="textColorPrimary">@color/white</item> So can anyone help me to know the difference between the prefix, and when i use it. thanks

1 Answers
Related