Android

Android


14.HILOS Y CONTROLADORES

Página 140 de 286

n

t

a

t

i

o

n

=

"

v

e

r

t

i

c

a

l

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

l

a

y

o

u

t

_

w

i

d

t

h

=

"

f

i

l

l

_

p

a

r

e

n

t

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

l

a

y

o

u

t

_

h

e

i

g

h

t

=

"

f

i

l

l

_

p

a

r

e

n

t

"

 

 

 

 

 

 

>

 

 

<

T

e

x

t

V

i

e

w

 

 

 

 

 

 

a

n

d

r

o

i

d

:

t

e

x

t

C

o

l

o

r

=

"

#

5

5

0

0

0

0

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

t

e

x

t

S

i

z

e

=

"

2

5

s

p

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

l

a

y

o

u

t

_

w

i

d

t

h

=

"

f

i

l

l

_

p

a

r

e

n

t

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

l

a

y

o

u

t

_

h

e

i

g

h

t

=

"

w

r

a

p

_

c

o

n

t

e

n

t

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

t

e

x

t

=

"

@

s

t

r

i

n

g

/

h

e

l

l

o

"

 

 

 

 

 

 

a

n

d

r

o

i

d

:

i

d

=

"

@

+

i

d

/

t

e

x

t

o

1

"

 

 

 

 

 

 

/

>

<

/

L

i

n

e

a

r

L

a

y

o

u

t

L

a

a

c

t

i

v

i

d

a

d

H

i

l

o

s

.

j

a

v

a

e

s

l

a

s

i

g

u

i

e

n

t

e

:

p

a

c

k

a

g

e

e

s

.

u

g

r

.

a

m

a

r

o

;

i

m

p

o

r

t

a

n

d

r

o

i

d

.

a

p

p

.

A

c

t

i

v

i

t

y

;

i

m

p

o

r

t

a

n

d

r

o

i

d

.

o

s

.

B

u

n

d

l

e

;

i

m

p

o

r

t

a

n

d

r

o

i

d

.

o

s

.

H

a

n

d

l

e

r

;

i

m

p

o

r

t

a

n

d

r

o

i

d

.

o

s

.

M

e

s

s

a

g

e

;

i

m

p

o

r

t

a

n

d

r

o

i

d

.

w

i

d

g

e

t

.

T

e

x

t

V

i

e

w

;

p

u

b

l

i

c

c

l

a

s

s

H

i

l

o

s

e

x

t

e

n

d

s

A

c

t

i

v

i

t

y

{

 

 

 

 

 

 

H

a

n

d

l

e

r

h

a

n

d

l

e

r

=

n

e

w

C

o

n

t

r

o

l

a

d

o

r

(

)

;

 

 

 

 

 

 

T

e

x

t

V

i

e

w

t

e

x

t

o

1

,

t

e

x

t

o

2

;

 

 

 

 

 

 

@

O

v

e

r

r

i

d

e

 

 

 

 

 

 

p

u

b

l

i

c

v

o

i

d

o

n

C

r

e

a

t

e

(

B

u

n

d

l

e

s

a

v

e

d

I

n

s

t

a

n

c

e

S

t

a

t

e

)

{

 

 

 

 

 

 

 

 

 

 

s

u

p

e

r

.

o

n

C

r

e

a

t

e

(

s

a

v

e

d

I

n

s

t

a

n

c

e

S

t

a

t

e

)

;

 

 

 

 

 

 

 

 

 

 

s

e

t

C

o

n

t

e

n

t

V

i

e

w

(

R

.

l

a

y

o

u

t

.

m

a

i

n

)

;

 

 

 

 

 

 

 

 

 

 

t

e

x

t

o

1

=

(

T

e

x

t

V

i

e

w

)

f

i

n

d

V

i

e

w

B

y

I

d

(

R

.

i

d

.

t

e

x

t

o

1

)

;

 

 

 

 

 

 

 

 

 

 

H

i

l

o

h

i

l

o

1

=

n

e

w

H

i

l

o

(

1

0

,

1

0

0

)

;

 

 

 

 

 

 

 

 

 

 

H

i

l

o

h

i

l

o

2

=

n

e

w

H

i

l

o

(

5

,

2

0

0

)

;

 

 

 

 

 

 

 

 

 

 

h

i

l

o

2

.

s

e

t

P

r

i

o

r

i

t

y

(

7

)

;

 

 

 

 

 

 

 

 

 

 

h

i

l

o

1

.

s

t

a

r

t

(

)

;

 

 

 

 

 

 

 

 

 

 

h

i

l

o

2

.

s

t

a

r

t

(

)

;

 

 

 

 

 

 

}

 

 

 

 

 

 

c

l

a

s

s

H

i

l

o

e

x

t

e

n

d

s

T

h

r

e

a

d

{

 

 

 

 

 

 

Ir a la siguiente página

Report Page