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.
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 want to pop open a DatePickerDialog in a certain screen, but I am required to not grey out the rest of the screen (the view behind the dialog) when the DatePickerDialog window opens. Is there a way to achieve this?
You probably would want to create your own custom dialog. You can extend DialogFramgent and change it accordingly.
See the Android doc HERE for a great example.
Or, use PopupWindow if you want a popover dialog with control of the background, see this SO post.
I'm doing a tablet application. I have to show a custom dialog with the theme android.R.style.Theme_Translucent_NoTitleBar.
Now I am able to show the dialog with the views as I required (i.e. with number picker at fixed position — on the left side of the screen).
I have to place the same dialog dynamically on the click position of a button. Some time on the left side of the screen and some time right.
Shortly we can say: at any position of the screen.
So please help me with any code or idea.
When my app is first run, I would like to have a welcome message displayed in a dialog box. Then the user can click next at the bottom, and the box stays but a new layout is displayed where the user can input information.
How would I go about this? It would also be great if I was able to add an animation between the two layouts, the second one sliding in from the right for example. Is this possible?
I was thinking I may be able to use
builder.setView(secondlayout);