Android - How to make a pop up message notification like this? - android

The pop up message is the Green one. I tried to use snackbar but many says Snackbar cant make custom layout and Toast doesnt have an action. So what should I use to make that green pop up message?

You can create a custom layout for Snackbar. Check-out the solution
https://stackoverflow.com/a/33441214/8122085

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

Make Toast message overlap SoftKeyboard

I have a Toast that shows up while the user is typing in an EditText widget however it hides under the SoftKeyboard and cannot be seen unless the user hits backbutton to remove the keyboard.
Is there a way to make the Toast show anyways?.
Well overriding that behavior would take some hacking and I think not a preferred solution to take over the placement of the toast. Some phones will toast over the keyboard and others toast above. I hate when they toast over the keyboard as it blocks my typing personally.
However, if you want full control of your toast you can use a custom library like: https://android-arsenal.com/details/1/6209
But I prefer to use Snackbar as it looks nicer, and stays at the bottom for you and can handle a single button if desired.

Where is an Android Snackbar that will enter from right

I try to find a Android snackbar typ of widget that will enter not from top or bottom but from right or left. Further demands is custom message, icon, stacking, dismiss button, callback handlers. The thing is when snackbar is popping up from the bottom it can block keyboard or EditText. The eyecatcher is also more natural if snackbar message come from right and is centered vertically on device screen
btw, Windows 10 have this notifications popping out from the right behaving in general exactly like Android Toast
Another behavior on this snack is that when snackbar(if we now can still call it a snackbar) is that when it pops out from the right it can have a graphical progress bar under message text counting down from like 3 sec or 5 sec or whatever duration was chosen before snackbar pop back and disappear. This is simply in respect for the user who is attacked by the snack, to let him know when snack go away..
Any ide?
You can read answers to similar question here: How can you adjust Android SnackBar to a specific position on screen
I hope you will find helpful advice on how to solve this problem.
I think you want your snackbar to come from right side, If your version is more than lollipop then use Slide function and set the view in slide function it will come from right only

How to pop up a message that i will create in android

I want that if a button is clicked so a square will pop up in the bottom of the screen with title,message and buttons in the square(not a dialog).
how can I do this?
You are probably looking for PopupWindow. See an example here

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