import Toybox.Lang; import Toybox.WatchUi; // Input handler for HistoryView. UP/DOWN scroll through events, // BACK returns to the menu. class HistoryDelegate extends WatchUi.BehaviorDelegate { private var _view as HistoryView; function initialize(view as HistoryView) { BehaviorDelegate.initialize(); _view = view; } function onNextPage() as Boolean { _view.showNext(); return true; } function onPreviousPage() as Boolean { _view.showPrev(); return true; } function onBack() as Boolean { WatchUi.popView(WatchUi.SLIDE_RIGHT); return true; } }