ShareActionProvider capture before click event? - android

Is it possible to capture an event BEFORE a ShareActionProvider icon is clicked? For example, once a share icon is clicked, I want to display a dialog box asking the user "Do you really want to share?" and then have the opportunity to cancel the share action. I have tried to put the dialog box into onShareTargetSelectedListener, but it won't work. Thanks for any hints.

Related

how to remove the close button from popupkeyboard in android

I am customizing the android keyboard after downloading the sample keyboard code from developer.android.com. I want to customize the layout of the popup window after a user made a long press on a given key, onLongPress(key popupKey). Particularly, I want to get ridoff the close button at the end of the popup keys and want to make the window close when the user clicks outside it. But, I can't figure out how to get access to the popup window. Please give me some hints.
I finally figure it out myself and want to share for anyone interested.
I was not able to get the close button and get rid off it. But, what I got easier is creating a PopupWindow having multiple buttons whose labels are the popup characters taken from the key parameter passed to onLongPress().
This way I was able to display only the popup characters and close the window when the user selects on of them or presses outside of the window.
Cheers!

Display a help button while dialog is up

I was wondering is there any way I can display a help button while the dialog is still up. I want the user to be able to press that button even if he doesn't answer the dialog

how to display popup on same screen with image on click of edittext

I have an edittext,my requirement is when i click on edittext a popup is come with only image on same screen at the same time user can input the value in edittext.
i am new to android,is this possible with QuickAction
what is other scenario to achive this.
Thanks in advanced.

How can I call search dialog with an ImageView?

I have to call search dialog when I press a button into the activity or when I press an ImageView, not with the hardware button like in this post:
How can I call search dialog on button click in android?
Please if you have the code or a tutorial, thanks a lot.
In the docs for the search dialog under "Invoking the search dialog"
...However, some devices do not include a dedicated SEARCH button, so you should not assume that it's always available. When using the search dialog, you must always provide another search button in your UI that activates the search dialog by calling onSearchRequested()...
So you should be able to put onSearchRequested(); inside your click listener to when the image is pressed this method call should launch the search dialog for you.

how to create a popup in android?

i have a list.When i click on any item in the list a popup should appear where i can send messages(something like what happens when we click a user in gmail.A popup window comes up in the bottom and we can chat with that user).
I guess you want to add a Quick Action to your application.
You should be able to get your answer from this question.

Categories

Resources