How to show a Progress Bar inside an AlertDialog Builder along with other elements without an XML?

You can use Dialog and add ProgressBar on this by using dialog. AddContentView(view, params) method.

You can use Dialog and add ProgressBar on this by using _dialog. AddContentView(view, params) method.

Thanks Sujit.. this could also have been done but I had already done the below mentioned and my mentor also advised the same. – Fakeer Jul 28 at 7:08.

What I did was got a view : private View myView = null; and some TextView class variables in my dialog activity and used the above mentioned AlertDialog. Builder to set icon, title and +ve/-ve (ok/cancel) buttons and inflated the view with my custom XML layout as : myView = getLayoutInflater(). Inflate(R.layout.

Dialog, null); and then set needed texts to those TextViews like: frmView = ((TextView) myView. FindViewById(R.id. Frm)); frmView.

SetText(getString(R.string. From) + frmDevice); and then alertDialogBuilder. SetView(myView).

I am trying to create an AlertDialog for a Bluetooth transfer after the transfer notification is touched in an android phone. Out of the below, I am getting everything - icon, title and two buttons. I am sure I can add other info like From, FileName and others using cursors with the help AlertDialog.

I just do not know to get a progress-bar in it. I do not want to use an XML. I have everything in place except I am not able to figure out how to bring a progress-bar here.

Or how to create a view for that progress-bar in he Java file itself and put a progressbar in that view and then put that view inside the dialog.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions