         day (.get c Calendar/DAY_OF_MONTH)]
         (DatePickerDialog. activity this year month day)))
     (onDateSet [view year month day]
-      (set-elmt activity ::date
+      (set-elmt-text activity ::date
         (format "%d%02d%02d" year (inc month) day)))))
 
 (defn time-picker [activity]

            [neko.debug :refer [*a]]
            [neko.ui :refer [config]]
            [neko.log :as log]
            [clojure.string :refer [join]]
            [neko.find-view :refer [find-view]]
            [neko.threading :refer [on-ui]])
  (:import android.widget.TextView
           (java.util Calendar)
           (android.app Activity)
           (android.app DatePickerDialog DatePickerDialog$OnDateSetListener)
           (android.app TimePickerDialog TimePickerDialog$OnTimeSetListener)
           (android.app DialogFragment)))

(declare add-event)
(declare date-picker)
(declare time-picker)

(defn show-picker [activity dp picker-type]
  (. dp show (. activity getFragmentManager) picker-type))

(def listing (atom (sorted-map)))

(defn format-events [events]
  (->> (map (fn [[event]]
    (format "%s\n" event))
    events)
  (join "                      ")))

(defn format-listing [lst]
  (->> (map (fn [[date events]]
      (format "%s - %s" date (format-events events)))
    lst)
  join))

(defn main-layout [activity]
  [:linear-layout {:orientation :vertical}

    (onCreateDialog [savedInstanceState]
      (TimePickerDialog. activity this 0 0 true))
    (onTimeSet [view hourOfDay minute]
      (set-elmt-text activity ::time
        (format "%d"  (+ (* hourOfDay 60) minute))))))

(defactivity com.example.gt.metime.MainActivity
  :key :main
