Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 615f4314 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Custom view for key preview popup

Bug: 15143928
Change-Id: I12411b9b5b9611ec089e4967def9b5c19a2367c7
parent 593fe9b0
Loading
Loading
Loading
Loading

java/res/layout/key_preview.xml

deleted100644 → 0
+0 −27
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 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.
*/
-->

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:minWidth="32dp"
    android:gravity="center"
    style="?attr/keyPreviewTextViewStyle"
/>
+2 −4
Original line number Original line Diff line number Diff line
@@ -26,8 +26,6 @@
        <attr name="keyboardViewStyle" format="reference" />
        <attr name="keyboardViewStyle" format="reference" />
        <!-- MainKeyboardView style -->
        <!-- MainKeyboardView style -->
        <attr name="mainKeyboardViewStyle" format="reference" />
        <attr name="mainKeyboardViewStyle" format="reference" />
        <!-- Key preview text view style -->
        <attr name="keyPreviewTextViewStyle" format="reference"/>
        <!-- EmojiPalettesView style -->
        <!-- EmojiPalettesView style -->
        <attr name="emojiPalettesViewStyle" format="reference" />
        <attr name="emojiPalettesViewStyle" format="reference" />
        <!-- MoreKeysKeyboard style -->
        <!-- MoreKeysKeyboard style -->
@@ -106,8 +104,8 @@
        <attr name="longPressShiftLockTimeout" format="integer" />
        <attr name="longPressShiftLockTimeout" format="integer" />
        <!-- Ignore special key timeout while typing in millisecond. -->
        <!-- Ignore special key timeout while typing in millisecond. -->
        <attr name="ignoreAltCodeKeyTimeout" format="integer" />
        <attr name="ignoreAltCodeKeyTimeout" format="integer" />
        <!-- Layout resource for key press feedback.-->
        <!-- Background resource for key press feedback.-->
        <attr name="keyPreviewLayout" format="reference" />
        <attr name="keyPreviewBackground" format="reference" />
        <!-- Vertical offset of the key press feedback from the key. -->
        <!-- Vertical offset of the key press feedback from the key. -->
        <attr name="keyPreviewOffset" format="dimension" />
        <attr name="keyPreviewOffset" format="dimension" />
        <!-- Height of the key press feedback popup. -->
        <!-- Height of the key press feedback popup. -->
+0 −2
Original line number Original line Diff line number Diff line
@@ -75,7 +75,6 @@
        <item name="keyRepeatInterval">@integer/config_key_repeat_interval</item>
        <item name="keyRepeatInterval">@integer/config_key_repeat_interval</item>
        <item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item>
        <item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item>
        <item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item>
        <item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item>
        <item name="keyPreviewLayout">@layout/key_preview</item>
        <item name="keyPreviewHeight">@dimen/config_key_preview_height</item>
        <item name="keyPreviewHeight">@dimen/config_key_preview_height</item>
        <!-- TODO: consolidate key preview linger timeout with the key preview animation parameters. -->
        <!-- TODO: consolidate key preview linger timeout with the key preview animation parameters. -->
        <item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
        <item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
@@ -106,7 +105,6 @@
    <style
    <style
        name="MainKeyboardView"
        name="MainKeyboardView"
        parent="KeyboardView" />
        parent="KeyboardView" />
    <style name="KeyPreviewTextView" />
    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
         for instance delete button, need themed {@link KeyboardView} attributes. -->
         for instance delete button, need themed {@link KeyboardView} attributes. -->
    <style name="EmojiPalettesView" />
    <style name="EmojiPalettesView" />
+1 −7
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@
        <item name="keyboardStyle">@style/Keyboard.ICS</item>
        <item name="keyboardStyle">@style/Keyboard.ICS</item>
        <item name="keyboardViewStyle">@style/KeyboardView.ICS</item>
        <item name="keyboardViewStyle">@style/KeyboardView.ICS</item>
        <item name="mainKeyboardViewStyle">@style/MainKeyboardView.ICS</item>
        <item name="mainKeyboardViewStyle">@style/MainKeyboardView.ICS</item>
        <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.ICS</item>
        <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.ICS</item>
        <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.ICS</item>
        <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
        <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
        <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
        <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
@@ -66,6 +65,7 @@
        name="MainKeyboardView.ICS"
        name="MainKeyboardView.ICS"
        parent="KeyboardView.ICS"
        parent="KeyboardView.ICS"
    >
    >
        <item name="keyPreviewBackground">@drawable/keyboard_key_feedback_ics</item>
        <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
        <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
        <item name="gestureFloatingPreviewTextColor">@color/highlight_color_ics</item>
        <item name="gestureFloatingPreviewTextColor">@color/highlight_color_ics</item>
        <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
        <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
@@ -75,12 +75,6 @@
        <item name="languageOnSpacebarTextShadowRadius">1.0</item>
        <item name="languageOnSpacebarTextShadowRadius">1.0</item>
        <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
        <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
    </style>
    </style>
    <style
        name="KeyPreviewTextView.ICS"
        parent="KeyPreviewTextView"
    >
        <item name="android:background">@drawable/keyboard_key_feedback_ics</item>
    </style>
    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
         for instance delete button, need themed {@link KeyboardView} attributes. -->
         for instance delete button, need themed {@link KeyboardView} attributes. -->
    <style
    <style
+1 −7
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@
        <item name="keyboardStyle">@style/Keyboard.KLP</item>
        <item name="keyboardStyle">@style/Keyboard.KLP</item>
        <item name="keyboardViewStyle">@style/KeyboardView.KLP</item>
        <item name="keyboardViewStyle">@style/KeyboardView.KLP</item>
        <item name="mainKeyboardViewStyle">@style/MainKeyboardView.KLP</item>
        <item name="mainKeyboardViewStyle">@style/MainKeyboardView.KLP</item>
        <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.KLP</item>
        <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.KLP</item>
        <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.KLP</item>
        <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.KLP</item>
        <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.KLP</item>
        <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.KLP</item>
        <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.KLP</item>
@@ -66,6 +65,7 @@
        name="MainKeyboardView.KLP"
        name="MainKeyboardView.KLP"
        parent="KeyboardView.KLP"
        parent="KeyboardView.KLP"
    >
    >
        <item name="keyPreviewBackground">@drawable/keyboard_key_feedback_klp</item>
        <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
        <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
        <item name="gestureFloatingPreviewTextColor">@color/highlight_color_klp</item>
        <item name="gestureFloatingPreviewTextColor">@color/highlight_color_klp</item>
        <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
        <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
@@ -75,12 +75,6 @@
        <item name="languageOnSpacebarTextShadowRadius">1.0</item>
        <item name="languageOnSpacebarTextShadowRadius">1.0</item>
        <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
        <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
    </style>
    </style>
    <style
        name="KeyPreviewTextView.KLP"
        parent="KeyPreviewTextView"
    >
        <item name="android:background">@drawable/keyboard_key_feedback_klp</item>
    </style>
    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
         for instance delete button, need themed {@link KeyboardView} attributes. -->
         for instance delete button, need themed {@link KeyboardView} attributes. -->
    <style
    <style
Loading