UI Layouts and Controls - Anderoid Development
UI Layouts and Controls - Anderoid Development
DEVELOPMENT
2
Hello!
I am Nayyab Saeed
I am here because I love to give presentations.
You can find me at [email protected]
3
https://www.tutorialspoint.com/android/android_user_interface_layouts.htm
4
https://www.tutorialspoint.com/android/android_user_interface_layouts.htm
7
TYPES OF UI
LINEAR RELATIVE
LAYOUTS LAYOUT LAYOUT
GRID
LAYOUT
LINEAR LAYOUT
13
https://www.tutorialspoint.com/android/android_linear_layout.htm
14
15
android:layout_height="wrap_content"
android:hint="@string/to" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/subject" />
</LinearLayout>
16
LINEAR LAYOUT EXAMPLE 2
PRACTICE
QUESTION:
RELATIVE
LAYOUT
19
https://www.tutorialspoint.com/android/android_relative_layout.htm
20
</RelativeLayout>
21
https://www.tutorialspoint.com/android/android_relative_layout.htm
22
Some of the many layout properties available to views:
<EditText
android:id="@+id/name“
android:layout_width="fill_parent“
android:layout_height="wrap_content“
android:hint="@string/reminder" />
<EditText 28
android:id="@+id/dates“
android:layout_width="wrap_content“
android:layout_height="wrap_content“
android:layout_below="@id/name“
android:layout_alignParentLeft="true“/>
<EditText
android:id="@id/times“
android:layout_width="96dp“
android:layout_height="wrap_content“
android:layout_below="@id/name“
android:layout_alignParentRight="true" />
<Button
android:layout_width="96dp“
android:layout_height="wrap_content“
android:layout_below="@id/times“
android:layout_alignParentRight="true“
android:text="@string/done" />
</RelativeLayout>
29
Create following UI by using Relative Layout:
PRACTICE
QUESTION:
GRID
LAYOUT
31
○ GridLayout is a layout that divides its view space into
rows, columns, and cells.
PRACTICE
QUESTION
35
Thanks!
Any questions?