Friday, 4 September 2015

7.Dealing with XML files (Layouts)

As already mentioned XML files are categorized as assets.

Mainly XML files are used "in terms of layouts" in Android.

Here another explanation comes for "in terms of layouts" :

Basically some types of XML file are there, XMLs which are mainly used in our package are :

1.Layout XML : "These"(Each activity will have its own Layout (XML)file however you can use same file for one or many Activities when necessary) XML files are used to define the actual User interface of our application.
They hold up all the elements or the tools that we want to use in your application. Like Text Views, buttons and other UI elements (I will explain various may be each UI element which you can add in your layout in later posts).


2.Manifest XML :"This"(Each application is having one Manifest.xml within its package) XML file is used to define all the components of our application.

It includes the names of our packages, our classes(Activities), services, receivers and the permissions that your application needs(Related terms will be covered in another post sooner).

3.Strings XML : "This" XML file is used to replace the Hard coded strings with a single string, like you can replace"Welcome to my application" with "Welcome" string name and add the string with the word welcome in this XML file, you can refer to that string with Welcome throughout your application.

4.Styles XML :These files are mainly present in single quantity but you can increase  quantity by one or more to give different Styles to different versions of android(when necessary).

5.Drawable XML :These are the xml files that are used to provide various graphics to the elements of application. for more info about these right now then take a look at this however I will use it during the later tour.

No comments:

Post a Comment