 (defn set-elmt-text [activity elmt s]
   (on-ui (config (find-view activity elmt) :text s)))
 
-;(defn update-listings [activity]
-;  (on-ui (config (find-view activity ::listings) :adapter (timer-adapter activity @listing))))
-
 (defn update-ui [activity]
-  (set-elmt-text activity ::listing (format-listing @listing))
   (set-elmt-text activity ::name "")
-  (swap! alphabet update-in [:letters] conj "echo")
   )
 
 (defn add-event [activity]

    [:button {
      :text "+ Event",
      :on-click (fn [_] (add-event activity))}]
    [:text-view {
      :text (format-listing @listing)
      :id ::listing}]
    [:list-view {
      :id ::listings
      :draw-selector-on-top true


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

(defn make-adapter []
  (adapters/ref-adapter
    (fn [_]
      [:linear-layout {:id-holder true}
       [:text-view {:id         ::caption-tv}]])
    (fn [_ view _ date-event]
      (let [tv (find-view view ::caption-tv)]
        (config tv :text (str (nth date-event 0) " " (nth date-event 1) "\n"))))
    listing
    (fn [lst] (into [] (seq lst)))))

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