안드로이드 개발 질문/답변
(글 수 45,052)
엑티비티에서 라고 레이아웃을 잡고
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.detail);
TextView info = (TextView)findViewById(R.id.detail_information);
if(조건에 따라서 )
info.setVisibility(0); 라고 텍스트뷰를 hidden시킬려고헀는데
생각과 다르게 되지 않더라고요
텍스트를 조건에 따라 보였다 안보였다 하고 싶은데
setContentView(R.layout.detail); 를 미리 선언해서 그런지 안되던데요
방법좀..부탁드립니다.
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.detail);
TextView info = (TextView)findViewById(R.id.detail_information);
if(조건에 따라서 )
info.setVisibility(0); 라고 텍스트뷰를 hidden시킬려고헀는데
생각과 다르게 되지 않더라고요
텍스트를 조건에 따라 보였다 안보였다 하고 싶은데
setContentView(R.layout.detail); 를 미리 선언해서 그런지 안되던데요
방법좀..부탁드립니다.




그러므로 setVisibility(View.INVISIBLE); or setVisibility(View.GONE);로 hidden 시켜보세요