

Below is the XML code for all the different animations just copy and paste in different files accordingly. Make sure you have named the files as shown above.

Just make sure you place the buttons inside the Linear Layout. So try not to confuse yourself by going too deep in understanding the XML file. Most of the code is just repetition with a different id. In the XML file, most of the code is self-explanatory such as text view, button, and their properties. Second, I have used Linear Layout, this is because I wanted all the buttons to be aligned either horizontally or vertically, in the LinearLayout the UI elements are arranged either horizontally or vertically. Let change activity_main.xml and add new values inside the XML file įirst, I will change the root layout to the RelativeLayout and I will use LinearLayout to place the animation in the form of buttons and for this arrangement.
