Bug 6052 - EditText.keypress event doesn't always fire
Summary: EditText.keypress event doesn't always fire
Status: RESOLVED FEATURE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-09 17:14 UTC by NeoDarque
Modified: 2012-09-10 07:17 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description NeoDarque 2012-07-09 17:14:45 UTC
I have an EditText field, it's inputType is set to "numberDecimal" and digits is set to "0123456789,."

The keypress-event fires for all numeric key presses but not for the decimal separators.
Comment 1 Atsushi Eno 2012-09-10 07:17:28 UTC
Hello,

I tried:

- put EditText on a view like [*1] and entered text. It just worked for DOT (COMMA is not acceptable regardless of it is use-comma-as-the-separator languages such as pt_BR) or regardless of it is Java or Mono.
- set KeyOnListener on the EditText. It never receives events for DOT or COMMA. But it is kind of expected, as explained at [*2]

None of them were different from pure-Java-based Android app.

If your problem is about neither of them, please reopen and describe the specific issue you are seeing.

[*1] main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<EditText
    android:id="@+id/myEditText"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:inputType="numberDecimal"
    />
</LinearLayout>

[*2] http://developer.android.com/reference/android/view/View.OnKeyListener.html#onKey%28android.view.View,%20int,%20android.view.KeyEvent%29