FIT2081 Lecture Notes - Lecture 4: Display Device, Material Design, Interaction Design

187 views6 pages
ConstraintLayout !"#$%&'"
()*)+%$,-.)"/0-1*"")23)Layout .4*.)-$,*.,")5,$6)31/%+)1*62/."
7#$%&'"
8..*-4)Views .2)1*62/.)"%+,"942$%:2&.*1)*&+)5,$.%-*1)'/%+,1%&,")
*&+)2.4,$)Views
;*&),<#*&+)*&+)-211*#",)+,#,&+%&')2&)5%,=#2$.)23)+%"#1*6)+,5%-,
>,&"%2&)2&)"#$%&'")-*&)0,)0%*",+).2=*$+")2&,),&+)06)*)#,$-,&.*',
>6#,"
??+#)@32$),'A)!3%<,+)*&+)*0"21/.,)=%+.4
§
BC*.-4D-2&".$*%&.B
E%,=)0,-2C,")+6&*C%-)*&+)2--/#%,")*11)*5*%1*01,)
"#*-,
F
G2$%:2&.*1)0%*")&2),33,-.F
H,,+")-2&".$*%&.")2&)02.4)"%+,").2)=2$IF
§
B=$*#D-2&.,&.B
E%,=)2--/#%,")J/".),&2/'4)"#*-,).2)=$*#)-2&.,&.F
§
K
G,1#")=%.4)+,,#!&,".%&')#$201,C)=%.4)&2$C*1)Layouts
L/%+,1%&,"
G2$%:2&.*1)*&+)5,$.%-*1)%&5%"%01,)=*11"
§
G,1#")0/%1+)$,"#2&"%5,M)+6&*C%-)1*62/.
§
K
@8..$%0/.,")=%&+2=A
@N%*"A
View
()*)-1*"")%&)O*5*).4*.)$,#$,",&.").4,)0/%1+%&')012-I)32$)PQ)-2C#2&,&."
ViewGroup
8112=")Views .2)0,)&,".,+
K
()%&5%"%01,)View -2&.*%&,$).4*.)+,3%&,")42=)-4%1+)5%,=")*$,)1*%+)2/.)@,')
'$%+M)5,$.%-*1)1%".A
()0*",)-1*"")32$)1*62/.")*&+)5%,=")-2&.*%&,$"
Layout
()*)"/0-1*"")23)ViewGroup
()$,"#2&"%01,)32$)C*&*'%&')"%:,M)#2"%.%2&)*&+)0,4*5%2/$)23)*11)
.4,)Views %.)-2&.*%&"
R%&,*$M);22$+%&*.2$M)S,1*.%5,)T)>*01,
§
N,".).2)*52%+)&,".%&').22)+,,#16)!%&,33%-%,&.)*&+)/&-1,*$
§
U$2#,$.%,"
N,12&').2)View 20JV")-1*"")@,'W)TextView 4*")setPadding
C,.42+)%&.,$&*1).2)%.",13A
K
LayoutParams
()/",+)06)E%,=").2).,11) #*$,&.")42=).4,6)=*&.).2)0,)1*%+)2/.
N,12&').2)-1*"")23)R*62/.)*)E%,=)%")-2&.*%&,+)%&
X*-4)1*62/.)4*")%.")2=&)",.M)"%&-,),*-4)Layout .6#,)4*")%.")2=&)
*..$%0/.,"9"#,-").2)"#,-%36).2)%.")#*$,&.
android:layout_width/height
"match_parent" !J/".)*")0%')*")#*$,&.)C%&/")#*++%&'
"wrap_content" !J/".)0%'),&2/'4).2),&-12",)-2&.,&.)C%&/")
#*++%&'
7,..%&')layout_width .2)BY+#B)@3%<,+A)%C#$25,")1*62/.)
#,$32$C*&-,M)"%&-,)"wrap_content" $,Z/%$,")"6".,C).2)
-*1-/1*.,)*&)/1.%C*.,16)%$$,1,5*&.)=%+.4M)"%&-,)*&2.4,$)-*1-)%")
$,Z/%$,+).2)3%11)$,C*%&%&')=%+.4)"#*-,
;$,*.%&')*)PQ
P[R
\,-1*$,) ,1,C,&.")%&)][R
8&+$2%+)#$25%,")".$*%'4.3=+)][R)52-*0).4*.)
-2$$,"#2&+").2).4,)E%,=)-1*"",")*&+)"/0-1*"",")@,')
.42",)32$)=%+',.")^)1*62/."AM)*")=,11)*").4,)".$/-./$,)*&+)
&*C%&')23).4,)-1*"",")*&+)C,.42+"
§
_W
Q&".*&.%*.,)1*62/.),1,C,&.")*.)$/&.%C,
8##)-*&)-$,*.,)View *&+)ViewGroup 20J")
#$2'$*C*.%-*116)*&+)C*&%#).4,%$)#$2#,$.%,"
§
`2$),*-4)=%+',.a
P",")setPropName C,.42+"_W
Q&".*&.%*.,)LayoutParams 20J)32$)=%+',.)@.6#,)
+,#,&+")2&)-2&.*%&%&')1*62/.),'W)S,1*.%5,R*62/.A
bW
Q&".*&.%*.,)1*62/.)23)$,Z/%$,+).6#,cW
P",)R*62/.V")*++EQ,=)C,.42+).2)*++)=%+',.)*&+)
"#,-%36)*""2-%*.,+)LayoutParams 20J
dW
§
bW
K
E7)O*5*a
G*")0,..,$)R^`
N,..,$).2)",#*$*.,)#$,",&.*.%2&)3$2C)-2+,)-2&.$211%&')%.")
0,4*5%2/$)@%W,W)",#*$*.%&')1*62/.)*&+)12'%-A
;*&)C2+%369*+*#.)PQ)+,"-$%#.%2&")=%.42/.)4*5%&').2)
C2+%36)"2/$-,)-2+,)*&+)$,-2C#%1,)32$)+%33)-2&3%'/$*.%2&"
§
X*"%,$).2)5%"/*1%",)PQ)".$/-./$,
;*&)-$,*.,)+%33)1*62/.")23)+%33)"-$,,&)"%:,"
View Layout #*$*C,.,$")-*&)0,)*)0%.)-2C#1%-*.,+)%&)-2+,
K
))))]))))&2.)*")+6&*C%-)+/$%&')$/&.%C,
N,".)=*6).2)$,C25,)+,#,&+,&-6a)$,C25,)onClick 3$2C)][RM)/",)
[element].setOnClickListener
K
(new View.onClickListener()
{ onClick() }
);
>,<.)%&)PQ
81=*6")"#,-%36),*-4)".$%&')*")*)$,"2/$-,
8112=")62/).2)C*&*',)*11)PQ).,<.)%&)*)"%&'1,)12-M)C*I%&').,<.)
,*"%,$).2)3%&+)*&+)/#+*.,
8112=")62/).2)12-*1%",)*##).2)+%33)1*&'/*',")06)#$25%+%&')
*1.,$&*.%5,)+,3%&%.%2&")32$),*-4)".$%&')$,"2/$-,
K
7.61,
()*)-211,-.%2&)23)*..$%0/.,")"#,-%36%&').4,)122I)*&+)32$C*.)32$)*)E%,=9=%&+2=
;*&)"#,-%36)*..$%0/.,")@,')4,%'4.M)#*++%&'M)32&.)-212/$)*&+)"%:,M)0'-212/$AK
\,3%&,+)%&)*&)][R)$,"2/$-,)",#*$*.,)3$C)][R)"#,-%36%&')1*62/.
e/%:)Z&)0,12=)'22+),<*C#1,
K
Q&4,$%.*&-,
U*$,&.)*..$%0/.,)1,.")62/)"#,-%36)*)".61,)3$C)=4%-4)62/$)".61,)
"42/1+)%&4,$%.)*..$%0/.,"
;*&)%&4,$%.)*..$%0/.,")3$2C),<%".%&')".61,)*&+)+,3%&,)2&16)
*..$%0/.,")62/)=*&.).2)-4*&',9*++
§
@%W,W)".61,)-*"-*+,")*$,)#2""%01,A
K
>4,C,
()*)".61,)*##1%,+).2)*&),&.%$,)8-.%5%.69*##)@%&)AndroidManifest.xmlA)$*.4,$)
.4*&)*&)%&+%5%+/*1)View
8112=")62/).2)+,3%&,)*)",.)23)*..$%0/.,")%&)2&,)#1*-,)@1%I,)*)".61,A)0/.).4,6)
*/.2C*.%-*116)*##16).4,",)*..$%0/.,").4$2/'42/.)62/$)*##
K
[*.,$%*1)\,"%'&
()*)-2C#$,4,&"%5,)'/%+,)32$)5%"/*1M)C2.%2&M)*&+)%&.,$*-.%2&)+,"%'&
;*&&2.)/",)*&6)[*.,$%*1).4,C,)=9).4,)".+)8-.%5%.6)"/#,$)-1*"")/",+)32$)
C*<)0*-I=*$+)-2C#*.%0%1%.6
K
;*1-/1*.2$8##
;*1-/1*.2$8##;2&R*6
f;*1-/1*.2$8##>*01,>2;2&g
How$many$XML$attributes$in$displayed$XML?
hW
What$is$"parent"?
U*$,&.)%")/",+).2)"#,-%36).4,)#$,!+,3%&,+)0*",)-1*"").4*.).4,)".61,)&,,+").2)
%&4,$%.)3$2CW
What$is$name$of$root$node?
$,"2/$-,"W
When$processed,$what$will$this$do?
>4%")][R)+,3%&,")*)".61,)-2&.*%&%&')*..$%0/.,").4*.)*$,)/",+).2)32$C*.).4,)
5%,=")%.)%")*##1%,+).2W
What$does$"@color/colorBG"$reference?
Q.)$,3,$,&-,")*&)*..$%0/.,)@-212/$A)3$2C).4,)-212/$)$,"2/$-,")3%1,W
What$is$the$purpose$of$layout_weight?
Q.)+,3%&,").4,)$*.%2)23)PQ)"#*-,).*I,&)/#)06).4,)$,"#,-.%5,)E%,=),1,C,&."W
How$many$columns$does$this$table$have?
>4,)&/C0,$)23)-,11") %&).4,)$2=)=%.4).4,)C2".)&/C0,$)23)-,11")=%11)0,).4,)
&/C0,$)23)-21/C&"W
Explain$about$horizontal$and$vertical$layout$of$the$widget.
G2$%:2&.*1a
C*.-4D-2&".$*%&.)%")0,%&')/",+)2&)02.4)"%+,"M)C,*&%&')%.)%")+6&*C%-)*&+)-*&)
2--/#6)*11) *5*%1*01,)"#*-,"W)>4,)&/C0,$")bY)*&+)?)+,3%&,).4,)&/C0,$)23)
#%<,1")=$.).2).4,)1,3.)*&+)$%'4.)$,"#,-.%5,16).4*.).4,)=%+',.)-*&V.),<-,,+W
E,$.%-*1a
\%C,&"%2&")&,,+).2)0,)3%<,+)*&+)*0"21/.,M)-*&&2.)-4*&',W
>4,)"#,-%3%,+)&/C0,$")bi)*&+)_i)C,*&).4*.).4,)0/..2&)4*").2)".*6M)=$.)
5,$.%-*1M)%&).4,)12=,$)jik)*&+)/##,$)?ik)23).4,)"-$,,&)-2&-/$$,&.16)*11).4,)
.%C,W
Many$developers$don't$like$using$the$onClick$property$of$a$widget,$and$
would$rather$complete$separation$of$presentation$and$logic.
If$you$set$a$button's$onClick$property$to$be$buttonClick,$code$the$event$
handler$so$the$button's$current$text$is$overwritten$with$the$word$"clicked".
public void buttonClick(View v) {
button b = (Button) v;
b.setText("clicked");
layout_weight
()"#,-%3%,").4,)*C2/&.)23)$,C*%&%&')"#*-,),*-4)View "42/1+)-2&"/C,M)
$,1*.%5,).2).4,)*C2/&.)-2&"/C,+)06)"%01%&')5%,="
l&,)',.")B_BM).4,)2.4,$)',.")BbBK
Week$4
>/,"+*6M) bm)[*6)bY_?
_YaiY
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in
ConstraintLayout !"#$%&'"
()*)+%$,-.)"/0-1*"")23)Layout .4*.)-$,*.,")5,$6)31/%+)1*62/."
7#$%&'"
8..*-4)Views .2)1*62/.)"%+,"942$%:2&.*1)*&+)5,$.%-*1)'/%+,1%&,")
*&+)2.4,$)Views
;*&),<#*&+)*&+)-211*#",)+,#,&+%&')2&)5%,=#2$.)23)+%"#1*6)+,5%-,
>,&"%2&)2&)"#$%&'")-*&)0,)0%*",+).2=*$+")2&,),&+)06)*)#,$-,&.*',
>6#,"
??+#)@32$),'A)!3%<,+)*&+)*0"21/.,)=%+.4
§
BC*.-4D-2&".$*%&.B
E%,=)0,-2C,")+6&*C%-)*&+)2--/#%,")*11)*5*%1*01,)
"#*-,
F
G2$%:2&.*1)0%*")&2),33,-.
F
H,,+")-2&".$*%&.")2&)02.4)"%+,").2)=2$I
F
§
B=$*#D-2&.,&.B
E%,=)2--/#%,")J/".),&2/'4)"#*-,).2)=$*#)-2&.,&.
F
§
K
G,1#")=%.4)+,,#!&,".%&')#$201,C)=%.4)&2$C*1)Layouts
L/%+,1%&,"
G2$%:2&.*1)*&+)5,$.%-*1)%&5%"%01,)=*11"
§
G,1#")0/%1+)$,"#2&"%5,M)+6&*C%-)1*62/.
§
K
@8..$%0/.,")=%&+2=A
@N%*"A
View
()*)-1*"")%&)O*5*).4*.)$,#$,",&.").4,)0/%1+%&')012-I)32$)PQ)-2C#2&,&."
()0*",)-1*"")32$)=%+',."M)=4%-4)*$,)/",+).2)-$,*.,) %&.,$*-.%5,)PQ)-2C#2&,&."
ViewGroup
8112=")Views .2)0,)&,".,+
K
()%&5%"%01,)View -2&.*%&,$).4*.)+,3%&,")42=)-4%1+)5%,=")*$,)1*%+)2/.)@,')
'$%+M)5,$.%-*1)1%".A
()0*",)-1*"")32$)1*62/.")*&+)5%,=")-2&.*%&,$"
Layout
()*)"/0-1*"")23)ViewGroup
()$,"#2&"%01,)32$)C*&*'%&')"%:,M)#2"%.%2&)*&+)0,4*5%2/$)23)*11)
.4,)Views %.)-2&.*%&"
R%&,*$M);22$+%&*.2$M)S,1*.%5,)T)>*01,
§
N,".).2)*52%+)&,".%&').22)+,,#16)!%&,33%-%,&.)*&+)/&-1,*$
§
U$2#,$.%,"
N,12&').2)View 20JV")-1*"")@,'W)TextView 4*")setPadding
C,.42+)%&.,$&*1).2)%.",13A
K
LayoutParams
()/",+)06)E%,=").2).,11) #*$,&.")42=).4,6)=*&.).2)0,)1*%+)2/.
N,12&').2)-1*"")23)R*62/.)*)E%,=)%")-2&.*%&,+)%&
X*-4)1*62/.)4*")%.")2=&)",.M)"%&-,),*-4)Layout .6#,)4*")%.")2=&)
*..$%0/.,"9"#,-").2)"#,-%36).2)%.")#*$,&.
android:layout_width/height
"match_parent" !J/".)*")0%')*")#*$,&.)C%&/")#*++%&'
"wrap_content" !J/".)0%'),&2/'4).2),&-12",)-2&.,&.)C%&/")
#*++%&'
7,..%&')layout_width .2)BY+#B)@3%<,+A)%C#$25,")1*62/.)
#,$32$C*&-,M)"%&-,)"wrap_content" $,Z/%$,")"6".,C).2)
-*1-/1*.,)*&)/1.%C*.,16)%$$,1,5*&.)=%+.4M)"%&-,)*&2.4,$)-*1-)%")
$,Z/%$,+).2)3%11)$,C*%&%&')=%+.4)"#*-,
;$,*.%&')*)PQ
P[R
\,-1*$,) ,1,C,&.")%&)][R
8&+$2%+)#$25%,")".$*%'4.3=+)][R)52-*0).4*.)
-2$$,"#2&+").2).4,)E%,=)-1*"",")*&+)"/0-1*"",")@,')
.42",)32$)=%+',.")^)1*62/."AM)*")=,11)*").4,)".$/-./$,)*&+)
&*C%&')23).4,)-1*"",")*&+)C,.42+"
§
_W
Q&".*&.%*.,)1*62/.),1,C,&.")*.)$/&.%C,
8##)-*&)-$,*.,)View *&+)ViewGroup 20J")
#$2'$*C*.%-*116)*&+)C*&%#).4,%$)#$2#,$.%,"
§
`2$),*-4)=%+',.a
P",")setPropName C,.42+"
_W
Q&".*&.%*.,)LayoutParams 20J)32$)=%+',.)@.6#,)
+,#,&+")2&)-2&.*%&%&')1*62/.),'W)S,1*.%5,R*62/.A
bW
Q&".*&.%*.,)1*62/.)23)$,Z/%$,+).6#,
cW
P",)R*62/.V")*++EQ,=)C,.42+).2)*++)=%+',.)*&+)
"#,-%36)*""2-%*.,+)LayoutParams 20J
dW
§
bW
K
E7)O*5*a
G*")0,..,$)R^`
N,..,$).2)",#*$*.,)#$,",&.*.%2&)3$2C)-2+,)-2&.$211%&')%.")
0,4*5%2/$)@%W,W)",#*$*.%&')1*62/.)*&+)12'%-A
;*&)C2+%369*+*#.)PQ)+,"-$%#.%2&")=%.42/.)4*5%&').2)
C2+%36)"2/$-,)-2+,)*&+)$,-2C#%1,)32$)+%33)-2&3%'/$*.%2&"
§
X*"%,$).2)5%"/*1%",)PQ)".$/-./$,
;*&)-$,*.,)+%33)1*62/.")23)+%33)"-$,,&)"%:,"
View Layout #*$*C,.,$")-*&)0,)*)0%.)-2C#1%-*.,+)%&)-2+,
K
))))]))))&2.)*")+6&*C%-)+/$%&')$/&.%C,
N,".)=*6).2)$,C25,)+,#,&+,&-6a)$,C25,)onClick 3$2C)][RM)/",)
[element].setOnClickListener
K
(new View.onClickListener()
{ onClick() }
);
>,<.)%&)PQ
81=*6")"#,-%36),*-4)".$%&')*")*)$,"2/$-,
8112=")62/).2)C*&*',)*11)PQ).,<.)%&)*)"%&'1,)12-M)C*I%&').,<.)
,*"%,$).2)3%&+)*&+)/#+*.,
8112=")62/).2)12-*1%",)*##).2)+%33)1*&'/*',")06)#$25%+%&')
*1.,$&*.%5,)+,3%&%.%2&")32$),*-4)".$%&')$,"2/$-,
K
7.61,
()*)-211,-.%2&)23)*..$%0/.,")"#,-%36%&').4,)122I)*&+)32$C*.)32$)*)E%,=9=%&+2=
;*&)"#,-%36)*..$%0/.,")@,')4,%'4.M)#*++%&'M)32&.)-212/$)*&+)"%:,M)0'-212/$AK
\,3%&,+)%&)*&)][R)$,"2/$-,)",#*$*.,)3$C)][R)"#,-%36%&')1*62/.
e/%:)Z&)0,12=)'22+),<*C#1,
K
Q&4,$%.*&-,
U*$,&.)*..$%0/.,)1,.")62/)"#,-%36)*)".61,)3$C)=4%-4)62/$)".61,)
"42/1+)%&4,$%.)*..$%0/.,"
;*&)%&4,$%.)*..$%0/.,")3$2C),<%".%&')".61,)*&+)+,3%&,)2&16)
*..$%0/.,")62/)=*&.).2)-4*&',9*++
§
@%W,W)".61,)-*"-*+,")*$,)#2""%01,A
K
>4,C,
()*)".61,)*##1%,+).2)*&),&.%$,)8-.%5%.69*##)@%&)AndroidManifest.xmlA)$*.4,$)
.4*&)*&)%&+%5%+/*1)View
8112=")62/).2)+,3%&,)*)",.)23)*..$%0/.,")%&)2&,)#1*-,)@1%I,)*)".61,A)0/.).4,6)
*/.2C*.%-*116)*##16).4,",)*..$%0/.,").4$2/'42/.)62/$)*##
K
[*.,$%*1)\,"%'&
()*)-2C#$,4,&"%5,)'/%+,)32$)5%"/*1M)C2.%2&M)*&+)%&.,$*-.%2&)+,"%'&
;*&&2.)/",)*&6)[*.,$%*1).4,C,)=9).4,)".+)8-.%5%.6)"/#,$)-1*"")/",+)32$)
C*<)0*-I=*$+)-2C#*.%0%1%.6
K
;*1-/1*.2$8##
;*1-/1*.2$8##;2&R*6
f;*1-/1*.2$8##>*01,>2;2&g
How$many$XML$attributes$in$displayed$XML?
hW
What$is$"parent"?
U*$,&.)%")/",+).2)"#,-%36).4,)#$,!+,3%&,+)0*",)-1*"").4*.).4,)".61,)&,,+").2)
%&4,$%.)3$2CW
What$is$name$of$root$node?
$,"2/$-,"W
When$processed,$what$will$this$do?
>4%")][R)+,3%&,")*)".61,)-2&.*%&%&')*..$%0/.,").4*.)*$,)/",+).2)32$C*.).4,)
5%,=")%.)%")*##1%,+).2W
What$does$"@color/colorBG"$reference?
Q.)$,3,$,&-,")*&)*..$%0/.,)@-212/$A)3$2C).4,)-212/$)$,"2/$-,")3%1,W
What$is$the$purpose$of$layout_weight?
Q.)+,3%&,").4,)$*.%2)23)PQ)"#*-,).*I,&)/#)06).4,)$,"#,-.%5,)E%,=),1,C,&."W
How$many$columns$does$this$table$have?
>4,)&/C0,$)23)-,11") %&).4,)$2=)=%.4).4,)C2".)&/C0,$)23)-,11")=%11)0,).4,)
&/C0,$)23)-21/C&"W
Explain$about$horizontal$and$vertical$layout$of$the$widget.
G2$%:2&.*1a
C*.-4D-2&".$*%&.)%")0,%&')/",+)2&)02.4)"%+,"M)C,*&%&')%.)%")+6&*C%-)*&+)-*&)
2--/#6)*11) *5*%1*01,)"#*-,"W)>4,)&/C0,$")bY)*&+)?)+,3%&,).4,)&/C0,$)23)
#%<,1")=$.).2).4,)1,3.)*&+)$%'4.)$,"#,-.%5,16).4*.).4,)=%+',.)-*&V.),<-,,+W
E,$.%-*1a
\%C,&"%2&")&,,+).2)0,)3%<,+)*&+)*0"21/.,M)-*&&2.)-4*&',W
>4,)"#,-%3%,+)&/C0,$")bi)*&+)_i)C,*&).4*.).4,)0/..2&)4*").2)".*6M)=$.)
5,$.%-*1M)%&).4,)12=,$)jik)*&+)/##,$)?ik)23).4,)"-$,,&)-2&-/$$,&.16)*11).4,)
.%C,W
Many$developers$don't$like$using$the$onClick$property$of$a$widget,$and$
would$rather$complete$separation$of$presentation$and$logic.
If$you$set$a$button's$onClick$property$to$be$buttonClick,$code$the$event$
handler$so$the$button's$current$text$is$overwritten$with$the$word$"clicked".
public void buttonClick(View v) {
button b = (Button) v;
b.setText("clicked");
layout_weight
()"#,-%3%,").4,)*C2/&.)23)$,C*%&%&')"#*-,),*-4)View "42/1+)-2&"/C,M)
$,1*.%5,).2).4,)*C2/&.)-2&"/C,+)06)"%01%&')5%,="
l&,)',.")B_BM).4,)2.4,$)',.")BbB
K
Week$4
>/,"+*6M) bm)[*6)bY_? _YaiY
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in

Document Summary

= a class in java that represents the building block for ui components. = base class for widgets, which are used to create interactive ui components. = invisible view container that defines how child views are laid out (eg grid, vertical list) = base class for layouts and views containers. = responsible for managing size, position and behaviour of all the views it contains. Best to avoid nesting too deeply - inefficient and unclear. Belong to view obj"s class (eg. textview has setpadding method internal to itself) = used by views to tell parents how they want to be laid out. Belong to class of layout a view is contained in. Each layout has its own set, since each layout type has its own attributes/specs to specify to its parent android:layout_width/height. match_parent - just as big as parent minus padding. wrap_content - just big enough to enclose content minus padding.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers