This is a migrated thread and some comments may be shown as answers.

Popup Gets Close By Android Back Button

5 Answers 695 Views
Popup
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Veteran
Anthony asked on 07 Jun 2019, 01:59 AM

Hi,

I am popping up a modal message that I want the user to acknowledge by pressing on a close button inside the popup.

If they accidently press the back button on the device the modal popup is closed.

Is there any way to stop this from happening?

Thanks

Anthony

5 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 11 Jun 2019, 11:02 AM
Hi Anthony,

I understand the scenario you have, still, this could not be handled by the Popup control as it is more of an application logic. I'd suggest you check the following resources on how to handle the device back button click:
https://forums.xamarin.com/discussion/117782/disable-device-back-button
https://forums.xamarin.com/discussion/113715/is-there-a-way-to-override-a-back-button-press-on-android-and-ios-in-xamarin-forms#latest

I hope those could be helpful. Let me know if you have any concrete questions on RadPopup related to the implementation you choose.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Anthony
Top achievements
Rank 1
Veteran
answered on 11 Jun 2019, 10:07 PM

Hi,

Thanks for your suggestions. I worked around this by wiring up the Popup PropertyChanged event. Inside this I check if IsOpen is set to false and if the user has not pressed the close button in the Popup I set IsOpen back to true which forces the Popup to show again.

Thanks

Anthony

0
Yana
Telerik team
answered on 12 Jun 2019, 06:05 AM
Hi Anthony,

Indeed, that's another option that didn't come to my mind.

Anyway, I am glad to hear you've managed to resolve it.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Gabriele
Top achievements
Rank 1
answered on 30 Apr 2020, 07:05 AM

Hi, there is still no out of the box support for preventing popup closing on back button event?

Thanks

0
Yana
Telerik team
answered on 30 Apr 2020, 07:27 AM

Hello Gabriele,

We consider this is a functionality that shouldn't be handled by RadPopup control. In general,  our controls shouldn't mess up with how device buttons will react on certain actions.  

This is an application logic and in the previous posts you can find suggestions on how you can implement it.

Let me know if I can help with anything else.

Regards,
Yana
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Popup
Asked by
Anthony
Top achievements
Rank 1
Veteran
Answers by
Yana
Telerik team
Anthony
Top achievements
Rank 1
Veteran
Gabriele
Top achievements
Rank 1
Share this question
or