Soft Keyboard close by android back button event handler



Hello, I m using on blur function for my some of calculation on listview of app.but some of users are closing their keyboard directly by back button of mobile.because of that onblur function is not getting called and my calculations are not getting performed.
Is there any event so that i can handle closing of keyboard by mobile back button.?


You may use text change event with debounce if required.


text change event are not getting called from xml file.i tried a lot. and also calling textchange event form js is not working for me,because for that we have to-define it onLoaded and i ma loading list on my page after selcting one dropdown. ( i tried this from js textField11 =“meter_closing”); textField11.on(“textChange”, onmeter_closing);
Because of that it is important for me to handle keyboard close event


Yes, you can’t bind property change events in XML, that’s a limitation with NativeScript Core.

But if you have multiple textfields, you don’t have to add listeners to each invidually, simply extend your own textfield, add listeners and make calculations.

FYI, there is no direct API from Android to listen for soft keyboard visibility.


Ok. Thank you so much.I will try by adding listneners to textfields,