Home / Mobile devlopment / Android(Java) / Create a User Interface – (android app design)

Create a User Interface – (android app design)

How to Create android app design – Developing Android Apps.

What is Main activity and how to start with android app design ?

Main Activity is launched when you start the application and at the bottom of Main Activity we have Place holder Fragment , it generated by the template we used when creating our project.

A fragment is a modular container within you activity , for now our activity contains just one fragment.

So in Place holder Fragment is where we reference our UI layout resource, it called fragment main.

This XML file lives in the resource’s RES directory of our project folder, and you can see other kinds of resources here besides layouts such as design assets or drawable or strings.

Now when our activity runs it creates Place holder fragment which then inflates the XML layout resource and converting everything in the XML file to a hierarchy of view objects in memory.

So by holding Ctrl or CMD (depending on your Operating system) and clicking on fragment main reference , android studio will drop us right into the visual layout editor.

once we’re inside a layout XML file , we can switch between the design tab and Text tab and in design tab we can drag and drop new UI elements and modify the layout visually.

And in Text tab where we can see and edit the XML that defined the layout and UI elements.

All of the views we’ll talk about here ultimately extend the view base class.

The template we used gives us a relative layout with some padding around the edges.

inside our relative layout is a single Text View that says: unhandled error.

Also we can drag and drop Edit Text , is a text entry field that is an editable version of text view, it has many options such as whether it supports single or multi line.

there are several styled versions of edit text , in the text field section text fields , such as Name , Email , phone or postal address.

Unhandled error Team – with our love


One comment

Leave a Reply

Your email address will not be published. Required fields are marked *