안드로이드 개발 질문/답변
(글 수 45,052)
커스텀다이얼로그 예제입니다..;;
인터넷 구글에서 예제낸거 따라해보는데..안되네요;;
버튼 누르면은 나오게해놨는데..
뭐가문제인지모르겠습니다..
답변부탁드립니다..ㅠㅠ
파일은 첨부해놨습니다..
2011.11.03 15:54:31
이거 안드로이드 사이드에 답변한거 같은데..
LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.custom_dialog,(ViewGroup) findViewById(R.id.layout_root));
TextView text = (TextView) layout.findViewById(R.id.text);
text.setText("커스텀 다이얼로그...");
ImageView image = (ImageView) layout.findViewById(R.id.image);
image.setImageResource(R.drawable.ic_launcher);
builder = new AlertDialog.Builder(ViewActivity.this);
builder.setView(layout);
alertDialog = builder.create();
builder.show();
이렇게 해보세요.