Ktttt WimTJrr

v-l.".-1 -j 71- " 1 . 0" ejj" >d a t -6'

—tii' !.:" -i*- J 'J- 1 !>:l si rft J A' V-

■nli,. • :*nir . i="ht c j.: /¿jchewas. andt-'id. cctr apk/ r-3/android"

andrc-rd: layout. \ndch="f i 11 patent " ai;drc 1 i: i ur _height""wt ap content"

■mdr : u;d«"l?dt*avabie/b 1 ue" an ii -id:padri lncf»**iOdl'p"

v: android: id-"8-»id/ label" android: layout_vidch«"f ii Lparent" ai-di j.- i jr.' = "«rap content" ti.dr id: "

' ill :-/• i^Str? t'l':iff !•=■:•.' lew&T^'g

»ndt..:d: entry" ir.lr old: layout width«"* iJ. I patent"*

atldr : i A: la you', he icjht = "vrap_Content"

a«.-.:: : A ■ b-^T/.gr a < = " 0» a nd r O i d: d t a v abI * / ed 11 bo x _ bsc kcjr o urtd "

anOL ..Id: layout be ! O w= "p id/ I abe i "

-»t.d; •. td 1 d» "6 + id/cance i" and; • .1; Layout uidth»"vrap_eontent " ti 1 .I 1.1 vi.1.- i> iijr.r = "irrai cofttent" tr 1 d 1;id¿layout below«"!'«id/entry" android: layour_ ^ i 1 flnF'areut F ) dftt ""ttue"

1 . . .1 '--- - « . » « n . ■ » ___ _ „ n f* ' :'JZ •»

: J Console S»u-ck Cl LocC»t Properties O Pile Explorer CI Resource Explorer

Property Value

<?xrnl version- "1.0" encoding="utf-8"?> <Relat i veLayout Android:id "@+id/le£t"

xmlns : Android "ht tip: //schemas . Androi d . com/apk/res/Android" Android:1a yout wi dth="£ i11 pa ren t" Android:-riyouL height "fill parent">

<TextView Android: .id "(?» id/viewl" Android:background="@drawable/biue" Android:layout width "fill parent"

Android:liyout height "50px" Android: text "^.—^M^--^" /> <TextView Android:]d»id/view2" And ro i d:backg r o und-"@ d ra wab1e/ye11ow" Android:layout width-"fill parent"

Android:layout_height "50px" Android:layout below="@id/viewl" Android: text- "35—Z*jjft" /> </Re-la t i veLayout>

• JL>CJUi ^ RelativeLayout flijnj. y.lli&ffi \ Text"View0

• XiJ'ifi Text View, 5if A "@drawable/blue'\ i^ffi&& res/values/ string.xml VJllikUttl, ftf*j*j<drawable name=>ellow'>#77fflfD0</drawable>?.iiil<J#77f!TO0o

• *t J-ofi TextView i£gtW. r&WteSftftifi ^ TextView Ift Ki£, BP Androidiiayout height="50px" Android:layout below="@id/view I" „

ftm 7-5 "liWiT-feBl^ um : ill SB -fli" ill "»-»SB i«" KMftJK -t

RelativcLayoul. iA^h RelativeLayout {\- right.xml RiWi^J'ftfll left.xml

iJ"J|- Activity Layout MX ft - K41JMHW:

80verr ide public void or.Create (Bundle savedlnstanceState) \

super.onCreate(savedlnst anceState);

Li nearLayout layoutMain = new LinearLayout(this);

I a you t.Ma in. setOrientat ion (LinearLayout. HORIZONTAL) ;

Layout Inflater inflate - (LayoutInflater)

getSystemService(Context .LAYOUT INFLATER_SERVICE);

RelativeLayout layoutLeft (RelaLiveLayout) inflate.inflate(

R.layout.left, null);

RelativeLayout. layoutRight = (RelativeLayout) inf late. inf late ( R.layout.right, null);

Relat ivel.ayout.LayoutParams relParara = new RelativeLayout .Layout.Params ( RelativeLayout.LayoutParams.WRAP CONTENT, RelativeLayout.LayoutParams.WRAP CONTENT); layoutMain.addview(layoutLeft, 100, 100);

layout.Main.addView (layoutRight, relParam) ; ]

• rfVWft.M Activity 'I'. ftfiJil: t" Layout ill ^ Activity ffijii^h Layout M& XML

& 7 « -Android iLft ^VI'^XMe ^liS/jffiiW View ill Layout fflufW Java /tit Activity «1». 'h f

¿/ffi. ft if] tJ lLWQ'M. Layout, infy^j: LinearLayout layoutMain new LinearLayout( this).

• layoutMain.setOrientarion(LinearLayout.HORJZONTAL)irV/^J>(1=JI], AfijiA t LinearLayout

• setContentView(layoutMain)o ftftffjftlifcftj layoutMain flljlt Activity iitij

• Layoutlnflater inflate = (Layoutlnflater) getSystemService(Context.LAYOUT INFLATER SERVICE)® iUS'J t Layoutlnflater ujXML M'frMjiM'li&'U MWu jt Pi 'I. JjR—'h View o

• RelativeLayout layoutLefl = (RelativeLayout) inflate.inflate(R.layout.left, null)., i)««]J|| inflate h left.xml iftirWUf. tf'fcrit ^ RelativeLayout ^o

• RelativeLayout.LayoutParams relParam = new RelativeLayout.LayoutParams(RelativeLayout.Layout Params.WRAP CONTENT,RelativeLayout. Lay outParams.WRAP_CONTENT) „ 'k ■ ^ Relative Layout ¿SJflftfJ LayoutParamSo

• layoutMain.addView(layoutLeft, 100, 100)4$ layoutLeft jjslmSI layoutMain ft'l1® t

• layout Main.add View(layoutRight, relParam)^ layoutRight SSlHlSJ layouMain Mirt!. it't1®

1 Is- RelativeLayout.LayoutParams.,

----------------,-------------------— —----------------------- ---------------------------------------

LayoutParams? tb&tf-&

LayoutParams. ALayou j ¿¡48«). ViewiPASHi^EWi, 4fritfii* Layout

; Layouttttaatt^wttiifffta.

! § 41, ift Layout til ft LayoutParams

/jf^ft LayoutParams ^ Android.view. ViewGroup.LayoutParams

-^«Sj&fWiU ifllftftl^ S + ffJ layoutMain.addView(layoutLeft, 100, 100)i,", iij, ® 100 Mil:

ffl&MfiL

• WRAP CONTENT, View [ftX'hiV,/,iMi\: View »K&Mrt f?KP »'J fiiW Android.view.ViewGroup.LayoutParams fft t® AbsoluteLayout, t'tlii

Layout! nflater?

| &t $ ill * # XML ft * % Xft $ & View W H. tB "f tt 1 Jl W =»J® > >A XML

' " ; Activity ft oncreate

Layoutlnflater inflate = (LayoutInflater) getSystemService(Context. LAYOUT INFLATER_SERVICE);

Linear-Layout layout = (LinearLayout) inflate, inflate (R. layout .exOl_ 0"/, null) ;

• Layoutlnflater ^'MWMH getSystemService /j«;-*!*®, ifiJS'NSftSi

» -1 xmi M.iHi&wH 1 "Twu]& xmi fexmm*

aftffJ^tffSBH^ Button / tm^^to^'i'-.^^Ji 'iJcMlIl TableLayout

W&mmKlM F TableLayout .

"it £ & TableLayout ? r/lxtoiR ^ T* TableLayout A-ft i * IT WAS.

0 0

Post a comment