|
|
@ -29,6 +29,7 @@ import android.database.Cursor;
|
|
|
|
import android.graphics.PixelFormat;
|
|
|
|
import android.graphics.PixelFormat;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
|
|
|
import android.support.v4.app.ActionBar;
|
|
|
|
import android.support.v4.app.Fragment;
|
|
|
|
import android.support.v4.app.Fragment;
|
|
|
|
import android.support.v4.app.ListFragment;
|
|
|
|
import android.support.v4.app.ListFragment;
|
|
|
|
import android.support.v4.app.SupportActivity;
|
|
|
|
import android.support.v4.app.SupportActivity;
|
|
|
@ -840,10 +841,15 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
|
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
|
|
|
|
|
|
|
|
|
if (!Preferences.getBoolean(R.string.p_showed_add_task_help, false)) {
|
|
|
|
if (!Preferences.getBoolean(R.string.p_showed_add_task_help, false)) {
|
|
|
|
|
|
|
|
quickAddBox.postDelayed(new Runnable() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void run() {
|
|
|
|
HelpInfoPopover.showPopover(getActivity(), quickAddBox,
|
|
|
|
HelpInfoPopover.showPopover(getActivity(), quickAddBox,
|
|
|
|
R.string.help_popover_add_task, null);
|
|
|
|
R.string.help_popover_add_task, null);
|
|
|
|
Preferences.setBoolean(R.string.p_showed_add_task_help, true);
|
|
|
|
Preferences.setBoolean(R.string.p_showed_add_task_help, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (resultCode != Activity.RESULT_CANCELED) {
|
|
|
|
if (resultCode != Activity.RESULT_CANCELED) {
|
|
|
|
if (data != null
|
|
|
|
if (data != null
|
|
|
@ -1034,31 +1040,32 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
|
|
|
|
|
|
|
|
|
|
|
|
private void showTaskEditHelpPopover() {
|
|
|
|
private void showTaskEditHelpPopover() {
|
|
|
|
if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
|
|
|
|
if (!Preferences.getBoolean(R.string.p_showed_tap_task_help, false)) {
|
|
|
|
Preferences.setBoolean(R.string.p_showed_tap_task_help, true);
|
|
|
|
|
|
|
|
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
|
|
|
|
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
|
|
|
|
Context.INPUT_METHOD_SERVICE);
|
|
|
|
Context.INPUT_METHOD_SERVICE);
|
|
|
|
imm.hideSoftInputFromWindow(quickAddBox.getWindowToken(), 0);
|
|
|
|
imm.hideSoftInputFromWindow(quickAddBox.getWindowToken(), 0);
|
|
|
|
getListView().postDelayed(new Runnable() {
|
|
|
|
getListView().postDelayed(new Runnable() {
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
if (taskAdapter.getCount() > 0) {
|
|
|
|
if (taskAdapter != null && taskAdapter.getCount() > 0) {
|
|
|
|
|
|
|
|
Preferences.setBoolean(R.string.p_showed_tap_task_help, true);
|
|
|
|
final View view = getListView().getChildAt(
|
|
|
|
final View view = getListView().getChildAt(
|
|
|
|
getListView().getChildCount() - 1);
|
|
|
|
getListView().getChildCount() - 1);
|
|
|
|
if (view != null) {
|
|
|
|
if (view != null) {
|
|
|
|
OnDismissListener onDismiss = new OnDismissListener() {
|
|
|
|
OnDismissListener onDismiss = new OnDismissListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onDismiss() {
|
|
|
|
public void onDismiss() {
|
|
|
|
if (!Preferences.isSet(getString(R.string.p_showed_lists_help))) {
|
|
|
|
if (!Preferences.getBoolean(
|
|
|
|
Preferences.setBoolean(
|
|
|
|
|
|
|
|
R.string.p_showed_lists_help,
|
|
|
|
|
|
|
|
false);
|
|
|
|
|
|
|
|
} else if (!Preferences.getBoolean(
|
|
|
|
|
|
|
|
R.string.p_showed_lists_help, false)) {
|
|
|
|
R.string.p_showed_lists_help, false)) {
|
|
|
|
|
|
|
|
if (AndroidUtilities.isTabletSized(getActivity())) {
|
|
|
|
|
|
|
|
((AstridActivity) getActivity()).getFilterListFragment().showAddListPopover();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ActionBar ab = ((AstridActivity) getActivity()).getSupportActionBar();
|
|
|
|
|
|
|
|
View anchor = ab.getCustomView().findViewById(R.id.lists_nav);
|
|
|
|
|
|
|
|
HelpInfoPopover.showPopover(getActivity(),
|
|
|
|
|
|
|
|
anchor, R.string.help_popover_switch_lists, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
Preferences.setBoolean(
|
|
|
|
Preferences.setBoolean(
|
|
|
|
R.string.p_showed_lists_help,
|
|
|
|
R.string.p_showed_lists_help,
|
|
|
|
true);
|
|
|
|
true);
|
|
|
|
// HelpInfoPopover.showPopover(getActivity(),
|
|
|
|
|
|
|
|
// getView().findViewById(R.id.back),
|
|
|
|
|
|
|
|
// R.string.help_popover_lists, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|