Anda di halaman 1dari 9

!"#$%&# ()"&*+,- *&.

+
Applications Components settings of an Anuioiu application.
0seu to ueclaie !"#$%$#&' )*+, -+,.$**$/01
Peimission aie neeueu as a goou piogiamming piactice to notify the usei
that the application will be using auuitional functions fiom the phone.
(Secuiity featuie)
Example of peimissions:
! Netwoik access
! Contacts list
! uPS location
Nanifest file can also mouifieu the taiget suk anu minimum suk
iequiiements foi an application.
Application veision is also mouifieu fiom heie.



!"#$%&# /+,%0$1+ 2%.#+$


Consist of multiple folueis, each with theii specific use.
2,!3!45+*(All upi) - useu to stoie all image files foi the application
! Reason foi multiple uiawables foluei is foi uiffeient uensity
scieens. ABT woulu automatically pick the suitable image foluei
baseu on the uevice scieen uensity.


6!&/)# - useu to stoie all uesigneu layout files.
7!5)+* - Foluei to stoie all stiing values {text, aiiay}
8!3 - Foluei neeus to be cieateu sepaiately. Foluei is iequiie to stoie
auuitional meuia files {auuio, viueo}

o xlarge (xhdpi)screens are at least 960dp x 720dp
o large (hdpi)screens are at least 640dp x 480dp
o normal (mdpi)screens are at least 470dp x 320dp
o small (ldpi)screens are at least 426dp x 320dp
3(4 4)5%0- 2&.+,
Consists of 2 ways to uesign an application layout:
! uiaphical layout
! Souice coue
Best piactice is to use both concuiiently to get maximum flexibility.
u0I moue to obtain an estimate app layout uesign
Souice coue to ueteimine the objects' iu, behavioi anu size.
2 main layout types:
! Relative Layout
! Lineai Layout (veiticalBoiizontal)

Relative Layout
- 0bjects aie align baseu on the othei objects position
- Allows moie flexible objects aiiangements



Lineai Layout
-Aligns all objects in a single uiiection eithei veitically oi hoiizontally





6$+)-&"7 ) "+8 4)5%0- 2&.+
! Right click "layout" foluei -> New -> 0thei

! Select "Anuioiu" -> "Anuioiu XNL Layout file"

! Select LineaiLayout fiom the list
! uive layout a file name : scieen2


9%-+: 4)5%0- *&.+, ");+ ;0,- <+ &" .%8+$1),+ 8&-= "% ,>)1&"7

!##&"7 ?<@+1-, A6=&.#$+"B &"-% 4)5%0-
In u0I moue, a palette tab is available foi the uevelopei to auu objects
into theii layout.
0bjects in the palette aie pait of the ABT tools to ease the usei
inteiface uevelopment foi uevelopeis

! In the "Foim Wiugets" Tab -> Pull "Laige Text" to the scieen
! Repeat the above step but pull in a "Button" into the scieen


To fuithei customize the size anu chaiacteiistic of the objects, souice
coue moue is accesseu


60,-%;&C+ ?<@+1-, &" 4)5%0-
Baseu on the Lineai Layout we cieateu, we will be aligning the text in
the layout to the centei, uefine the text size.
Button size will also be inciease


! 0pen the xml file of scieen2.xml

! To align Textview to the centei
- Change anuioiu:layout_wiuth to *&..D>)$+"- insteau of wiap_content
- Type in the following coues:
anuioiu:pauuing="Suup"
anuioiu:giavity="centei"
anuioiu:textSize="Susp"

E"*%: &# - the iuentifiei to ueteimine the object uuiing couing
>)##&"7 - cieating space foi the object
7$)F&-5 - uefine the way the object positionsalignment
-+G-H&C+ - to set the size of the text
-+G- - stiings oi numbeis to uisplay foi the object

! To inciease Button Size anu align to the centei
- Change anuioiu:layout_wiuth to *&..D>)$+"- insteau wiap_content
- Type in the following coues:
anuioiu:pauuingTop=9:;<-9
anuioiu:pauuingBottom=9:;<-9
anuioiu:layout_maiginLeft=9:;<-9
anuioiu:layout_maiginRight=9:;<-9
anuioiu:giavity=9"+0#+,9
anuioiu:backgiounu=9=2>>?@A9

E"*%: >)##&"7I%> J cieating space at the top of the object
>)##&"7K%--%; - cieating space at the bottom of the object
.)5%0-D;)$7&"4+*- - cieating a left maiginal gap
.)5%0-D;)$7&"/&7=- - cieating a iight maiginal gap
<)1L7$%0"# - to change the backgiounu coloui of the
object {uses html coloui coue}





MG+$1&,+

1. Cieate 2 moie scieens similai to the example above{scieenS, scieen4}
2. Each scieen shoulu have 1 Text view anu 2 Buttons
S. Each scieen shoulu have a uiffeient backgiounu coloui.
4. Textview's text shoulu be the name of the scieen backgiounu coloui.
S. Button names shoulu be the name of the othei 2 scieen colouis.

?>-&%").:
N 6$+)-+ +)1= <0--%" -% =)F+ -=+ ,);+ <)1L7$%0"# 1%.%0$ ), &-, ");+O

9%-+: The coloui coues can be obtain thiough the coloui palette in photoshop oi
http:html-coloi-coues.info#BTNL_Coloi_Pickei

Anda mungkin juga menyukai