Part 1 – Background of Home

In this week we start the 2nd Sprint.

And for this sprint, my Job desk is to create  Interface Home. In our mock up, the interface of our home is like this…

Capture.PNG

So, we will implement it to the Android Studio…..

First, Choose Empty Activity and type the name of the layout.

1

your Activity is done and time to create layout like in the mock up.

on the Design tab you’ll see… 2

there’s nothing because how haven’t code anything inside of it. try to make background in the Text tab…

4.PNG

in here you’ll try to code to make layout like in mock up.

This is the final of the code…

5.PNG

and this the interface in design tab….

6

Explanation :

  1. What is Relative Layout ? is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or in positions relative to the parent RelativeLayout area (such as aligned to the bottom, left or center).
  2. Match_parents ? The view should be as big as its parent (minus padding). That’s make our layout stay that place.
  3. fill_parents ? The view should be as big as its parent (minus padding).
  4. For the color, we should insert it by ourselves. like in this picture :3

and then we can call it using ” @ ”

match_parents Vs fill_parents 

what is the difference ?

  1. fill_parents : This constant is deprecated starting from API Level 8 and is replaced by match_parents
  2. match_parents : Introduced in API Level 8

actually there are 3 kinds of constant values, the other one is wrap_content

wrap_content is The view should be only big enough to enclose its content (plus padding).

 

 

to be continue…..

Advertisements