Computers/Android

class 내에서 layout background 수정

emzei 2012. 6. 20. 20:07
setContentView(R.layout.main);

 
// Now get a handle to any View contained
 
// within the main layout you are using
 
View someView = findViewById(R.id.randomViewInMainLayout);

 
// Find the root view
 
View root = someView.getRootView()

 
// Set the color
  root
.setBackgroundColor(android.R.color.red);



'Computers > Android' 카테고리의 다른 글

0. AVD 생성하기  (0) 2012.06.20
0. Android Development Toolkit - ADT plugin  (0) 2012.06.20
0. Android SDK  (0) 2012.06.20
0. Android를 위한 Eclipse 설치  (0) 2012.06.20
0. JDK 버전 확인  (0) 2012.06.20