Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢冠章
flutter_boost_1.22.4
Commits
8a706f68
Commit
8a706f68
authored
Sep 20, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'flutter_1.5_upgrade_opt'
parents
11d7b18b
676d14dc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
285 additions
and
13 deletions
+285
-13
android/build.gradle
android/build.gradle
+1
-1
android/src/main/java/com/idlefish/flutterboost/BoostFlutterView.java
...main/java/com/idlefish/flutterboost/BoostFlutterView.java
+3
-0
android/src/main/java/com/idlefish/flutterboost/XAndroidKeyProcessor.java
.../java/com/idlefish/flutterboost/XAndroidKeyProcessor.java
+2
-0
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
...src/main/java/com/idlefish/flutterboost/XFlutterView.java
+14
-8
android/src/main/java/com/idlefish/flutterboost/XPlatformPlugin.java
.../main/java/com/idlefish/flutterboost/XPlatformPlugin.java
+257
-0
android/src/main/java/com/idlefish/flutterboost/XTextInputPlugin.java
...main/java/com/idlefish/flutterboost/XTextInputPlugin.java
+8
-4
No files found.
android/build.gradle
View file @
8a706f68
...
@@ -22,7 +22,7 @@ rootProject.allprojects {
...
@@ -22,7 +22,7 @@ rootProject.allprojects {
apply
plugin:
'com.android.library'
apply
plugin:
'com.android.library'
android
{
android
{
compileSdkVersion
2
6
compileSdkVersion
2
8
buildToolsVersion
'27.0.3'
buildToolsVersion
'27.0.3'
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
16
...
...
android/src/main/java/com/idlefish/flutterboost/BoostFlutterView.java
View file @
8a706f68
...
@@ -54,6 +54,7 @@ public class BoostFlutterView extends FrameLayout {
...
@@ -54,6 +54,7 @@ public class BoostFlutterView extends FrameLayout {
private
BoostFlutterEngine
mFlutterEngine
;
private
BoostFlutterEngine
mFlutterEngine
;
private
XFlutterView
mFlutterView
;
private
XFlutterView
mFlutterView
;
private
PlatformPlugin
mPlatformPlugin
;
private
Bundle
mArguments
;
private
Bundle
mArguments
;
...
@@ -113,6 +114,7 @@ public class BoostFlutterView extends FrameLayout {
...
@@ -113,6 +114,7 @@ public class BoostFlutterView extends FrameLayout {
if
(
mArguments
==
null
)
{
if
(
mArguments
==
null
)
{
mArguments
=
new
Bundle
();
mArguments
=
new
Bundle
();
}
}
mPlatformPlugin
=
new
PlatformPlugin
((
Activity
)
getContext
(),
mFlutterEngine
.
getPlatformChannel
());
mFlutterView
=
new
XFlutterView
(
getContext
(),
getRenderMode
(),
getTransparencyMode
());
mFlutterView
=
new
XFlutterView
(
getContext
(),
getRenderMode
(),
getTransparencyMode
());
addView
(
mFlutterView
,
new
FrameLayout
.
LayoutParams
(
addView
(
mFlutterView
,
new
FrameLayout
.
LayoutParams
(
...
@@ -288,6 +290,7 @@ public class BoostFlutterView extends FrameLayout {
...
@@ -288,6 +290,7 @@ public class BoostFlutterView extends FrameLayout {
}
}
}
}
public
void
onDestroy
()
{
public
void
onDestroy
()
{
Debuger
.
log
(
"BoostFlutterView onDestroy"
);
Debuger
.
log
(
"BoostFlutterView onDestroy"
);
...
...
android/src/main/java/com/idlefish/flutterboost/XAndroidKeyProcessor.java
View file @
8a706f68
...
@@ -13,6 +13,7 @@ public class XAndroidKeyProcessor {
...
@@ -13,6 +13,7 @@ public class XAndroidKeyProcessor {
private
final
KeyEventChannel
keyEventChannel
;
private
final
KeyEventChannel
keyEventChannel
;
@NonNull
@NonNull
private
final
XTextInputPlugin
textInputPlugin
;
private
final
XTextInputPlugin
textInputPlugin
;
private
int
combiningCharacter
;
private
int
combiningCharacter
;
public
XAndroidKeyProcessor
(
@NonNull
KeyEventChannel
keyEventChannel
,
@NonNull
XTextInputPlugin
textInputPlugin
)
{
public
XAndroidKeyProcessor
(
@NonNull
KeyEventChannel
keyEventChannel
,
@NonNull
XTextInputPlugin
textInputPlugin
)
{
...
@@ -20,6 +21,7 @@ public class XAndroidKeyProcessor {
...
@@ -20,6 +21,7 @@ public class XAndroidKeyProcessor {
this
.
textInputPlugin
=
textInputPlugin
;
this
.
textInputPlugin
=
textInputPlugin
;
}
}
public
void
onKeyUp
(
@NonNull
KeyEvent
keyEvent
)
{
public
void
onKeyUp
(
@NonNull
KeyEvent
keyEvent
)
{
Character
complexCharacter
=
applyCombiningCharacterToBaseCharacter
(
keyEvent
.
getUnicodeChar
());
Character
complexCharacter
=
applyCombiningCharacterToBaseCharacter
(
keyEvent
.
getUnicodeChar
());
keyEventChannel
.
keyUp
(
keyEventChannel
.
keyUp
(
...
...
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
View file @
8a706f68
package
com.idlefish.flutterboost
;
package
com.idlefish.flutterboost
;
import
android.annotation.TargetApi
;
import
android.annotation.TargetApi
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
...
@@ -34,6 +35,7 @@ import io.flutter.embedding.engine.FlutterEngine;
...
@@ -34,6 +35,7 @@ import io.flutter.embedding.engine.FlutterEngine;
import
io.flutter.embedding.engine.renderer.FlutterRenderer
;
import
io.flutter.embedding.engine.renderer.FlutterRenderer
;
import
io.flutter.embedding.engine.renderer.OnFirstFrameRenderedListener
;
import
io.flutter.embedding.engine.renderer.OnFirstFrameRenderedListener
;
import
io.flutter.plugin.editing.TextInputPlugin
;
import
io.flutter.plugin.editing.TextInputPlugin
;
import
io.flutter.plugin.platform.PlatformPlugin
;
import
io.flutter.view.AccessibilityBridge
;
import
io.flutter.view.AccessibilityBridge
;
public
class
XFlutterView
extends
FrameLayout
{
public
class
XFlutterView
extends
FrameLayout
{
...
@@ -430,6 +432,7 @@ public class XFlutterView extends FrameLayout {
...
@@ -430,6 +432,7 @@ public class XFlutterView extends FrameLayout {
* {@link FlutterEngine}.
* {@link FlutterEngine}.
*/
*/
public
void
attachToFlutterEngine
(
@NonNull
FlutterEngine
flutterEngine
)
{
public
void
attachToFlutterEngine
(
@NonNull
FlutterEngine
flutterEngine
)
{
Log
.
d
(
TAG
,
"attachToFlutterEngine()"
);
Log
.
d
(
TAG
,
"attachToFlutterEngine()"
);
if
(
isAttachedToFlutterEngine
())
{
if
(
isAttachedToFlutterEngine
())
{
if
(
flutterEngine
==
this
.
flutterEngine
)
{
if
(
flutterEngine
==
this
.
flutterEngine
)
{
...
@@ -450,19 +453,22 @@ public class XFlutterView extends FrameLayout {
...
@@ -450,19 +453,22 @@ public class XFlutterView extends FrameLayout {
// Instruct our FlutterRenderer that we are now its designated RenderSurface.
// Instruct our FlutterRenderer that we are now its designated RenderSurface.
this
.
flutterEngine
.
getRenderer
().
attachToRenderSurface
(
renderSurface
);
this
.
flutterEngine
.
getRenderer
().
attachToRenderSurface
(
renderSurface
);
// Initialize various components that know how to process Android View I/O
// Initialize various components that know how to process Android View I/O
// in a way that Flutter understands.
// in a way that Flutter understands.
if
(
textInputPlugin
==
null
){
if
(
textInputPlugin
==
null
){
textInputPlugin
=
new
XTextInputPlugin
(
textInputPlugin
=
new
XTextInputPlugin
(
this
,
this
,
this
.
flutterEngine
.
getDartExecutor
()
flutterEngine
.
getTextInputChannel
()
);
);
}
textInputPlugin
.
setTextInputMethodHandler
();
textInputPlugin
.
getInputMethodManager
().
restartInput
(
this
);
androidKeyProcessor
=
new
XAndroidKeyProcessor
(
androidKeyProcessor
=
new
XAndroidKeyProcessor
(
this
.
flutterEngine
.
getKeyEventChannel
(),
this
.
flutterEngine
.
getKeyEventChannel
(),
textInputPlugin
textInputPlugin
);
);
}
...
@@ -483,7 +489,6 @@ public class XFlutterView extends FrameLayout {
...
@@ -483,7 +489,6 @@ public class XFlutterView extends FrameLayout {
accessibilityBridge
.
isAccessibilityEnabled
(),
accessibilityBridge
.
isAccessibilityEnabled
(),
accessibilityBridge
.
isTouchExplorationEnabled
()
accessibilityBridge
.
isTouchExplorationEnabled
()
);
);
textInputPlugin
.
getInputMethodManager
().
restartInput
(
this
);
}
}
...
@@ -535,8 +540,9 @@ public class XFlutterView extends FrameLayout {
...
@@ -535,8 +540,9 @@ public class XFlutterView extends FrameLayout {
// now that the engine is detached. The new InputConnection will be null, which
// now that the engine is detached. The new InputConnection will be null, which
// signifies that this View does not process input (until a new engine is attached).
// signifies that this View does not process input (until a new engine is attached).
// TODO(mattcarroll): once this is proven to work, move this line ot TextInputPlugin
// TODO(mattcarroll): once this is proven to work, move this line ot TextInputPlugin
textInputPlugin
.
getInputMethodManager
().
restartInput
(
this
);
//
textInputPlugin.getInputMethodManager().restartInput(this);
// Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface.
// Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface.
// this.textInputPlugin.getInputMethodManager().restartInput(this);
flutterEngine
.
getRenderer
().
detachFromRenderSurface
();
flutterEngine
.
getRenderer
().
detachFromRenderSurface
();
flutterEngine
=
null
;
flutterEngine
=
null
;
...
...
android/src/main/java/com/idlefish/flutterboost/XPlatformPlugin.java
0 → 100644
View file @
8a706f68
package
com.idlefish.flutterboost
;
import
android.app.Activity
;
import
android.app.ActivityManager.TaskDescription
;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
import
android.content.Context
;
import
android.os.Build
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.view.HapticFeedbackConstants
;
import
android.view.SoundEffectConstants
;
import
android.view.View
;
import
android.view.Window
;
import
java.util.List
;
import
io.flutter.embedding.engine.systemchannels.PlatformChannel
;
import
io.flutter.plugin.common.ActivityLifecycleListener
;
public
class
XPlatformPlugin
implements
ActivityLifecycleListener
{
public
static
final
int
DEFAULT_SYSTEM_UI
=
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
;
private
Activity
activity
;
private
final
PlatformChannel
platformChannel
;
private
PlatformChannel
.
SystemChromeStyle
currentTheme
;
private
int
mEnabledOverlays
;
private
final
PlatformChannel
.
PlatformMessageHandler
mPlatformMessageHandler
=
new
PlatformChannel
.
PlatformMessageHandler
()
{
@Override
public
void
playSystemSound
(
@NonNull
PlatformChannel
.
SoundType
soundType
)
{
XPlatformPlugin
.
this
.
playSystemSound
(
soundType
);
}
@Override
public
void
vibrateHapticFeedback
(
@NonNull
PlatformChannel
.
HapticFeedbackType
feedbackType
)
{
XPlatformPlugin
.
this
.
vibrateHapticFeedback
(
feedbackType
);
}
@Override
public
void
setPreferredOrientations
(
int
androidOrientation
)
{
setSystemChromePreferredOrientations
(
androidOrientation
);
}
@Override
public
void
setApplicationSwitcherDescription
(
@NonNull
PlatformChannel
.
AppSwitcherDescription
description
)
{
setSystemChromeApplicationSwitcherDescription
(
description
);
}
@Override
public
void
showSystemOverlays
(
@NonNull
List
<
PlatformChannel
.
SystemUiOverlay
>
overlays
)
{
setSystemChromeEnabledSystemUIOverlays
(
overlays
);
}
@Override
public
void
restoreSystemUiOverlays
()
{
restoreSystemChromeSystemUIOverlays
();
}
@Override
public
void
setSystemUiOverlayStyle
(
@NonNull
PlatformChannel
.
SystemChromeStyle
systemUiOverlayStyle
)
{
setSystemChromeSystemUIOverlayStyle
(
systemUiOverlayStyle
);
}
@Override
public
void
popSystemNavigator
()
{
XPlatformPlugin
.
this
.
popSystemNavigator
();
}
@Override
public
CharSequence
getClipboardData
(
@Nullable
PlatformChannel
.
ClipboardContentFormat
format
)
{
return
XPlatformPlugin
.
this
.
getClipboardData
(
format
);
}
@Override
public
void
setClipboardData
(
@NonNull
String
text
)
{
XPlatformPlugin
.
this
.
setClipboardData
(
text
);
}
};
public
XPlatformPlugin
(
Activity
activity
,
PlatformChannel
platformChannel
)
{
this
.
activity
=
activity
;
this
.
platformChannel
=
platformChannel
;
this
.
platformChannel
.
setPlatformMessageHandler
(
mPlatformMessageHandler
);
mEnabledOverlays
=
DEFAULT_SYSTEM_UI
;
}
private
void
playSystemSound
(
PlatformChannel
.
SoundType
soundType
)
{
if
(
soundType
==
PlatformChannel
.
SoundType
.
CLICK
)
{
View
view
=
activity
.
getWindow
().
getDecorView
();
view
.
playSoundEffect
(
SoundEffectConstants
.
CLICK
);
}
}
private
void
vibrateHapticFeedback
(
PlatformChannel
.
HapticFeedbackType
feedbackType
)
{
View
view
=
activity
.
getWindow
().
getDecorView
();
switch
(
feedbackType
)
{
case
STANDARD:
view
.
performHapticFeedback
(
HapticFeedbackConstants
.
LONG_PRESS
);
break
;
case
LIGHT_IMPACT:
view
.
performHapticFeedback
(
HapticFeedbackConstants
.
VIRTUAL_KEY
);
break
;
case
MEDIUM_IMPACT:
view
.
performHapticFeedback
(
HapticFeedbackConstants
.
KEYBOARD_TAP
);
break
;
case
HEAVY_IMPACT:
// HapticFeedbackConstants.CONTEXT_CLICK from API level 23.
view
.
performHapticFeedback
(
6
);
break
;
case
SELECTION_CLICK:
view
.
performHapticFeedback
(
HapticFeedbackConstants
.
CLOCK_TICK
);
break
;
}
}
private
void
setSystemChromePreferredOrientations
(
int
androidOrientation
)
{
activity
.
setRequestedOrientation
(
androidOrientation
);
}
private
void
setSystemChromeApplicationSwitcherDescription
(
PlatformChannel
.
AppSwitcherDescription
description
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
return
;
}
// Linter refuses to believe we're only executing this code in API 28 unless we use distinct if blocks and
// hardcode the API 28 constant.
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
P
&&
Build
.
VERSION
.
SDK_INT
>
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
activity
.
setTaskDescription
(
new
TaskDescription
(
description
.
label
));
}
if
(
Build
.
VERSION
.
SDK_INT
>=
28
)
{
TaskDescription
taskDescription
=
new
TaskDescription
(
description
.
label
,
0
,
description
.
color
);
activity
.
setTaskDescription
(
taskDescription
);
}
}
private
void
setSystemChromeEnabledSystemUIOverlays
(
List
<
PlatformChannel
.
SystemUiOverlay
>
overlaysToShow
)
{
// Start by assuming we want to hide all system overlays (like an immersive game).
int
enabledOverlays
=
DEFAULT_SYSTEM_UI
|
View
.
SYSTEM_UI_FLAG_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_HIDE_NAVIGATION
;
if
(
overlaysToShow
.
size
()
==
0
)
{
enabledOverlays
|=
View
.
SYSTEM_UI_FLAG_IMMERSIVE_STICKY
;
}
// Re-add any desired system overlays.
for
(
int
i
=
0
;
i
<
overlaysToShow
.
size
();
++
i
)
{
PlatformChannel
.
SystemUiOverlay
overlayToShow
=
overlaysToShow
.
get
(
i
);
switch
(
overlayToShow
)
{
case
TOP_OVERLAYS:
enabledOverlays
&=
~
View
.
SYSTEM_UI_FLAG_FULLSCREEN
;
break
;
case
BOTTOM_OVERLAYS:
enabledOverlays
&=
~
View
.
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
;
enabledOverlays
&=
~
View
.
SYSTEM_UI_FLAG_HIDE_NAVIGATION
;
break
;
}
}
mEnabledOverlays
=
enabledOverlays
;
updateSystemUiOverlays
();
}
private
void
updateSystemUiOverlays
(){
activity
.
getWindow
().
getDecorView
().
setSystemUiVisibility
(
mEnabledOverlays
);
if
(
currentTheme
!=
null
)
{
setSystemChromeSystemUIOverlayStyle
(
currentTheme
);
}
}
private
void
restoreSystemChromeSystemUIOverlays
()
{
updateSystemUiOverlays
();
}
private
void
setSystemChromeSystemUIOverlayStyle
(
PlatformChannel
.
SystemChromeStyle
systemChromeStyle
)
{
Window
window
=
activity
.
getWindow
();
View
view
=
window
.
getDecorView
();
int
flags
=
view
.
getSystemUiVisibility
();
// You can change the navigation bar color (including translucent colors)
// in Android, but you can't change the color of the navigation buttons until Android O.
// LIGHT vs DARK effectively isn't supported until then.
// Build.VERSION_CODES.O
if
(
Build
.
VERSION
.
SDK_INT
>=
26
)
{
if
(
systemChromeStyle
.
systemNavigationBarIconBrightness
!=
null
)
{
switch
(
systemChromeStyle
.
systemNavigationBarIconBrightness
)
{
case
DARK:
//View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
flags
|=
0x10
;
break
;
case
LIGHT:
flags
&=
~
0x10
;
break
;
}
}
if
(
systemChromeStyle
.
systemNavigationBarColor
!=
null
)
{
window
.
setNavigationBarColor
(
systemChromeStyle
.
systemNavigationBarColor
);
}
}
// Build.VERSION_CODES.M
if
(
Build
.
VERSION
.
SDK_INT
>=
23
)
{
if
(
systemChromeStyle
.
statusBarIconBrightness
!=
null
)
{
switch
(
systemChromeStyle
.
statusBarIconBrightness
)
{
case
DARK:
// View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
flags
|=
0x2000
;
break
;
case
LIGHT:
flags
&=
~
0x2000
;
break
;
}
}
if
(
systemChromeStyle
.
statusBarColor
!=
null
)
{
window
.
setStatusBarColor
(
systemChromeStyle
.
statusBarColor
);
}
}
if
(
systemChromeStyle
.
systemNavigationBarDividerColor
!=
null
)
{
// Not availible until Android P.
// window.setNavigationBarDividerColor(systemNavigationBarDividerColor);
}
view
.
setSystemUiVisibility
(
flags
);
currentTheme
=
systemChromeStyle
;
}
private
void
popSystemNavigator
()
{
activity
.
finish
();
}
private
CharSequence
getClipboardData
(
PlatformChannel
.
ClipboardContentFormat
format
)
{
ClipboardManager
clipboard
=
(
ClipboardManager
)
activity
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
ClipData
clip
=
clipboard
.
getPrimaryClip
();
if
(
clip
==
null
)
return
null
;
if
(
format
==
null
||
format
==
PlatformChannel
.
ClipboardContentFormat
.
PLAIN_TEXT
)
{
return
clip
.
getItemAt
(
0
).
coerceToText
(
activity
);
}
return
null
;
}
private
void
setClipboardData
(
String
text
)
{
ClipboardManager
clipboard
=
(
ClipboardManager
)
activity
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
ClipData
clip
=
ClipData
.
newPlainText
(
"text label?"
,
text
);
clipboard
.
setPrimaryClip
(
clip
);
}
@Override
public
void
onPostResume
()
{
updateSystemUiOverlays
();
}
public
void
release
(){
this
.
activity
=
null
;
}
}
\ No newline at end of file
android/src/main/java/com/idlefish/flutterboost/XTextInputPlugin.java
View file @
8a706f68
...
@@ -24,7 +24,6 @@ public class XTextInputPlugin {
...
@@ -24,7 +24,6 @@ public class XTextInputPlugin {
@NonNull
@NonNull
private
final
InputMethodManager
mImm
;
private
final
InputMethodManager
mImm
;
@NonNull
@NonNull
private
final
TextInputChannel
textInputChannel
;
private
int
mClient
=
0
;
private
int
mClient
=
0
;
@Nullable
@Nullable
private
TextInputChannel
.
Configuration
configuration
;
private
TextInputChannel
.
Configuration
configuration
;
...
@@ -33,13 +32,17 @@ public class XTextInputPlugin {
...
@@ -33,13 +32,17 @@ public class XTextInputPlugin {
private
boolean
mRestartInputPending
;
private
boolean
mRestartInputPending
;
@Nullable
@Nullable
private
InputConnection
lastInputConnection
;
private
InputConnection
lastInputConnection
;
private
TextInputChannel
textInputChannel
;
public
XTextInputPlugin
(
View
view
,
@NonNull
DartExecutor
dartExecutor
)
{
public
XTextInputPlugin
(
View
view
,
TextInputChannel
mTextInputChannel
)
{
mView
=
view
;
mView
=
view
;
mImm
=
(
InputMethodManager
)
view
.
getContext
().
getSystemService
(
mImm
=
(
InputMethodManager
)
view
.
getContext
().
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
Context
.
INPUT_METHOD_SERVICE
);
textInputChannel
=
mTextInputChannel
;
}
textInputChannel
=
new
TextInputChannel
(
dartExecutor
);
public
void
setTextInputMethodHandler
(
){
textInputChannel
.
setTextInputMethodHandler
(
new
TextInputChannel
.
TextInputMethodHandler
()
{
textInputChannel
.
setTextInputMethodHandler
(
new
TextInputChannel
.
TextInputMethodHandler
()
{
@Override
@Override
public
void
show
()
{
public
void
show
()
{
...
@@ -173,6 +176,7 @@ public class XTextInputPlugin {
...
@@ -173,6 +176,7 @@ public class XTextInputPlugin {
}
}
private
void
showTextInput
(
View
view
)
{
private
void
showTextInput
(
View
view
)
{
if
(
view
==
null
)
return
;
view
.
requestFocus
();
view
.
requestFocus
();
mImm
.
showSoftInput
(
view
,
0
);
mImm
.
showSoftInput
(
view
,
0
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment