am d3758420
: am 65e91126
: Merge "Allow IMEs to extend below nav bar, remove SystemUI veto." into klp-dev
* commit 'd3758420a2ffd702dee914d794764a0615dd6956': Allow IMEs to extend below nav bar, remove SystemUI veto.
This commit is contained in:
@ -687,6 +687,8 @@ public class InputMethodService extends AbstractInputMethodService {
|
||||
mThemeAttrs = obtainStyledAttributes(android.R.styleable.InputMethodService);
|
||||
mRootView = mInflater.inflate(
|
||||
com.android.internal.R.layout.input_method, null);
|
||||
mRootView.setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
mWindow.setContentView(mRootView);
|
||||
mRootView.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsComputer);
|
||||
if (Settings.Global.getInt(getContentResolver(),
|
||||
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (C) 2013 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.internal.inputmethod;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
public class InputMethodRoot extends LinearLayout {
|
||||
private final Rect mGuardRect = new Rect();
|
||||
private final Paint mGuardPaint = new Paint();
|
||||
|
||||
public InputMethodRoot(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public InputMethodRoot(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public InputMethodRoot(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs);
|
||||
setWillNotDraw(false);
|
||||
mGuardPaint.setColor(context.getResources()
|
||||
.getColor(com.android.internal.R.color.input_method_navigation_guard));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean fitSystemWindows(Rect insets) {
|
||||
setPadding(0, 0, 0, insets.bottom);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
|
||||
// draw navigation bar guard
|
||||
final int w = getMeasuredWidth();
|
||||
final int h = getMeasuredHeight();
|
||||
mGuardRect.set(0, h - getPaddingBottom(), w, h);
|
||||
canvas.drawRect(mGuardRect, mGuardPaint);
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.android.internal.inputmethod.InputMethodRoot xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/parentPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -52,4 +52,4 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</com.android.internal.inputmethod.InputMethodRoot>
|
||||
|
@ -78,6 +78,7 @@
|
||||
|
||||
<drawable name="input_method_fullscreen_background">#fff9f9f9</drawable>
|
||||
<drawable name="input_method_fullscreen_background_holo">@drawable/screen_background_holo_dark</drawable>
|
||||
<color name="input_method_navigation_guard">#ff000000</color>
|
||||
|
||||
<!-- For date picker widget -->
|
||||
<drawable name="selected_day_background">#ff0092f4</drawable>
|
||||
|
@ -1441,6 +1441,7 @@
|
||||
<java-symbol type="bool" name="config_wimaxEnabled" />
|
||||
<java-symbol type="bool" name="show_ongoing_ime_switcher" />
|
||||
<java-symbol type="color" name="config_defaultNotificationColor" />
|
||||
<java-symbol type="color" name="input_method_navigation_guard" />
|
||||
<java-symbol type="drawable" name="ic_notification_ime_default" />
|
||||
<java-symbol type="drawable" name="ic_notify_wifidisplay" />
|
||||
<java-symbol type="drawable" name="ic_menu_refresh" />
|
||||
|
@ -1923,10 +1923,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
|
||||
}
|
||||
|
||||
private void checkBarMode(int mode, int windowState, BarTransitions transitions) {
|
||||
final boolean imeVisible = (mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0;
|
||||
final int finalMode = imeVisible ? MODE_OPAQUE : mode;
|
||||
final boolean anim = (mScreenOn == null || mScreenOn) && windowState != WINDOW_STATE_HIDDEN;
|
||||
transitions.transitionTo(finalMode, anim);
|
||||
transitions.transitionTo(mode, anim);
|
||||
}
|
||||
|
||||
private final Runnable mCheckBarModes = new Runnable() {
|
||||
|
@ -2991,8 +2991,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
pf.left = df.left = of.left = cf.left = vf.left = mDockLeft;
|
||||
pf.top = df.top = of.top = cf.top = vf.top = mDockTop;
|
||||
pf.right = df.right = of.right = cf.right = vf.right = mDockRight;
|
||||
// IM dock windows always go above the nav bar.
|
||||
pf.bottom = df.bottom = of.bottom = cf.bottom = vf.bottom = mStableBottom;
|
||||
// IM dock windows layout below the nav bar...
|
||||
pf.bottom = df.bottom = of.bottom = mRestrictedScreenTop + mRestrictedScreenHeight;
|
||||
// ...with content insets above the nav bar
|
||||
cf.bottom = vf.bottom = mStableBottom;
|
||||
// IM dock windows always go to the bottom of the screen.
|
||||
attrs.gravity = Gravity.BOTTOM;
|
||||
mDockLayer = win.getSurfaceLayer();
|
||||
|
Reference in New Issue
Block a user