|
|
|
@ -78,7 +78,7 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
private static final int MENU_SEARCH_ID = R.string.FLA_menu_search;
|
|
|
|
private static final int MENU_SEARCH_ID = R.string.FLA_menu_search;
|
|
|
|
private static final int MENU_HELP_ID = R.string.FLA_menu_help;
|
|
|
|
private static final int MENU_HELP_ID = R.string.FLA_menu_help;
|
|
|
|
private static final int MENU_NEW_FILTER_ID = R.string.FLA_new_filter;
|
|
|
|
private static final int MENU_NEW_FILTER_ID = R.string.FLA_new_filter;
|
|
|
|
private static final int MENU_NEW_LIST_ID = R.string.FLA_new_list;
|
|
|
|
//private static final int MENU_NEW_LIST_ID = R.string.FLA_new_list;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int CONTEXT_MENU_SHORTCUT = R.string.FLA_context_shortcut;
|
|
|
|
private static final int CONTEXT_MENU_SHORTCUT = R.string.FLA_context_shortcut;
|
|
|
|
@ -88,6 +88,7 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
static final int REQUEST_VIEW_TASKS = 2;
|
|
|
|
static final int REQUEST_VIEW_TASKS = 2;
|
|
|
|
public static final int REQUEST_NEW_BUTTON = 3;
|
|
|
|
public static final int REQUEST_NEW_BUTTON = 3;
|
|
|
|
public static final int REQUEST_NEW_LIST = 4;
|
|
|
|
public static final int REQUEST_NEW_LIST = 4;
|
|
|
|
|
|
|
|
public static final int REQUEST_NEW_FILTER = 5;
|
|
|
|
|
|
|
|
|
|
|
|
// --- instance variables
|
|
|
|
// --- instance variables
|
|
|
|
|
|
|
|
|
|
|
|
@ -99,6 +100,8 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
|
|
|
|
|
|
|
|
private OnFilterItemClickedListener mListener;
|
|
|
|
private OnFilterItemClickedListener mListener;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private View newListButton;
|
|
|
|
|
|
|
|
|
|
|
|
private boolean mDualFragments;
|
|
|
|
private boolean mDualFragments;
|
|
|
|
|
|
|
|
|
|
|
|
private int mSelectedIndex;
|
|
|
|
private int mSelectedIndex;
|
|
|
|
@ -161,7 +164,7 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
|
|
|
|
|
|
|
|
getActivity().setDefaultKeyMode(Activity.DEFAULT_KEYS_SEARCH_LOCAL);
|
|
|
|
getActivity().setDefaultKeyMode(Activity.DEFAULT_KEYS_SEARCH_LOCAL);
|
|
|
|
//ImageView backButton = (ImageView) getView().findViewById(R.id.back);
|
|
|
|
//ImageView backButton = (ImageView) getView().findViewById(R.id.back);
|
|
|
|
View newListButton = getView().findViewById(R.id.new_list_button);
|
|
|
|
newListButton = getView().findViewById(R.id.new_list_button);
|
|
|
|
|
|
|
|
|
|
|
|
// backButton.setOnClickListener(new OnClickListener() {
|
|
|
|
// backButton.setOnClickListener(new OnClickListener() {
|
|
|
|
// @Override
|
|
|
|
// @Override
|
|
|
|
@ -230,10 +233,6 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
R.string.FLA_new_filter);
|
|
|
|
R.string.FLA_new_filter);
|
|
|
|
item.setIcon(android.R.drawable.ic_menu_add);
|
|
|
|
item.setIcon(android.R.drawable.ic_menu_add);
|
|
|
|
|
|
|
|
|
|
|
|
item = menu.add(Menu.NONE, MENU_NEW_LIST_ID, Menu.NONE,
|
|
|
|
|
|
|
|
R.string.FLA_new_list);
|
|
|
|
|
|
|
|
item.setIcon(android.R.drawable.ic_menu_add);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item = menu.add(Menu.NONE, MENU_SEARCH_ID, Menu.NONE,
|
|
|
|
item = menu.add(Menu.NONE, MENU_SEARCH_ID, Menu.NONE,
|
|
|
|
R.string.FLA_menu_search);
|
|
|
|
R.string.FLA_menu_search);
|
|
|
|
item.setIcon(android.R.drawable.ic_menu_search);
|
|
|
|
item.setIcon(android.R.drawable.ic_menu_search);
|
|
|
|
@ -392,6 +391,12 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
getString(R.string.FLA_toast_onCreateShortcut, label), Toast.LENGTH_LONG).show();
|
|
|
|
getString(R.string.FLA_toast_onCreateShortcut, label), Toast.LENGTH_LONG).show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean onContextItemSelected(MenuItem item) {
|
|
|
|
|
|
|
|
// called when context menu appears
|
|
|
|
|
|
|
|
return onOptionsItemSelected(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean onOptionsItemSelected(final MenuItem item) {
|
|
|
|
public boolean onOptionsItemSelected(final MenuItem item) {
|
|
|
|
// handle my own menus
|
|
|
|
// handle my own menus
|
|
|
|
@ -408,13 +413,7 @@ public class FilterListActivity extends ListFragment {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case MENU_NEW_FILTER_ID : {
|
|
|
|
case MENU_NEW_FILTER_ID : {
|
|
|
|
Intent intent = new Intent(getActivity(), CustomFilterActivity.class);
|
|
|
|
Intent intent = new Intent(getActivity(), CustomFilterActivity.class);
|
|
|
|
startActivity(intent);
|
|
|
|
getActivity().startActivityForResult(intent, REQUEST_NEW_FILTER);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case MENU_NEW_LIST_ID : {
|
|
|
|
|
|
|
|
Intent intent = TagsPlugin.newTagDialog(getActivity());
|
|
|
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
|
|
|
AndroidUtilities.callOverridePendingTransition(getActivity(), R.anim.slide_left_in, R.anim.slide_left_out);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case CONTEXT_MENU_SHORTCUT: {
|
|
|
|
case CONTEXT_MENU_SHORTCUT: {
|
|
|
|
|