aboutsummaryrefslogtreecommitdiffstats
path: root/java/res/layout
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-06-09 23:25:02 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-06-10 09:15:59 +0900
commit874a600dc805b6ab9fe92fccddfe4765b8d29a35 (patch)
treea5b706a54924add509dcbb4c54881122b23a9d26 /java/res/layout
parentd022df49bd083b3de68463295d04bbcaadb479a6 (diff)
downloadlatinime-874a600dc805b6ab9fe92fccddfe4765b8d29a35.tar.gz
latinime-874a600dc805b6ab9fe92fccddfe4765b8d29a35.tar.xz
latinime-874a600dc805b6ab9fe92fccddfe4765b8d29a35.zip
Add audio and haptic feedback for Emoji and Suggestions
Bug: 15378862 Change-Id: Ia14929bd9eb63ad5735cae0ad98ad0e2ad301128
Diffstat (limited to 'java/res/layout')
-rw-r--r--java/res/layout/emoji_keyboard_tab_icon.xml4
-rw-r--r--java/res/layout/emoji_palettes_view.xml20
-rw-r--r--java/res/layout/suggestion_divider.xml10
-rw-r--r--java/res/layout/suggestions_strip.xml17
4 files changed, 43 insertions, 8 deletions
diff --git a/java/res/layout/emoji_keyboard_tab_icon.xml b/java/res/layout/emoji_keyboard_tab_icon.xml
index 13bb41ca2..15f9c3a3e 100644
--- a/java/res/layout/emoji_keyboard_tab_icon.xml
+++ b/java/res/layout/emoji_keyboard_tab_icon.xml
@@ -19,6 +19,8 @@
-->
<!-- Note: contentDescription will be added programatically in {@link EmojiPalettesView}. -->
+<!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dip"
android:layout_weight="1.0"
@@ -26,4 +28,6 @@
android:gravity="center"
android:scaleType="center"
android:contentDescription="@null"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false"
/>
diff --git a/java/res/layout/emoji_palettes_view.xml b/java/res/layout/emoji_palettes_view.xml
index 06a937bff..9ff090aad 100644
--- a/java/res/layout/emoji_palettes_view.xml
+++ b/java/res/layout/emoji_palettes_view.xml
@@ -62,11 +62,15 @@
android:layout_height="match_parent"
android:background="@drawable/suggestions_strip_divider" />
<!-- TODO: Implement KeyView and replace this. -->
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<ImageButton
android:id="@+id/emoji_keyboard_delete"
android:layout_width="0dip"
android:layout_weight="12.5"
android:layout_height="match_parent"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false"
android:contentDescription="@string/spoken_description_delete" />
</LinearLayout>
<android.support.v4.view.ViewPager
@@ -85,18 +89,26 @@
android:layout_weight="1"
>
<!-- TODO: Implement a KeyView and replace this. -->
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<TextView
android:id="@+id/emoji_keyboard_alphabet_left"
android:layout_width="0dip"
android:layout_weight="0.15"
android:gravity="center"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false" />
<!-- TODO: Implement KeyView and replace this. -->
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<RelativeLayout
android:id="@+id/emoji_keyboard_space"
android:layout_width="0dip"
android:layout_weight="0.70"
android:layout_height="match_parent"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false"
android:contentDescription="@string/spoken_description_space">
<!-- WORKAROUND: Show the spacebar icon as a bacground of this View. -->
<View
@@ -108,11 +120,15 @@
android:layout_centerInParent="true" />
</RelativeLayout>
<!-- TODO: Implement KeyView and replace this. -->
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<TextView
android:id="@+id/emoji_keyboard_alphabet_right"
android:layout_width="0dip"
android:layout_weight="0.15"
android:gravity="center"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false" />
</LinearLayout>
</com.android.inputmethod.keyboard.emoji.EmojiPalettesView>
diff --git a/java/res/layout/suggestion_divider.xml b/java/res/layout/suggestion_divider.xml
index be97eae5a..563599d82 100644
--- a/java/res/layout/suggestion_divider.xml
+++ b/java/res/layout/suggestion_divider.xml
@@ -18,13 +18,17 @@
*/
-->
+<!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
+ android:padding="0dp"
+ android:gravity="center"
android:src="@drawable/suggestions_strip_divider"
+ android:contentDescription="@null"
android:clickable="false"
android:longClickable="false"
- android:contentDescription="@null"
- android:padding="0dp"
- android:gravity="center" />
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false" />
diff --git a/java/res/layout/suggestions_strip.xml b/java/res/layout/suggestions_strip.xml
index 3d2f07f7b..489477990 100644
--- a/java/res/layout/suggestions_strip.xml
+++ b/java/res/layout/suggestions_strip.xml
@@ -20,13 +20,19 @@
<merge
xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<LinearLayout
android:id="@+id/suggestions_strip"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/config_suggestions_strip_horizontal_margin"
- android:layout_marginRight="@dimen/config_suggestions_strip_horizontal_margin" />
+ android:layout_marginRight="@dimen/config_suggestions_strip_horizontal_margin"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false" />
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<LinearLayout
android:id="@+id/add_to_dictionary_strip"
android:orientation="horizontal"
@@ -34,7 +40,8 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/config_suggestions_strip_horizontal_margin"
android:layout_marginRight="@dimen/config_suggestions_strip_horizontal_margin"
- android:visibility="invisible">
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false">
<TextView
android:id="@+id/word_to_save"
android:layout_width="match_parent"
@@ -49,13 +56,17 @@
android:textAlignment="viewStart"
style="?attr/suggestionWordStyle" />
</LinearLayout>
+ <!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
+ We just need to ignore the system's audio and haptic feedback settings. -->
<LinearLayout
android:id="@+id/important_notice_strip"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/config_suggestions_strip_horizontal_margin"
- android:layout_marginRight="@dimen/config_suggestions_strip_horizontal_margin">
+ android:layout_marginRight="@dimen/config_suggestions_strip_horizontal_margin"
+ android:hapticFeedbackEnabled="false"
+ android:soundEffectsEnabled="false" >
<TextView
android:id="@+id/important_notice_title"
android:layout_width="match_parent"