Popover on first created task

pull/14/head
Sam Bosley 15 years ago
parent 594ff4ea79
commit 3a45e92b52

@ -753,6 +753,7 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
currentCursor.moveToPosition(i); currentCursor.moveToPosition(i);
if(currentCursor.get(Task.ID) == withCustomId) { if(currentCursor.get(Task.ID) == withCustomId) {
getListView().setSelection(i); getListView().setSelection(i);
showHelpPopover();
return; return;
} }
} }
@ -779,11 +780,24 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
currentCursor.moveToPosition(i); currentCursor.moveToPosition(i);
if(currentCursor.get(Task.ID) == withCustomId) { if(currentCursor.get(Task.ID) == withCustomId) {
getListView().setSelection(i); getListView().setSelection(i);
showHelpPopover();
break; break;
} }
} }
} }
private void showHelpPopover() {
if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
getListView().postDelayed(new Runnable() {
public void run() {
View view = getListView().getChildAt(getListView().getChildCount() - 1);
HelpInfoPopover.showPopover(TaskListActivity.this, view, R.string.help_popover_tap_task);
}
}, 1000L);
}
}
/* ====================================================================== /* ======================================================================
* ============================================================== actions * ============================================================== actions
* ====================================================================== */ * ====================================================================== */

Loading…
Cancel
Save