Skip to content

Instantly share code, notes, and snippets.

@skatldjs
Created September 9, 2010 04:08
Show Gist options
  • Save skatldjs/571364 to your computer and use it in GitHub Desktop.
Save skatldjs/571364 to your computer and use it in GitHub Desktop.
AlertDialog.Builder builder;
AlertDialog alertDialog;
Context mContext = getApplicationContext();
LayoutInflater inflater = (LayoutInflater) mContext.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.android);
builder = new AlertDialog.Builder(mContext);
builder.setView(layout);
alertDialog = builder.create();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment