안드로이드 개발 질문/답변
(글 수 45,052)
iPhone 개발하다가 android로 넘어 왔습니다.
View.hidden = NO; 이런식이면 View가 Hidden이 되었는데
안드로이드에선 도통 찾을수가 없네요.
view.setVisibility(2); 이런식으로 해도 계속 남아 있구요.
hidden에 관한것 찾을수가 없네요.
혹시 아시는분 답변 부탁 드립니다.
View.hidden = NO; 이런식이면 View가 Hidden이 되었는데
안드로이드에선 도통 찾을수가 없네요.
view.setVisibility(2); 이런식으로 해도 계속 남아 있구요.
hidden에 관한것 찾을수가 없네요.
혹시 아시는분 답변 부탁 드립니다.
2010.03.05 10:18:27
Controls the initial visibility of the view.
Must be one of the following constant values.
Constant | Value | Description |
---|---|---|
visible | 0 | Visible on screen; the default value. |
invisible | 1 | Not displayed, but taken into account during layout (space is left for it). |
gone | 2 | Completely hidden, as if the view had not been added. |
흑 어쩐지 아무리 해도 안되더라구요. ㅠㅠ 고맙습니다!
2를 넣으면 안되고요, 4를 넣야 되요 ㅋㅋ
View view = findViewById(id);
view.setVisibility(View.INVISIBLE);
/**
* This view is visible. Use with {@link #setVisibility}.
*/
public static final int VISIBLE = 0x00000000;
/**
* This view is invisible, but it still takes up space for layout purposes.
* Use with {@link #setVisibility}.
*/
public static final int INVISIBLE = 0x00000004;