Commit Graph

38 Commits

Author SHA1 Message Date
Matt Carroll 18ad03d49d Fixed an Android keyboard entry bug that was introduced by the embedding refactor. (#28438) (#7954) 2019-02-25 19:15:49 -08:00
Matt Carroll 2f4a38dbd3 Android embedding refactor pr3 add remaining systemchannels (#7892)
Merging back in after reversion. Fixed some messaging issues in FlutterNativeView and corrected some message parsing.
2019-02-20 17:05:31 -08:00
Dan Field 6d7eb52185 Revert "Android embedding refactor pr3 add remaining systemchannels (#7874)" (#7886)
This reverts commit f4fba6d711.
2019-02-20 11:18:12 -08:00
Matt Carroll f4fba6d711 Android embedding refactor pr3 add remaining systemchannels (#7874) 2019-02-19 15:51:13 -08:00
Chris Bracken 163a2fd5e1 Revert "Android embedding refactor pr3 add remaining systemchannels (#7738)" (#7849)
From build log:
```
../../flutter/shell/platform/android/io/flutter/view/FlutterView.java:95: error: cannot find symbol
    private final LocalizationChannel localizationChannel;
                  ^
  symbol:   class LocalizationChannel
  location: class FlutterView
../../flutter/shell/platform/android/io/flutter/view/FlutterView.java:172: error: cannot find symbol
        localizationChannel = new LocalizationChannel(dartExecutor);
                                  ^
  symbol:   class LocalizationChannel
  location: class FlutterView
2 errors
```

This reverts commit 256db4bc23.
2019-02-15 15:03:19 -08:00
Matt Carroll 256db4bc23 Android embedding refactor pr3 add remaining systemchannels (#7738) 2019-02-15 13:45:24 -08:00
Rafael Ring 9071a39dd2 Fix keyboard not showing for targetSdk 28 (#6985)
After bumping the targetSdk of Flutter apps to 28, the keyboard doesn't open anymore when inputting text on an Android Pie devices. The problem is caused by a change on the way the focus in handled: when the call `mImm.showSoftInput(view, 0);` is made, the currently focused view is the `DecorView` from the `Activity` hosting Flutter but the passed view reference (`view` argument) is the `FlutterView`. As the `InputMethodManager` checks if both views are the same before showing the keyboard, it never appears because the `FlutterView` never has focus.
As Flutter doesn't have any input views as far as the Android side is concerned, the focus should always stay on the `FlutterView` itself and thus, this PR changes the `TextInputPlugin` to focus on the `FlutterView` as soon as it's created, fixing the keyboard issue.

Co-authored-by: Igor Borges <igorborges12@gmail.com>
2018-12-10 21:01:12 -08:00
Michael Goderbauer 70a1106b50 Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Jonah Williams d1c71e5206 add text capitalization support to ios and android (#5752) 2018-07-19 18:07:18 -07:00
amirh 51785d244d Remove unused Java imports (#5663) 2018-07-03 09:21:03 -07:00
matthew-carroll 061e899b55 Support all keyboard actions. (#11344) (#5620)
* Support all keyboard actions. (#11344)
2018-07-02 06:58:01 +00:00
Stanislav Baranov 7fa08b3ba9 Support for decimal and signed numeric keyboard (#4853)
* Support for decimal and signed numeric keyboard

* Comments
2018-03-26 13:14:38 -07:00
Jason Simmons a2f488ac7f Do not report a cursor location if there is no active selection (#4427)
Fixes https://github.com/flutter/flutter/issues/13398
2017-12-07 17:43:51 -08:00
5u3it 31585e0def Native keyboard behavior update for multiline input (#4234)
Use sentence capitalization for non-obscuretext fields of TextInputType.text
and TextInputType.multiline on iOS and Android.
2017-10-19 13:56:35 -07:00
gspencergoog faabc10178 Support correct keyboards for multi-line text editing. (#4115)
This addresses part of #8028, implementing the Engine-side support for it.
2017-09-26 12:53:19 -07:00
Jason Simmons f56da86f98 Invert the autocorrect flag (#3875)
See https://github.com/flutter/engine/pull/3866
2017-07-13 15:33:08 -07:00
Jason Simmons 74d6f60558 Enable text autocorrect on Android with a flag to disable it (#3866)
See https://github.com/flutter/flutter/issues/11168
2017-07-12 14:44:20 -07:00
Jason Simmons 8d5372a82a Do not try to apply selections outside the length of the text (#3845)
See https://github.com/flutter/flutter/issues/11041
2017-06-30 14:50:01 -07:00
Jason Simmons 4d1f1f6d8a Do not call restartInput twice when setting a new text input client. (#3808)
If restartInput is called twice in quick succession, then the IME may output
warnings related to usage of the obsolete connection resulting from the first
call.

Fixes https://github.com/flutter/flutter/issues/10730
2017-06-21 10:47:02 -07:00
Jason Simmons e5b79ba63b Call Selection.removeSelection if the framework has cleared the selection (#3782)
Fixes https://github.com/flutter/flutter/issues/10748
2017-06-16 14:01:45 -07:00
Jason Simmons 834fb9638e Simplify state management in the Android text editing plugin (#3769)
In particular, this avoids some unnecessary calls to InputMethodManager.restartInput
that caused noticeable lag when moving the cursor.

Fixes https://github.com/flutter/flutter/issues/9928
2017-06-14 10:24:41 -07:00
Chris Bracken bd09286e4a Improve auto-correct disabling on Android when obscureText is true (#3731)
Some keyboards (e.g., on some Samsung devices, SwiftKey) ignore
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS and require
InputType.TYPE_TEXT_VARIATION_PASSWORD.
2017-06-02 15:50:23 -07:00
Chris Bracken 5cd58ba4fa Add support for TextInputType.url (#3730)
Adds support for requesting a platform keyboard optimised for entering
URLs.
2017-06-02 15:13:37 -07:00
Chris Bracken f990f8b0d3 Add support for TextInputType.emailAddress (#3729)
Adds support for requesting a platform keyboard optimised for entering
email addresses.
2017-06-02 15:04:35 -07:00
Chris Bracken 813623a3f8 Set Android keyboard actionLabel only if non-null (#3677) 2017-05-10 12:20:03 -07:00