Blurring A Dialog in Android - android

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.

Related

PopupWindow inside Dialog

I have a problem with PopupWindow class used inside a Dialog.
The code works fine and the popup does show, but it is clipped to the content area of the Dialog. In my case, the popup can contain quite a bit of text, which makes it look weird, being clipped suddenly at the bottom of the Dialog :-(
Here is a little presentation:
Any hints how to make the popup draw inside the whole window, not just the Dialog frame?
I already tried this solution, but it breaks the Dialog styling, making it fill the whole screen and requiring lots of tricky fixes, so I would rather not use it.

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.

How to put a listener on the animation of a dialog disappearing?

When a dialog is disappearing, it can look bad if you have another animation running at the same that takes up a large portion of the screen. I've also found that a disappearing dialog doesn't mix well with listView.smoothScrollToPosition().
Is it possible to put a listener on the dialog disappearing animation so that you can start your own animation or scrolling when it has completely gone?
I will accept the answer of "no it isn't possible" if someone can convince me of that.

android - Place UI on the edge of another UI

Hi,
I need to create a UI such that an image view appears at the edge of an alert dialog. Please find below the steps in detail.
I click on a button in activity.
Alert dialog windows should slide from the right to the center.
In the edge of the dialog window, i have an image.
I am done till step 2. I don't know how to place an UI such that half of that appears on the dialog view. Please refer to the image i have provided.
Please provide me with the code samples or pointers for implementing the same. Thanks.
Try using frame layout
A dialog is usually a small window that appears in front of the current Activity. The underlying Activity loses focus and the dialog accepts all user interaction.
So, I doubt if such an effect can be obtained in a dialog.
However, I tried using absolute layout as dialog's content view to create a custom dialog and moved the imageview to an edge by altering the layout parameter. That showed only the portion of the imageview that could fit into the dialog and the rest was not visible.

Placing a translucent-like image in Android

How can I place a gray image on top of my whole activity? This gray image must be translucent (meaning the user must still see what is beneath that gray image).
I wanted to created something like the pause menu in most games wherein the background can still be seen and when clicked/tapped, it becomes invisible and continues on with the game. :)
You could open a new activity that has a semi-transparent background. Or open a dialog, and have Android take care of it by itself.
If you want to use the same activity, create an ImageView over the entire activity, load it with a semi-transparent image, and set its visibility to 'gone' until you want it to appear.
You could also use FLAG_DIM_BEHIND instead of an translucent image
http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_DIM_BEHIND

Categories

Resources