Android Story

[ Android ] Dialog layout 씌우기

WhiteDuck 2016. 2. 25. 16:53


[ Android ] Dialog layout 씌우기




Context context = getApplicationContext();
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View convertView = inflater.inflate(R.layout.loadingbar, null, false);
TextView textView = (TextView)convertView.findViewById(R.id.textview_loadingbar);
textView.setText("전송중");

AlertDialog.Builder builder;
AlertDialog alertDialog;

builder = new AlertDialog.Builder(MainActivity.this);
builder.setView( convertView );
alertDialog = builder.create();

alertDialog.show();





반응형