Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Linux
- 안드로이드
- 이클립스
- opengl
- HTML
- 인텐트
- Android
- Java
- TOEIC
- 영어
- 걸스데이
- 바닐라루시
- xml
- Looper
- error
- 쓰레드
- rainbow
- opencv
- 서비스
- 레인보우
- Intent
- 자바
- Eclipse
- 네트워크보안
- 엑티비티
- 토익
- 네트워크
- 브로드케스트 리시버
- 뮤직비디오
- 배다해
Archives
- Today
- Total
W.A 저장소
Android Inflater(사용자 레이아웃) 본문
Inflater
AlertDialog.Builder builder;
AlertDialog alertDialog;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LayoutInflater inflater = (LayoutInflater)this
.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.custum_dialog,
(ViewGroup)findViewById(R.id.layout_root));
TextView text = (TextView)layout.findViewById(R.id.text);
text.setAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_in));
text.setText("hello, this is a custom dialog!");
ImageView image = (ImageView)layout.findViewById(R.id.image);
image.setImageResource(R.drawable.icon);
builder = new AlertDialog.Builder(this);
builder.setView(layout);
alertDialog = builder.create();
alertDialog.show();
}
'Programing' 카테고리의 다른 글
Database (0) | 2010.08.19 |
---|---|
Intent란? (0) | 2010.08.17 |
Thread를 사용하여 다이얼로그 사용법. (0) | 2010.08.16 |
Android 관련 터치스크린 잠금 팁. (0) | 2010.08.15 |
서울대학교 교육 5일차 - 안드로이드 Activity & Activity 생명주기 (0) | 2010.08.13 |