|
|
@ -21,6 +21,7 @@ import com.timsu.astrid.R;
|
|
|
|
import com.todoroo.andlib.utility.AndroidUtilities;
|
|
|
|
import com.todoroo.andlib.utility.AndroidUtilities;
|
|
|
|
import com.todoroo.astrid.actfm.ActFmLoginActivity;
|
|
|
|
import com.todoroo.astrid.actfm.ActFmLoginActivity;
|
|
|
|
import com.todoroo.astrid.actfm.TagSettingsActivity;
|
|
|
|
import com.todoroo.astrid.actfm.TagSettingsActivity;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.actfm.TagUpdatesFragment;
|
|
|
|
import com.todoroo.astrid.api.Filter;
|
|
|
|
import com.todoroo.astrid.api.Filter;
|
|
|
|
import com.todoroo.astrid.api.FilterListItem;
|
|
|
|
import com.todoroo.astrid.api.FilterListItem;
|
|
|
|
import com.todoroo.astrid.reminders.NotificationFragment;
|
|
|
|
import com.todoroo.astrid.reminders.NotificationFragment;
|
|
|
@ -43,6 +44,7 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
|
|
|
|
|
|
|
|
|
|
|
|
private FragmentPopover listsPopover;
|
|
|
|
private FragmentPopover listsPopover;
|
|
|
|
private FragmentPopover editPopover;
|
|
|
|
private FragmentPopover editPopover;
|
|
|
|
|
|
|
|
private FragmentPopover commentsPopover;
|
|
|
|
private MainMenuPopover mainMenuPopover;
|
|
|
|
private MainMenuPopover mainMenuPopover;
|
|
|
|
|
|
|
|
|
|
|
|
private final OnClickListener mainMenuClickListener = new OnClickListener() {
|
|
|
|
private final OnClickListener mainMenuClickListener = new OnClickListener() {
|
|
|
@ -64,9 +66,18 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
|
|
|
|
private final OnClickListener commentsButtonClickListener = new OnClickListener() {
|
|
|
|
private final OnClickListener commentsButtonClickListener = new OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
|
TaskListFragment tlf = getTaskListFragment();
|
|
|
|
if (fragmentLayout == LAYOUT_DOUBLE) {
|
|
|
|
if (tlf != null)
|
|
|
|
TagUpdatesFragment frag = getTagUpdatesFragment();
|
|
|
|
tlf.commentsButtonClicked();
|
|
|
|
if (frag != null) {
|
|
|
|
|
|
|
|
setupPopoverWithFragment(commentsPopover, frag, null);
|
|
|
|
|
|
|
|
commentsPopover.show(listsNav);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// In this case we should be in LAYOUT_SINGLE--delegate to the task list fragment
|
|
|
|
|
|
|
|
TaskListFragment tlf = getTaskListFragment();
|
|
|
|
|
|
|
|
if (tlf != null)
|
|
|
|
|
|
|
|
tlf.handleCommentsButtonClicked();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -130,6 +141,7 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fragmentLayout = LAYOUT_DOUBLE;
|
|
|
|
fragmentLayout = LAYOUT_DOUBLE;
|
|
|
|
createEditPopover();
|
|
|
|
createEditPopover();
|
|
|
|
|
|
|
|
createCommentsPopover();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setupFragment(FilterListFragment.TAG_FILTERLIST_FRAGMENT,
|
|
|
|
setupFragment(FilterListFragment.TAG_FILTERLIST_FRAGMENT,
|
|
|
@ -168,6 +180,10 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void createCommentsPopover() {
|
|
|
|
|
|
|
|
commentsPopover = new FragmentPopover(this, R.layout.taskedit_popover);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void createMainMenuPopover() {
|
|
|
|
private void createMainMenuPopover() {
|
|
|
|
mainMenuPopover = new MainMenuPopover(this, R.layout.main_menu_popover);
|
|
|
|
mainMenuPopover = new MainMenuPopover(this, R.layout.main_menu_popover);
|
|
|
|
mainMenuPopover.setMenuListener(this);
|
|
|
|
mainMenuPopover.setMenuListener(this);
|
|
|
@ -260,6 +276,8 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
|
|
|
|
editPopover.dismiss();
|
|
|
|
editPopover.dismiss();
|
|
|
|
if (mainMenuPopover != null)
|
|
|
|
if (mainMenuPopover != null)
|
|
|
|
mainMenuPopover.dismiss();
|
|
|
|
mainMenuPopover.dismiss();
|
|
|
|
|
|
|
|
if (commentsPopover != null)
|
|
|
|
|
|
|
|
commentsPopover.dismiss();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setSelectedItem(Filter item) {
|
|
|
|
public void setSelectedItem(Filter item) {
|
|
|
|