Skip to content

Commit

Permalink
grant actions to gestures
Browse files Browse the repository at this point in the history
  • Loading branch information
am0c committed Jan 7, 2011
1 parent d17990e commit 54491cf
Showing 1 changed file with 30 additions and 0 deletions.
Expand Up @@ -176,6 +176,36 @@ else if (gestureName.equals("go_bottom")) {
ContextUtil.toast(this, "bottom");
mList.setSelection(mCursor.getCount());
}
else if (gestureName.equals("go_left")) {
ContextUtil.toast(this, "prev day");
try {
changeDate(prevDay(mStrDate));
refresh();
} catch (ParseException e) {
e.printStackTrace();
ContextUtil.toast(ViewerActivity.this, getString(R.string.error_internal));
}
}
else if (gestureName.equals("go_right")) {
ContextUtil.toast(this, "next day");
try {
changeDate(nextDay(mStrDate));
refresh();
} catch (ParseException e) {
e.printStackTrace();
ContextUtil.toast(ViewerActivity.this, getString(R.string.error_internal));
}
}
else if (gestureName.equals("triangle")) {
ContextUtil.toast(this, "today");
String strDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date(System.currentTimeMillis()));
changeDate(strDate);
refresh();
}
else if (gestureName.equals("circle")) {
ContextUtil.toast(this, "refresh");
refresh();
}
break;
}
}
Expand Down

0 comments on commit 54491cf

Please sign in to comment.