Reorganized edit prefs, added option to increment times by 5

pull/14/head
Sam Bosley 13 years ago
parent fb5c0e0f32
commit 2aaf22722c

@ -34,7 +34,7 @@
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
style="@style/TextAppearance.EditRowDisplay" style="@style/TextAppearance.EditRowDisplay"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:paddingBottom="4dip" android:paddingBottom="10dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="left" /> android:gravity="left" />
</LinearLayout> </LinearLayout>

@ -272,6 +272,10 @@
<string name="p_fullTaskTitle">fullTaskTitle</string> <string name="p_fullTaskTitle">fullTaskTitle</string>
<string name="p_edit_screen">p_edit_screen</string>
<string name="p_time_increment">p_time_increment</string>
<!-- Configurations --> <!-- Configurations -->
<string name="p_configurations">p_configurations</string> <string name="p_configurations">p_configurations</string>
<string name="p_config_default">p_config_default</string> <string name="p_config_default">p_config_default</string>

@ -663,11 +663,17 @@
<!-- slide 34c: Preference: Task List Show Notes --> <!-- slide 34c: Preference: Task List Show Notes -->
<string name="EPr_showNotes_title">Show description in task</string> <string name="EPr_showNotes_title">Show description in task</string>
<!-- Edit screen preference category -->
<string name="EPr_edit_screen_options">Edit screen options</string>
<!-- slide 30e: Preference: Beast mode (auto-expand edit page) --> <!-- slide 30e: Preference: Beast mode (auto-expand edit page) -->
<string name="EPr_beastMode_title">Task edit screen</string> <string name="EPr_beastMode_title">Edit screen order</string>
<string name="EPr_beastMode_shortcut">Customize</string> <string name="EPr_beastMode_shortcut">Customize</string>
<string name="EPr_time_increment">5 minute increments</string>
<!-- slide 35h --> <!-- slide 35h -->
<string name="EPr_beastMode_desc">Customize the layout of the task edit screen</string> <string name="EPr_beastMode_desc">Customize the layout of the task edit screen</string>
<!-- slide 35j --> <!-- slide 35j -->

@ -181,6 +181,13 @@
<item name="android:backgroundDimEnabled">false</item> <item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsFloating">true</item> <item name="android:windowIsFloating">true</item>
</style> </style>
<style name="SaveAsBack">
<item name="abLogo">@drawable/ic_menu_save</item>
</style>
<style name="SaveAsBackWhite">
<item name="abLogo">@drawable/ic_menu_save_blue_alt</item>
</style>
<style name="Theme.Dialog" parent="@android:style/Theme.Dialog"> <style name="Theme.Dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@null</item> <item name="android:windowBackground">@null</item>

@ -65,8 +65,28 @@
</PreferenceScreen> </PreferenceScreen>
<PreferenceScreen android:title="@string/EPr_beastMode_title" <PreferenceScreen android:title="@string/EPr_edit_screen_options"
android:key="@string/p_beastMode"/> android:key="@string/p_edit_screen">
<PreferenceScreen android:title="@string/EPr_beastMode_title"
android:key="@string/p_beastMode"/>
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_show_task_edit_comments"
android:title="@string/EPr_show_task_edit_comments"
android:defaultValue="true"/>
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_time_increment"
android:title="@string/EPr_time_increment"
android:defaultValue="true"/>
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_autoIdea"
android:title="@string/EPr_ideaAuto_title"
android:defaultValue="true" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/EPr_list_view" android:key="@string/p_list_view"> <PreferenceScreen android:title="@string/EPr_list_view" android:key="@string/p_list_view">
<PreferenceScreen android:title="@string/EPr_menu_items" android:key="@string/p_menu_items"> <PreferenceScreen android:title="@string/EPr_menu_items" android:key="@string/p_menu_items">
@ -161,21 +181,11 @@
android:key="@string/p_showSmartConfirmation_key" android:key="@string/p_showSmartConfirmation_key"
android:title="@string/EPr_showSmartConfirmation_title" android:title="@string/EPr_showSmartConfirmation_title"
android:defaultValue="true"/> android:defaultValue="true"/>
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_autoIdea"
android:title="@string/EPr_ideaAuto_title"
android:defaultValue="true" />
<CheckBoxPreference <CheckBoxPreference
android:title="@string/EPr_force_phone_layout" android:title="@string/EPr_force_phone_layout"
android:key="@string/p_force_phone_layout" android:key="@string/p_force_phone_layout"
android:defaultValue="false"/> android:defaultValue="false"/>
<com.todoroo.astrid.ui.MultilineCheckboxPreference
android:key="@string/p_show_task_edit_comments"
android:title="@string/EPr_show_task_edit_comments"
android:defaultValue="true"/>
<CheckBoxPreference <CheckBoxPreference
android:key="@string/p_use_contact_picker" android:key="@string/p_use_contact_picker"

@ -215,8 +215,7 @@ public class EditPreferences extends TodorooPreferenceActivity {
} }
}); });
PreferenceScreen appearance = (PreferenceScreen) screen.getPreference(APPEARANCE_PREFERENCE); Preference beastMode = findPreference(getString(R.string.p_beastMode));
Preference beastMode = appearance.getPreference(3);
beastMode.setOnPreferenceClickListener(new OnPreferenceClickListener() { beastMode.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override @Override
public boolean onPreferenceClick(Preference p) { public boolean onPreferenceClick(Preference p) {
@ -242,6 +241,7 @@ public class EditPreferences extends TodorooPreferenceActivity {
disablePremiumPrefs(); disablePremiumPrefs();
PreferenceScreen appearance = (PreferenceScreen) screen.getPreference(APPEARANCE_PREFERENCE);
if (!AndroidUtilities.isTabletSized(this)) { if (!AndroidUtilities.isTabletSized(this)) {
appearance.removePreference(screen.findPreference(getString(R.string.p_force_phone_layout))); appearance.removePreference(screen.findPreference(getString(R.string.p_force_phone_layout)));
} else { } else {

@ -23,7 +23,12 @@ public class TaskEditActivity extends AstridActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
ThemeService.applyTheme(this); ThemeService.applyTheme(this);
super.onCreate(savedInstanceState); if (ThemeService.getUnsimplifiedTheme() == R.style.Theme_White_Alt)
getTheme().applyStyle(R.style.SaveAsBackWhite, true);
else
getTheme().applyStyle(R.style.SaveAsBack, true);
super.onCreate(savedInstanceState);
setContentView(R.layout.task_edit_wrapper_activity); setContentView(R.layout.task_edit_wrapper_activity);
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
@ -33,6 +38,7 @@ public class TaskEditActivity extends AstridActivity {
actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayShowCustomEnabled(true);
actionBar.setCustomView(R.layout.header_title_view); actionBar.setCustomView(R.layout.header_title_view);
((TextView) actionBar.getCustomView().findViewById(R.id.title)).setText(R.string.TAd_contextEditTask); ((TextView) actionBar.getCustomView().findViewById(R.id.title)).setText(R.string.TAd_contextEditTask);
} }
public void updateTitle(boolean isNewTask) { public void updateTitle(boolean isNewTask) {

@ -1239,9 +1239,11 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
item.setIcon(ThemeService.getDrawable(R.drawable.ic_menu_close)); item.setIcon(ThemeService.getDrawable(R.drawable.ic_menu_close));
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
item = menu.add(Menu.NONE, MENU_SAVE_ID, 0, R.string.TEA_menu_save); if (!(getActivity() instanceof TaskEditActivity)) {
item.setIcon(ThemeService.getDrawable(R.drawable.ic_menu_save)); item = menu.add(Menu.NONE, MENU_SAVE_ID, 0, R.string.TEA_menu_save);
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); item.setIcon(ThemeService.getDrawable(R.drawable.ic_menu_save));
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
}
boolean wouldShowComments = actFmPreferenceService.isLoggedIn() && menu.findItem(MENU_COMMENTS_REFRESH_ID) == null; boolean wouldShowComments = actFmPreferenceService.isLoggedIn() && menu.findItem(MENU_COMMENTS_REFRESH_ID) == null;
if(wouldShowComments && showEditComments) { if(wouldShowComments && showEditComments) {

@ -21,6 +21,7 @@ import android.widget.ToggleButton;
import com.timsu.astrid.R; import com.timsu.astrid.R;
import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.Preferences;
public class AstridTimePicker extends LinearLayout { public class AstridTimePicker extends LinearLayout {
@ -51,6 +52,11 @@ public class AstridTimePicker extends LinearLayout {
hours = (NumberPicker) findViewById(R.id.hours); hours = (NumberPicker) findViewById(R.id.hours);
minutes = (NumberPicker) findViewById(R.id.minutes); minutes = (NumberPicker) findViewById(R.id.minutes);
if (Preferences.getBoolean(R.string.p_time_increment, false))
minutes.setIncrementBy(5);
else
minutes.setIncrementBy(1);
setupButtonBackgrounds(context); setupButtonBackgrounds(context);
initialize(context); initialize(context);

Loading…
Cancel
Save