lostfocus

How to focus Buttons (or other widgets) with TalkBack turned ON in Android Device?

核能气质少年 提交于 2020-06-03 07:33:17
问题 I'm implementing Accessibility in my application. Here's the scenario : I have 4 buttons arranged horizontally at the very top of the screen (Activity). On the click of a button, I'm launching an Alert Dialog which displays something to the user. With the alert being displayed, I will still be able to perform click operations on those 4 buttons at the top of the screen. When I turn ON TalkBack (Android Accessibility Service) in Android device and click on that button, alert is getting

How to focus Buttons (or other widgets) with TalkBack turned ON in Android Device?

旧时模样 提交于 2020-06-03 07:29:41
问题 I'm implementing Accessibility in my application. Here's the scenario : I have 4 buttons arranged horizontally at the very top of the screen (Activity). On the click of a button, I'm launching an Alert Dialog which displays something to the user. With the alert being displayed, I will still be able to perform click operations on those 4 buttons at the top of the screen. When I turn ON TalkBack (Android Accessibility Service) in Android device and click on that button, alert is getting

Wondering about TextBox methods

女生的网名这么多〃 提交于 2020-01-05 12:11:55
问题 I have a TextBox for which I would like to run through a few conditions based on whether or not there is an integer entered in it. My operations take place from the code-behind of the window that the TextBox exists in. Under the LostFocus event I would like to do the following: Check if the string IsNullOrEmpty -If it is - set text to "Default Record" Verify that the entered value is an Int If it isn't - Display a MessageBox(Ok Button) , then set focus back on the TextBox **This is what my

How can I know when an EditText loses focus?

心已入冬 提交于 2019-12-17 03:31:51
问题 I need to catch when an EditText loses focus, I've searched other questions but I didn't find an answer. I used OnFocusChangeListener like this OnFocusChangeListener foco = new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { // TODO Auto-generated method stub } }; But, it doesn't work for me. 回答1: Implement onFocusChange of setOnFocusChangeListener and there's a boolean parameter for hasFocus. When this is false, you've lost focus to another control.

How to hide ckeditor when we click outside of the editor?

跟風遠走 提交于 2019-12-12 15:47:00
问题 Here is my code: <div id="showReplyDiv"> <form id="test"> <div> <textarea id="articleEditor" name="articleVO.articleC"></textarea> <script type="text/javascript"> CKEDITOR.replace( 'articleEditor',{customConfig : '/Forum/ckeditor/replyCKEditor.js'}); </script> </div> <div id="buttonArea"> <input type="button" id="doReply" value="submit"/> <input type="button" id="cancel" value="cancel"/> </div> </form> </div> I want it so that when the user clicks anywhere outside of this ckEditor , I can

XNA Is Running Slow when focus is removed

做~自己de王妃 提交于 2019-12-10 20:55:10
问题 I'm just wondering, while making a game, I noticed that the GameTime value for IsRunningSlowly returns false when my game has focus (like it should), but when I change applications, it changes to true. I even made a empty game, and even when it losses focus, the GameTime value for IsRunningSlowly returns true as well. I'm wondering why does it do this? Is it just my computer, or did the creators of XNA design it this way? The frame rate seems fine, but the value is true. No big deal really, I

Disable firing TextChanged event

二次信任 提交于 2019-12-10 13:32:41
问题 I have textbox and I'm changing the text inside it when lostFocus is fired but that also fires up the textChanged event, which I'm handling but I don't want it to be fired in this one case, how can I disable it here? UPDATE: The idea with bool is good but I have couple of textboxes and I use the same event for all of them, so it's not working exactly as I want the way I want. Now it's working! : private bool setFire = true; private void mytextbox_LostFocus(object sender, RoutedEventArgs e) {

How do I find out where the focus is going in my WPF application?

本小妞迷上赌 提交于 2019-12-07 00:08:58
问题 I have a search screen in my WPF application. The screen is implemented as a UserControl in a TabItem of a TabControl. When the user switches to the Search tab, I want the focus to go into one particular field. So I added a Loaded event handler to the UserControl tag in the Xaml and I called the Focus method of the control I want to have the initial focus in the Loaded event handler. This worked great until I upgraded the Telerik control library I'm using today. Now, when I switch to the

Textfield Validation in Java using LostFocus event

余生长醉 提交于 2019-12-06 15:20:20
问题 I am validating two textfields using LostFocus event as follows: textRegNo.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent arg0) { // TODO Auto-generated method stub regNo1=textRegNo.getText(); Pattern pattern1 = Pattern.compile("^[A-Z]{2}[ -][0-9]{1,2}(?: [A-Z])?(?: [A-Z]*)? [0-9]{4}$"); Matcher matcher1 = pattern1.matcher(regNo1); if (!matcher1.find()){ JOptionPane.showMessageDialog(null, "Invalid Vehicle No!!!\n Vehicle no should be of the form MH 03 KS

Textfield Validation in Java using LostFocus event

随声附和 提交于 2019-12-04 22:01:29
I am validating two textfields using LostFocus event as follows: textRegNo.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent arg0) { // TODO Auto-generated method stub regNo1=textRegNo.getText(); Pattern pattern1 = Pattern.compile("^[A-Z]{2}[ -][0-9]{1,2}(?: [A-Z])?(?: [A-Z]*)? [0-9]{4}$"); Matcher matcher1 = pattern1.matcher(regNo1); if (!matcher1.find()){ JOptionPane.showMessageDialog(null, "Invalid Vehicle No!!!\n Vehicle no should be of the form MH 03 KS 2131!!"); } } @Override public void focusGained(FocusEvent arg0) { // TODO Auto-generated method stub };