 (declare date-picker)
 (declare time-picker)
 
+(defrecord Task [date name duration date-index])
+
 (defn show-picker [activity picker picker-type]
   (. picker show (. activity getFragmentManager) picker-type))
 
 (def listing (atom (sorted-map)))
 
-(defn make-adapter []
+
+
+(defn sorted-map-array-to-array-task [lst]
+  (mapcat identity (map (fn [sorted-map-data]
+                          (into [] (map-indexed (fn [i ele]  (apply ->Task (concat [(first sorted-map-data)] ele [i]))) (second sorted-map-data)))
+                          ) lst)))
+
+
+(defn make-date-adapter [activity]
   (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"))))
+      [:linear-layout {:id-holder true
+                       :orientation :vertical}
+       [:text-view {:id ::date-tv}]
+       [:text-view {:id ::event-tv}]
+       ])
+    (fn [_ view _ task]
+      (let [date-view (find-view view ::date-tv)
+            event-view (find-view view ::event-tv)]
+        ;symptom of mutability
+        (config date-view :visibility (if (= (:date-index task) 0) View/VISIBLE View/GONE))
+        (config date-view :text (str (:date task)))
+
+        (config event-view :text (str (:name task) " " (:duration task) " " (:date-index task) ))
+
+        ))
     listing
-    (fn [lst] (into [] (seq lst)))))
+    sorted-map-array-to-array-task))
 
 (defn main-layout [activity]
   [:linear-layout {:orientation :vertical}

  (on-ui (config (find-view activity elmt) :text s)))

(defn update-ui [activity]
  (set-elmt-text activity ::name "")
  )

(defn add-event [activity]
  (let [

(ns com.example.gt.metime.main
  (:require [neko.activity :refer [defactivity set-content-view!]]
            [neko.debug :refer [*a]]
            [neko.ui :refer [config make-ui]]
            [neko.log :as log]
            [neko.ui.adapters :as adapters]
            [clojure.string :refer [join]]
