option to hide quickadd controls

pull/14/head
Sam Bosley 13 years ago
parent 93fbd75115
commit 0ce7921dc3

@ -81,6 +81,9 @@
<string name="p_show_ive_assigned_filter">p_show_assigned_f</string>
<string name="p_show_not_in_list_filter">p_show_no_list_f</string>
<!-- show quickadd controls -->
<string name="p_show_quickadd_controls">p_show_quickadd_controls</string>
<string-array name="TEA_reminder_random_hours">
<!-- values (in hours) associated with items above. -->
<item>1</item>

@ -707,8 +707,10 @@
<string name="EPr_show_list_members_title">Show list members in shared lists</string>
<!-- Preference: simple input box style -->
<string name="EPr_simple_input_boxes">Simple input boxes</string>
<string name="EPr_simple_input_boxes">Simple text boxes</string>
<!-- Preference: simple input box style -->
<string name="EPr_show_quickadd_controls">Advanced quickadd controls</string>
<!-- slide 30f/ 36f: Preference: Theme -->
<string name="EPr_theme_title">Color theme</string>

@ -98,6 +98,11 @@
android:title="@string/EPr_simple_input_boxes"
android:defaultValue="false"/>
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_show_quickadd_controls"
android:title="@string/EPr_show_quickadd_controls"
android:defaultValue="true" />
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_showSmartConfirmation_key"
android:title="@string/EPr_showSmartConfirmation_title"

@ -92,9 +92,6 @@ public class QuickAddBar extends LinearLayout {
@Autowired MetadataService metadataService;
@Autowired ActFmPreferenceService actFmPreferenceService;
// private VoiceInputAssistant voiceInputAssistant;
// private RecognizerApi recognizerApi;
private VoiceRecognizer voiceRecognizer;
private AstridActivity activity;
@ -144,7 +141,8 @@ public class QuickAddBar extends LinearLayout {
quickAddBox.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
quickAddControlsContainer.setVisibility(hasFocus ? View.VISIBLE : View.GONE);
boolean showControls = Preferences.getBoolean(R.string.p_show_quickadd_controls, true);
quickAddControlsContainer.setVisibility((showControls && hasFocus) ? View.VISIBLE : View.GONE);
}
});

Loading…
Cancel
Save