mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make the keyboard reappear when you tap on a text field after having dismissed the keyboard.
- the keyboard service now has a showByRequest() method that invokes Android's InputMethodManager's imm.showSoftInput with no flags set. - the Input component calls through to the keyboard service's showByRequest() when it receives a pointer down. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1089163005
This commit is contained in:
parent
33e9822625
commit
f646c8ac58
@ -8,6 +8,7 @@ import '../editing/keyboard.dart';
|
||||
import '../fn.dart';
|
||||
import '../theme/colors.dart';
|
||||
import '../theme/typography.dart' as typography;
|
||||
import 'dart:sky' as sky;
|
||||
|
||||
typedef void ValueChanged(value);
|
||||
|
||||
@ -82,10 +83,13 @@ class Input extends Component {
|
||||
|
||||
children.add(new EditableText(value: _editableValue, focused: focused));
|
||||
|
||||
return new Container(
|
||||
style: _style,
|
||||
inlineStyle: focused ? _focusedInlineStyle : null,
|
||||
children: children
|
||||
return new EventListenerNode(
|
||||
new Container(
|
||||
style: _style,
|
||||
inlineStyle: focused ? _focusedInlineStyle : null,
|
||||
children: children
|
||||
),
|
||||
onPointerDown: (sky.Event e) => keyboard.showByRequest()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user