Android - When And For Which Purpose We Use The Following Prefixes In Android Xml File?
I am new to android development and confused about the following prefixes: xmlns:android xmlns:app xmlns:tools android:something app:something tool:something I am confused about
Solution 1:
as Henry said, these are called namespaces.
the tools
namespace is used to make changes to components without it being applied at runtime. it is useful for designing and testing different layouts or components without it affecting your code when you run the app.
the android
namespace is usually used for an android attribute, meaning that it comes from the Android SDK itself.
the app
namespace is used for support library components, so that it works for various different versions of android.
xmlns
is simply a namespace specifying that it is an xml document, these are used for making changes to the xml document itself.
Post a Comment for "Android - When And For Which Purpose We Use The Following Prefixes In Android Xml File?"