190 likes | 301 Views
Designing user interface. Dr. Razi Iqbal razi.iqbal @leads.edu.pk. Creating Manner Mode App. Creating Manner Mode App. GUI + App Icon (Initial Stage). Layouts. Linear Layout. A View Group that arranges its children Vertically Horizontally
E N D
Designing user interface Dr. Razi Iqbal razi.iqbal@leads.edu.pk
Linear Layout • A View Group that arranges its children • Vertically • Horizontally • Layout Direction can be specified as • android:orientation • If orientation is vertical • Control will be one control per column • If orientation is Horizontal • Controls will be arranged in rows
Relative Layout • A View Group that arranges its children • Relative to each other • Child Views can specify their positions • Relative to their parents • Elements can be arranged to • Left of • Right of • Above • Below
Activity_Main.xml code Code after deleting the TextView from Activity_Main.xml
Adding Images to Project • Simply drag and Drop the images to res drawable-mdpi • Project will rebuild (Build Automatically) • It will include the resources in R.java file
The Final GUI • Widgets • An Image View • A Toggle Button • Desired Actions • Image should change on Button Click • State of Manner Mode should change on Button Click