In this Android tip, I am going to show you how to use LinearLayout that is typically used in Android applications. The LinearLayout allows you to group and arrange widgets in a single row or column. You can specify row alignment or column alignment by using the android:orientation attribute. This attribute can be set in the <LinearLayout> tag. By supplying the vertical value to the attribute, the widgets are aligned in a single column. In contrast, if this attribute has horizontal value, the widgets are aligned in a single row. Another commonly used attribute is android:layout_weight. The android:layout_weight tells each widget in the LinearLayout to occupy the remaining space. The larger value the more space is occupied. This attribute is set in an individual widget. The default value of the android:layout_weight is zero.
Posted by: Dara | post date: 08-15-2014 | Subject: Android Apps Development
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: