added a little help dialog to gtasks list view

pull/14/head
Tim Su 14 years ago
parent 50b10b7b5b
commit 59e261c731

@ -5,8 +5,11 @@ import android.os.Bundle;
import com.commonsware.cwac.tlv.TouchListView;
import com.commonsware.cwac.tlv.TouchListView.DropListener;
import com.commonsware.cwac.tlv.TouchListView.SwipeListener;
import com.timsu.astrid.R;
import com.todoroo.andlib.data.Property.IntegerProperty;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.activity.DraggableTaskListActivity;
public class GtasksListActivity extends DraggableTaskListActivity {
@ -24,6 +27,14 @@ public class GtasksListActivity extends DraggableTaskListActivity {
getTouchListView().setDropListener(dropListener);
getTouchListView().setSwipeListener(swipeListener);
if(!Preferences.getBoolean(GtasksPreferenceService.PREF_SHOWN_LIST_HELP, false)) {
Preferences.setBoolean(GtasksPreferenceService.PREF_SHOWN_LIST_HELP, true);
DialogUtilities.okDialog(this,
getString(R.string.gtasks_help_title),
android.R.drawable.ic_dialog_info,
getString(R.string.gtasks_help_body), null);
}
}
private final TouchListView.DropListener dropListener = new DropListener() {

@ -36,4 +36,7 @@ public class GtasksPreferenceService extends SyncProviderUtilities {
/** GTasks is apps for domain boolean */
public static final String PREF_IS_DOMAIN = IDENTIFIER + "_domain"; //$NON-NLS-1$
/** GTasks whether we have shown list help boolean */
public static final String PREF_SHOWN_LIST_HELP = IDENTIFIER + "_list_help"; //$NON-NLS-1$
}

@ -12,6 +12,13 @@
<!-- filter title for GTasks lists (%s => list name) -->
<string name="gtasks_FEx_title">Google Tasks: %s</string>
<!-- short help title for Gtasks -->
<string name="gtasks_help_title">Welcome to Google Tasks!</string>
<!-- short help for GTasks list activity -->
<string name="gtasks_help_body">Drag the grabber on the left side of a task
to rearrange it. Swipe the grabber left or right to change indentation.</string>
<!-- ============================================ GtasksLoginActivity == -->

Loading…
Cancel
Save