If I open a progress dialog the current activity visually goes to background (it gets darker). I also want to use this visual feedback (style) if I am working on longer running background tasks but without using a progress dialog. Does anybody know how to do that?
I think if you are doing something time consuming then you should indicate this with an indeterminate dialog (the one with a spinning wheel) along with a message explaining what you are doing. Otherwise the user will be confused about what is going on.
If you absolutely refuse to show the dialog, you could re-create the dark background by having a transparent view that covers the entire activity and then setting its background colour to a translucent black to make what is behind it appear darker.
Related
I looked through forums and SO and find many examples on how to display a dialog with a blurred and dim background which I put in place in my app. The issue I have now is when I want to display a second dialog on top of the previous one but still keeping both on the screen. The effect I would like is to dim and blur the background a second time when the second pop-up shows up. But what it does at the moment is blurring the activity again and not blurring the dialog that is still showing in the background.
So my question would be, is it possible to blur a dialog, when opening another dialog? If yes how could I do this? (Make sure you read the question well... I know how to blur the activity, the question is how to blur the dialog already shown on screen when I open a new dialog on top of it....)
Thanks very much
you can create fullscreen dialog with custom layout which consist from
real dialog content and blurred transparent part outside which would blur and overlay all background views.
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.
I have an issue with my android dialog. I would like it to be displayed over any activity (probably a no-no as far as design guidelines but I have good reason). This works. And I'm %95 happy with it. The issue is there seems to be an activity background still displayed beneath my dialog. This is apparent if I don't call finish() on my activity on each intended close action. Which I've done so it's less problematic, however, the dialog closes a split second prior to the activity background being cleared so the user sees an ugly centimeter long box for a split second as it finishes.
[____]
Is there any way to combat this? I've tried all of the API dialog themes: No action bar, no title bar, transparent, etc etc to no avail. I also attempted to set the dialog color to full transparency as well.
I had the same problem and my solution was:
#Override
protected void onPause() {
this.finish();
super.onPause();
}
Is there a way to control what's shown on the screen when an Android app is restarted after it has been stopped? By stopped I mean the apps has been sent to background and at some point the OS reclaimed the resources.
Now when I select the app from the task switching view it shows the ActionBar and black background (the background in fact has been set transparent to reduce overdraw) and after a couple of seconds it resumes the activity.
Would it be possible to show some sort of loading indicator (e.g. a ProgressBar) instead of just black background?
What's the best way to create a reusable loading screen in Android? The loading screen should have a background image and a loading indicator.
Should I use a separate activity?
The best way is using a separate activity with a SurfaceView that shows the image. Then, you can create an overlay that contains the ProgressBar.
You just could define your own dialog with custom layout. You would handle what happens if your progress screen gets cancelled (pressing back button). You could also prevent it from happening too.
By using an standard dialog you take adavantage of nice efects (background activity darkening with upgrades) and prevents user from interacting with background activity while it is on.