Open the strings.xml file from the values directory. If there is a default Hello World TextView, delete the TextView and move to the next step. To change the layout open the activity_main.xml in the XML editor and replace the RelativeLayout by FrameLayout as shown here. Generally, FrameLayout should be used to hold a single child view, because it can be difficult to organize child views in a way that's scalable to different screen sizes without the children overlapping each other. FrameLayout is designed to block out an area on the screen to display a single item. Therefore, the parent layout is changed to the FrameLayout. Almost always ListView covers the entire screen of your application.
0 Comments
Leave a Reply. |