![]() ![]() It accepts another sibling view id and places the view right of the specified view id. ![]() It accepts another sibling view id and places the view left of the specified view id. It accepts another sibling view id and places the view below the specified view id. It accepts another sibling view id and places the view above the specified view id. If it specified “true”, the view will be vertically centre aligned within its parent. If it specified “true”, the view will be horizontally centre aligned within its parent. If it specified “true”, the view will be aligned to the centre of parent. If it specified “true”, the right edge of view will match the right edge of the parent. If it specified “true”, the left edge of view will match the left edge of parent. If it specified “true”, the bottom edge of view will match the bottom edge of parent. If it specified “true”, the top edge of view will match the top edge of the parent. ![]() In case if we didn’t specify the position of child views, by default all child views are positioned to top-left of the layout.įollowing are the some of most useful layout properties available to views in RelativeLayout. Android Positioning Views in Relative LayoutĪs we discussed, in RelativeLayout we need to specify the position of child views relative to each other or relative to the parent. In android, RelativeLayout is very useful to design user interface because by using relative layout we can eliminate the nested view groups and keep our layout hierarchy flat, which improves the performance of application. In android, RelativeLayout is a ViewGroup which is used to specify the position of child View instances relative to each other (Child A to the left of Child B) or relative to the parent (Aligned to the top of parent).įollowing is the pictorial representation of relative layout in android applications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |