Loading core/java/android/inputmethodservice/InputMethodService.java +2 −0 Original line number Diff line number Diff line Loading @@ -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(), Loading core/java/com/android/internal/inputmethod/InputMethodRoot.java 0 → 100644 +61 −0 Original line number Diff line number Diff line /* * 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); } } core/res/res/layout/input_method.xml +2 −2 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -52,4 +52,4 @@ android:layout_height="wrap_content" android:visibility="gone"> </FrameLayout> </LinearLayout> </com.android.internal.inputmethod.InputMethodRoot> core/res/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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" /> Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +2 −0 Original line number Diff line number Diff line Loading @@ -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(), Loading
core/java/com/android/internal/inputmethod/InputMethodRoot.java 0 → 100644 +61 −0 Original line number Diff line number Diff line /* * 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); } }
core/res/res/layout/input_method.xml +2 −2 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -52,4 +52,4 @@ android:layout_height="wrap_content" android:visibility="gone"> </FrameLayout> </LinearLayout> </com.android.internal.inputmethod.InputMethodRoot>
core/res/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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" /> Loading