Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

OnKeyDown in Android PageRenderer

$
0
0

Can I use OnKeyDown to capture back button events in an native Android PageRenderer.

public override bool OnKeyDown (Keycode keyCode, KeyEvent e)

{          
        if (keyCode == Keycode.Back) 
        {
      
                return false;
        
}
 
        return true;
}


This is to capture back clicks when displaying a WebView.

Point 9 here states that this should be possible using a standard Android activity.

thanks


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>