(First children with blue background and second with black background.)ĭown with has the orientation vertical and two children. Up part with has the orientation horizontal and two children. Left part have two main parts ( up with and down with ) (this linearlayout has two children and vertical orientation) (So this linearlayout has two children and horizontal orientation) This part have mainly 2 horizontal parts (left and right). These two children are also linearlayouts. So, our in the activity_main.xml code, first linearlayout has vertical orientation and there are two children. There are two vertical parts in the above image. Mainly, there are two parts in the above layout. Now let us understand how to develop above layout. This is the responsive structure through different screen sizes. In the activity_main.xml file, add the following source code Ībove file will generate the below output You will be able to use linearlayout in your app after you learn the below example carefully. If orientation of linearlayout is horizontal, then weight will decide width of the children widgets and if orientation is vertical then weight will set the height of the children widgets.It will set height or width of children as per given weight. Layput_weight attribute can be used in the children of linearlayout.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |