LayoutInflater inflater=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view=inflater.inflate(R.layout.view_dialog, null);