FILL_PARENT와 MATCH_PARENT 는 무엇이 다를까?
/**
* Special value for the height or width requested by a View.
* FILL_PARENT means that the view wants to be as big as its parent,
* minus the parent's padding, if any. This value is deprecated
* starting in API Level 8 and replaced by {@link #MATCH_PARENT}.
*/
@SuppressWarnings({"UnusedDeclaration"})
@Deprecated
public static final int FILL_PARENT = -1;
/**
* Special value for the height or width requested by a View.
* MATCH_PARENT means that the view wants to be as big as its parent,
* minus the parent's padding, if any. Introduced in API Level 8.
*/
public static final int MATCH_PARENT = -1;
FILL_PARENT와 MATCH_PARENT는 정의된 값이 -1로 같다.
FILL_PARENT는 API8 부터 deprecated가 된다. 하위 호환을 위해 FILL_PARENT가 남았있는 것이고 가독성과 일관성이 있는 MATCH_PARENT 가 앞으로 사용될 예정이다.
'Android 안드로이드' 카테고리의 다른 글
안드로이드 앱에 AdMob 광고 달기 (0) | 2014.08.02 |
---|---|
안드로이드 앱에 사운드 효과 주기 (0) | 2014.07.28 |
Component (0) | 2014.07.27 |
Intent 활용 예제 Activity 하나만 열어본다 (0) | 2014.07.27 |
WebView 기본 세팅 (0) | 2014.07.25 |