1

fr KiMjRWS'i' Jffi 3 n, li|J 3 ^TableRow, f®-^ TableRow liiflJYiW^^tt. H-

^TableLayout xmlns:Android="http://schemas.Android.com/apk/res/Android" Android:layout width="fill jparent" Android:layout height = "fill_parent" Android:stretchColumns="l">

<TableRow>

<TextView Android:text="ffl^& : " Android:textStyle="boid" Android:gravity="right" Android:padding="3dip" />

<EditText Android:id=" (3 +id/user name" Android:padding="3dip"

Android:scrollHorizontally="true" />

</TableRow>

<TableRow>

<TextView Android: text=Mg^^fi^: " Android:LextStyie="bold" Android:gravity="right" Android:padding="3dip" />

<EditText Android:id="id/password" Android:password»"true" Android:padding "3dip" Android:scrolIHorizontally«"true" /> </TableRow>

<TableRow Android:gravi ty="right">

<Button Android:id="@+id/cancel" Android: text. -"IX/f=i" />

< Button Android rid + id/login" Android:text-l,g^M /> </TableRow> </TableLayout>

• TableLayout T—^&faftiJnj(TableLayout)o

• Table Row % f mtitt SJ&M -ft. ®-frUfflnl W il lllM/JllA ^Lfr. It ill ft

Q]| ^felM^FM-widget flfMHH

fflilitt.

Android 'I'&lft/ widget tfjti, JMaftftit UI 7C* (*»i>*iiJJiiLW> ft&Jflff.ff-W

m&^mi, immL nm^ Androidmrnm*

-l^m'. M Anroid 4'tl:«««!Wfflft« '4HH, -jf»Wtt^WttfflS'}£#

BMW««. ft&^-i ii fKJ I'M f 1-IM ir; fi<i ^ >j. ffii VtoRmm&tRftmtoft. wTWHH*«!«..

7.3.1 ftjit widget ft Eclipse 4»fitfi£ -^SftfJflBH. £t:^ex07 WidgctDemo, (1 ) »rife--WAFl o ffcfttf-S File-New-Android Project J5i >

(2 ) ft Si I I LJfir; +, Create new project in workspace JjJU

(3) »Aex07_WidgetDemo fllfciM£ # Activity W f/j''.

G'JM 11 WJlSiHl« 7-9 ffr/Ko ftllW 7-8 Ifr/JN". ftfi'J& ex07 WidgetDemo fig U WW" filial -t MainActivity, ii&StfilSffleiT-MAU, tf H&ttimZtt MainActivity.java, »iVXftMR-Mfoff) onCreate b'P/f/K:

public void onCreate(Bundle savedlnstanceState) { super.onCreate(savedlnstanceState); seLCon Lent View (R. layout, .main) ;

f- Re* Android Project

*cw Andrott Projrct

Cfl^Mtl

Cr»»i« >»vj«<t ir. (Hki)«« Cr.il» yrtjlct fr* uiltinc live«

Ci luitt

Was this article helpful?

0 0

Post a comment