Fixed a bug with the sequence of welcome popovers

pull/14/head
Sam Bosley 13 years ago
parent 0d77643a8d
commit 4402461b60

@ -226,6 +226,7 @@ public final class TaskEditActivity extends Activity {
new StartupService().onStartupApplication(this);
setUpUIComponents();
adjustInfoPopovers();
overrideFinishAnim = getIntent().getBooleanExtra(OVERRIDE_FINISH_ANIM, true);
@ -891,6 +892,12 @@ public final class TaskEditActivity extends Activity {
StatisticsService.sessionStop(this);
}
private void adjustInfoPopovers() {
Preferences.setBoolean(R.string.p_showed_tap_task_help, true);
if (!Preferences.isSet(getString(R.string.p_showed_lists_help)))
Preferences.setBoolean(R.string.p_showed_lists_help, false);
}
/* ======================================================================
* ========================================== UI component helper classes
* ====================================================================== */

@ -896,20 +896,22 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
imm.hideSoftInputFromWindow(quickAddBox.getWindowToken(), 0);
getListView().postDelayed(new Runnable() {
public void run() {
final View view = getListView().getChildAt(getListView().getChildCount() - 1);
if (view != null) {
OnDismissListener onDismiss = new OnDismissListener() {
@Override
public void onDismiss() {
if (!Preferences.isSet(getString(R.string.p_showed_lists_help))) {
Preferences.setBoolean(R.string.p_showed_lists_help, false);
} else if (!Preferences.getBoolean(R.string.p_showed_lists_help, false)) {
Preferences.setBoolean(R.string.p_showed_lists_help, true);
HelpInfoPopover.showPopover(TaskListActivity.this, findViewById(R.id.back), R.string.help_popover_lists, null);
if (taskAdapter.getCount() > 0) {
final View view = getListView().getChildAt(getListView().getChildCount() - 1);
if (view != null) {
OnDismissListener onDismiss = new OnDismissListener() {
@Override
public void onDismiss() {
if (!Preferences.isSet(getString(R.string.p_showed_lists_help))) {
Preferences.setBoolean(R.string.p_showed_lists_help, false);
} else if (!Preferences.getBoolean(R.string.p_showed_lists_help, false)) {
Preferences.setBoolean(R.string.p_showed_lists_help, true);
HelpInfoPopover.showPopover(TaskListActivity.this, findViewById(R.id.back), R.string.help_popover_lists, null);
}
}
}
};
HelpInfoPopover.showPopover(TaskListActivity.this, view, R.string.help_popover_tap_task, onDismiss);
};
HelpInfoPopover.showPopover(TaskListActivity.this, view, R.string.help_popover_tap_task, onDismiss);
}
}
}
}, 1000L);

Loading…
Cancel
Save