You are on page 1of 14

Chapter 4: Decissions

Android

Ch.2

Chapter 4: Decissions
There are three main menu of starting
1) Manifesto
2) Java
3) Resource
Manifesto : is the main point involved
configuration of All Activity
Resource : provided all activities of
appearance

Chapter 4: Decissions
Resource contains :
 Drawble
 Layout
 Mipmab
 Values

1)Drawble and Mipmab store of images


2) Layout performance the style of the application
3) Values is the terminal of colors and string

Chapter 4: Decissions
 <TextView
 android:layout_height="wrap_content"

android:layout_width="wrap_content"
android:text="Welcome to university"
android:textSize="32sp"
android:textColor="#B02799"
android:textAllCaps="true“
 />

</LinearLayout>

Chapter 4: Decissions
 Text property : changes the text written in
the control

 Text Size property : Can be adjusted in


inches(in), millimeters(mm), pixels(px),
density-independent pixels (dp), and scaled-
independent pixels (Sp)
 Example
 Android: layouthight” is key “wrap content” is

the values

Chapter 4: Decissions
 <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="save“
 android:textSize="25sp"
android:scrollbarSize="20dp"
>

</Button>
 Also you can get size match parent

Chapter 4: Decissions
 <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/lCe"
android:scaleType="fitXY"
>

</ImageView>

Chapter 4: Decissions
 Layout Orientation : is matching formula text
for grouping for vertical or horizontal.

 android:orientation="vertical“
 android:orientation=“Horizontal“

Chapter 4: Decissions
 Linear Layout Organize layout Components in
a vertical column or Horizontal row
 Object are placed directly below each other
 Can be switched from vertical to horizontal
orientation
 Linear Layout is the default Layout

Chapter 4: Decissions
 Relative Layout : Organizes Layout
Component in relation to each other
 provides more flexibility in positioning than
linear layout
 Must be changed from the linear default

Chapter 4: Decissions
 Relative orientation : provide the matching o
priority buttons with announcing alliance or
ID
 android:layout_below="@+id/btn1“

 If there Over buttons you could write this cod

 android:layout_alignParentRight="true"

Chapter 4: Decissions
 <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="save“
 android:textSize="25sp“
 android:Layout_margin “ 15dp”
 android:Layout_below “@+id/btn1”
 android:layout_alingparentRight=“true”
 android:backgroundcolor=“ “
android:scrollbarSize="20dp“

>

Chapter 4: Decissions
END
Chapter 4: Decissions

You might also like