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 |
Tags
- 네트워크보안
- rainbow
- 인텐트
- TOEIC
- 레인보우
- 쓰레드
- opencv
- 토익
- 이클립스
- HTML
- 안드로이드
- 네트워크
- Java
- 걸스데이
- 브로드케스트 리시버
- 서비스
- 바닐라루시
- xml
- Eclipse
- 자바
- 엑티비티
- Android
- error
- Linux
- Looper
- opengl
- Intent
- 영어
- 배다해
- 뮤직비디오
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 |