Activity is the basic unit of Android apps. The activity shows the interactive interface such as keystrokes, text, and so on. The activity interface is defined in the corresponding. xml file for layout under RES and can be defined by modifying the. xml file.
Run yes, by calling Setconsentview () in Oncreat () to apply the appropriate interface.
Activities contain views and view groups, and views are widgets that can be displayed, such as keystrokes, text, and so on. View inheritance and Android.view.View. One or more views can form a view group. The view group provides a layout that inherits the view group from Android.view.ViewGroup.
The following layouts are commonly supported:
Linearlayout,absolutelayout,tablelayout,relativelayout,framelayout,scollview, etc.
Views and view groups have some common properties:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/C5/wKiom1TgHe2z147lAAIuJn1ed4Q352.jpg "title=" 1.png " alt= "Wkiom1tghe2z147laaiujn1ed4q352.jpg"/>
PS: Some properties can only be used in a specific layout
You can use constants to set certain properties, such as Fill_parent and wrap_content, which can be used to set the width and Height properties, which means that the fill is filled with the parent element and its size is its content size.
Supplement: 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/C1/wKioL1TgIFLSap48AAHf1mFEMyo900.jpg "title=" 2. PNG "alt=" wkiol1tgiflsap48aahf1mfemyo900.jpg "/>
It is recommended to use DP as the unit, which masks the actual screen resolution, which is displayed at different resolutions.
This article is from the "Useless Uncle" blog, please be sure to keep this source http://aslonely.blog.51cto.com/6552465/1614556
Android layout details (i)