cpp-124: Phone vibrates even if button action is not triggered

Vibration is now requested manually from places where needed

Fixes #124
This commit is contained in:
serso
2015-02-16 21:56:45 +01:00
parent 08add4f17e
commit 70f4ec953a
19 changed files with 141 additions and 82 deletions

View File

@@ -119,6 +119,7 @@
<string name="c_calc_layout_summary">Устанавливает раскладку кнопок</string>
<string name="c_calc_haptic_feedback_title">Отклик на нажатие</string>
<string name="c_calc_haptic_feedback_summary">Включает/выключает вибрацию по нажатию клавиши</string>
<string name="p_calc_haptic_feedback_strength_disabled">Выключена</string>
<string name="p_calc_haptic_feedback_strength_short">Маленькая</string>
<string name="p_calc_haptic_feedback_strength_middle">Средняя</string>
<string name="p_calc_haptic_feedback_strength_long">Большая</string>

View File

@@ -62,12 +62,14 @@
<item>simple</item>
</string-array>
<string-array name="p_calc_haptic_feedback_duration_names">
<string-array name="cpp_haptic_feedback_names">
<item>@string/p_calc_haptic_feedback_strength_disabled</item>
<item>@string/p_calc_haptic_feedback_strength_short</item>
<item>@string/p_calc_haptic_feedback_strength_middle</item>
<item>@string/p_calc_haptic_feedback_strength_long</item>
</string-array>
<string-array name="p_calc_haptic_feedback_duration_values" translatable="false">
<string-array name="cpp_haptic_feedback_values" translatable="false">
<item>0</item>
<item>30</item>
<item>60</item>
<item>100</item>

View File

@@ -83,11 +83,6 @@
</string>
<string name="p_calc_multiplication_sign" translatable="false">"×"</string>
<string name="p_calc_haptic_feedback_duration_key" translatable="false">
org.solovyev.android.calculator.CalculatorActivity_calc_haptic_feedback_duration_key
</string>
<string name="p_calc_haptic_feedback_duration" translatable="false">" "</string>
<string name="p_calc_ad_free" translatable="false">false</string>
</resources>

View File

@@ -115,7 +115,8 @@
<string name="c_calc_layout_summary">Sets layout of buttons</string>
<string name="c_calc_haptic_feedback_title">Haptic feedback</string>
<string name="c_calc_haptic_feedback_summary">Toggles vibration on button click</string>
<string name="p_calc_haptic_feedback_strength_short">Short</string>
<string name="p_calc_haptic_feedback_strength_disabled">Disabled</string>
<string name="p_calc_haptic_feedback_strength_short">Short</string>
<string name="p_calc_haptic_feedback_strength_middle">Middle</string>
<string name="p_calc_haptic_feedback_strength_long">Long</string>
<string name="p_calc_haptic_feedback_duration_title">Haptic feedback duration</string>

View File

@@ -31,18 +31,12 @@
a:title="@string/c_calc_color_display_title"
a:defaultValue="true"/>
<android.preference.CheckBoxPreference
a:key="@string/p_calc_haptic_feedback_key"
a:summary="@string/c_calc_haptic_feedback_summary"
a:title="@string/c_calc_haptic_feedback_title"
a:defaultValue="false"/>
<ListPreference
a:key="@string/p_calc_haptic_feedback_duration_key"
a:title="@string/p_calc_haptic_feedback_duration_title"
a:entries="@array/p_calc_haptic_feedback_duration_names"
a:summary="@string/p_calc_haptic_feedback_duration_summary"
a:entryValues="@array/p_calc_haptic_feedback_duration_values"/>
a:key="hapticFeedback"
a:title="@string/c_calc_haptic_feedback_title"
a:entries="@array/cpp_haptic_feedback_names"
a:summary="@string/c_calc_haptic_feedback_summary"
a:entryValues="@array/cpp_haptic_feedback_values"/>
<ListPreference
a:key="@string/p_calc_multiplication_sign_key"