Android - Insert a RemoteView into an AlertDialog

view story

http://stackoverflow.com – I have a method that create a RemoteView: public static RemoteViews createRemoteView(Context context) { RemoteViews remote = new RemoteViews(context.getPackageName(), R.layout.remote_view); .... stuff ... return remote; } I want to reuse this method to show the same view on an alert dialog: AlertDialog.Builder alert = new AlertDialog.Builder(this); RemoteViews preview = createRemoteView(this); alert.setView(preview); <--- Error here alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { (HowTos)