Java and Android
How to blend them to make an Android App
Android Studio is an IDE used for making Android App with a combination of Java and xml files. If you know Java, you will find this article useful for xml and if you know xml, it is best to learn some Java concepts used while making Android App Development. In Java, Java Swing is the Graphical User Interface for Java itself. In Android, we make use of xml for creating Graphical User Interface and Java for coding purpose.
For example, button's design will be created in xml code and it's onclick event code will be written in Java class files.
Here we will discuss about the connection between the java and android or java and xml file. As you know that Java Swing Objects are used for GUI purpose. With increasing number of android mobile the popularity and use of android app is also increasing day by day. Java is used in android app development because of its versatility and independency.
Java and Android : How to blend them to make an App
There are so many steps to create a single button in Java GUI but Android made it simpler by introducing and combining xml with java which becomes easier for developer. Let's see how?
Android divided the designing part and coding part. So that it become easier to create as well as to debug the program. In designing part we will make use of xml codes and in coding part we will use java codes. Here we are using Android Studio. The best part of it is it gives us IDE Integrated Development Environment where we can view the components before compiling and we can resize them accordingly.
Android Studio gives us drag and drop facility also. Pull Down Menu of Property attribute is another advantage of Android Studio. In Property Window we can set the respective attributes of the component. In Android we can drag the component and then set their property attributes.
Things to consider while making App
1. Create color.xml file and keep it in values folder.
2. Define all the colors you want to use in your program in color.xml
3. Create style.xml in values folder and write code for styling Top app bar, button style etc.
4. Create theme.xml in values-->themes-->themes.xml
5. Copy png or gif into drawable folder, mipmap folder for use in program
6. Create anim folder if required
7. Create main design file in layout folder and name it
8. Always give name to layout file starting with activity_name for better understanding in the beginning
9. To avoid confusion in later stage of programming create java class file with same name as xml
10. Define Each java class file in manifest file
11. Keep logo picture in png format in mipmap folder
12. Define your logo in manifest file
13. Check with real device.
14. In drawable folder keep images of all sizes for different screen sizes
15. Check with different screen size real device frequently
In the beginning, practice on constraint layout with different widgets, so that you will get to know about constraining them accurately.


Comments
There are no comments for this story
Be the first to respond and start the conversation.