Activity indicator inside an alert - android

Is it possible to add an activity indicator as a part of an alert? I need this because it is difficult to show alert view in white background. Please suggest ideas.

I was actually searching for progress dialog... loading indicator + message............

Related

How to bypass android dialog outside click

What I want to do is to show the dialog message but make it still possible to click on the items behind. On any click, the dialog would dismiss
Right now I need to click once to dismiss the dialog and a second time to click on a field.
It is something possible ? Or is there an alternative to using Dialogs?
Edit: Solution found by adding Layout Flags to the window.
In kotlin:
dialog.window?.setLayout(ConstraintLayout.LayoutParams.FLAG_NOT_FOCUSABLE, ConstraintLayout.LayoutParams.FLAG_NOT_FOCUSABLE)
By using Dialog you cannot achieve what you are looking for. instead of using Dialog USE FRAGMENT.
The examples are given in official documentation here.
You Can define a full layout in the background of the dialog and set onClick listener to that layout

How to create loading screen in android?

I am developing an android app, in which I need a loading screen like the one given below. In this screen I want a custom progress bar and a loading text in the centre of the screen, and the background effect should be blurred. When the loading starts, the user should not be able to perform any action.
How can I create this type of loading screen?
#Ganpat Kaliya
Please check Transparent progress dialog on Android
Just set
setTitle(Loading...);
I would suggest you to use the custom Progress dialog. The purpose of using progress dialog is that as you wanted the screen to be blur, so when ever you would bring Progress dialog to front the activity would get blur , additionally it is highly customize able , you can do what you want.
A very useful explanation is here and here. please check them out and apply.

alertdialogbox should popup from the bottom of the screen?

I have an alert dialog box in my application.i want the alert dialog box to pop up from the bottom of the screen.can anyone help me??
Animation Api may be what you are looking for.
check this answer slide animation. Its like a iphone actionsheet sliding from bottom to center of the screen
I had done this customizing a dialog and adding a animated theme to the dialog. Its was so simple just passing the animation to the constructor of the dialog and calling the super function with the theme(Animation) will make this happen. Thankzz for all your help....happy coding....

Android create two dialog in one activity

I'm really interested if I can create two dialogs in Android in same time in one activity. Here is what I want to achieve : I want to have a circle progress bar with a cancel button and at the bottom of my activity to have a horizontal progress dialog which indicates some calculations. Is there any option to create something like this or similar to this?
Thanks in Advance!
There is no reason why the synchronizing bar, progress bar, and cancel button could not be part of the same dialog that has a transparent background.
You can call
ProgressDialog#getWindow#setGravity(...) to change the gravity.
So:
ProgressDialog dialog = ProgressDialog.show(AContext, "Test", "On the bottom");
dialog.getWindow().setGravity(Gravity.BOTTOM);
You cannot show multiple dialogs at the same time, however you can create an activity with a transparent background which looks like two different dialogs.

android ProgressDialog: setting custom view instead of message - does this work?

In ProgressDialog's documentation it says:
"A dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time."
I've gotten it working beautifully with a message, but I want to use a custom view instead - a message with a cancel button. But calling setView() on the ProgressDialog seemingly has no effect - it shows the progress bar in the dialog but nothing else. I've tried it with just a TextView with the text "hello", but it doesn't show up.
Does anyone know how to get this feature to work? Is it a real feature?
A possible workaround is to create a custom dialog with a ProgressBar.

Categories

Resources