am 1e29e49c
: Merge "Reduce jankiness of the transition between a text field with FLAG_NO_FULLSCREEN and a text field with FLAG_NO_EXTRACT_UI" into jb-mr1.1-dev
* commit '1e29e49cf8b2654f999b2fdb16e8f7f262b73c68': Reduce jankiness of the transition between a text field with FLAG_NO_FULLSCREEN and a text field with FLAG_NO_EXTRACT_UI
This commit is contained in:
@ -930,11 +930,13 @@ public class InputMethodService extends AbstractInputMethodService {
|
|||||||
*/
|
*/
|
||||||
public void onConfigureWindow(Window win, boolean isFullscreen,
|
public void onConfigureWindow(Window win, boolean isFullscreen,
|
||||||
boolean isCandidatesOnly) {
|
boolean isCandidatesOnly) {
|
||||||
if (isFullscreen) {
|
final int currentHeight = mWindow.getWindow().getAttributes().height;
|
||||||
mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
|
final int newHeight = isFullscreen ? MATCH_PARENT : WRAP_CONTENT;
|
||||||
} else {
|
if (mIsInputViewShown && currentHeight != newHeight) {
|
||||||
mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
|
Log.w(TAG, "Window size has been changed. This may cause jankiness of resizing window: "
|
||||||
|
+ currentHeight + " -> " + newHeight);
|
||||||
}
|
}
|
||||||
|
mWindow.getWindow().setLayout(MATCH_PARENT, newHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -997,10 +999,11 @@ public class InputMethodService extends AbstractInputMethodService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateExtractFrameVisibility() {
|
void updateExtractFrameVisibility() {
|
||||||
int vis;
|
final int vis;
|
||||||
if (isFullscreenMode()) {
|
if (isFullscreenMode()) {
|
||||||
vis = mExtractViewHidden ? View.INVISIBLE : View.VISIBLE;
|
vis = mExtractViewHidden ? View.INVISIBLE : View.VISIBLE;
|
||||||
mExtractFrame.setVisibility(View.VISIBLE);
|
// "vis" should be applied for the extract frame as well in the fullscreen mode.
|
||||||
|
mExtractFrame.setVisibility(vis);
|
||||||
} else {
|
} else {
|
||||||
vis = View.VISIBLE;
|
vis = View.VISIBLE;
|
||||||
mExtractFrame.setVisibility(View.GONE);
|
mExtractFrame.setVisibility(View.GONE);
|
||||||
|
Reference in New Issue
Block a user