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

How to trigger "Focused"of a Object in Android(Xamarin.forms)

$
0
0

How to trigger "Focused"of a Object in Android

I am troubled by this problem for a few days, I want to run some codes when object Frame /Button /Label been clicked and after user click onther object.So I want to use the Focused /Unfocused.

Although it works very well on UWP(windows),but on Android emulator always don't work.can't trigger Focused or Unfocused.

Is I miss some settings on Android or just because only Entry /Editor has Focused function in Android?really!?

Just like this:

Button TestButton = new Button
{
Test="hello"
};

TestButton.Focused+= (sender, args) => 
    {
Test+="FF";
};

TestButton.Clicked+= (sender, args) => 
    {
Test+="CC";
};

when click once, will be "helloFFCC" in UWP,but "helloCC" in Android.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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