         (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) ))
-
-        ))
+        (config event-view :text (str (:name task) " " (:duration task) " " (:date-index task)))))
     listing
     sorted-map-array-to-array-task))
 
 (defn main-layout [activity]
   [:linear-layout {:orientation :vertical}
-    [:edit-text {
-      :hint "Event name",
-      :id ::name}]
-    [:linear-layout {:orientation :horizontal}
-      [:text-view {
-        :hint "Goal (Time)",
-        :id ::time}]
-      [:button {
-        :text "...",
-        :on-click (fn [_] (show-picker activity
-          (time-picker activity), "timePicker"))}]]
-    [:linear-layout {:orientation :horizontal}
-      [:text-view {
-        :hint "Event date",
-        :id ::date}]
-      [:button {
-        :text "...",
-        :on-click (fn [_] (show-picker activity
-          (date-picker activity) "datePicker"))}]]
-    [:button {
-      :text "+ Event",
-      :on-click (fn [_] (add-event activity))}]
-    [:list-view {
-      :id ::days
-      :draw-selector-on-top true
-      :adapter (make-date-adapter activity)}]])
+   [:edit-text {
+                :hint "Event name",
+                :id   ::name}]
+   [:linear-layout {:orientation :horizontal}
+    [:text-view {:hint "Goal (Time)",
+                 :id   ::time}]
+    [:button {:text     "...",
+              :on-click (fn [_] (show-picker activity
+                                             (time-picker activity), "timePicker"))}]]
+   [:linear-layout {:orientation :horizontal}
+    [:text-view {:hint "Event date",
+                 :id   ::date}]
+    [:button {:text     "...",
+              :on-click (fn [_] (show-picker activity
+                                             (date-picker activity) "datePicker"))}]]
+   [:button {:text     "+ Event",
+             :on-click (fn [_] (add-event activity))}]
+   [:list-view {:id                   ::days
+                :draw-selector-on-top true
+                :adapter              (make-date-adapter)}]])
 
 (defn get-elmt [activity elmt]
   (str (.getText ^TextView (find-view activity elmt))))

  (proxy [DialogFragment DatePickerDialog$OnDateSetListener] []
    (onCreateDialog [savedInstanceState]
      (let [c (Calendar/getInstance)
        year (.get c Calendar/YEAR)
        month (.get c Calendar/MONTH)
        day (.get c Calendar/DAY_OF_MONTH)]
        (DatePickerDialog. activity this year month day)))
    (onDateSet [view year month day]
      (set-elmt-text activity ::date
        (format "%d%02d%02d" year (inc month) day)))))

(defn time-picker [activity]
  (proxy [DialogFragment TimePickerDialog$OnTimeSetListener] []

      (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
             (onCreate [this bundle]
                       (.superOnCreate this bundle)
                       (on-ui (set-content-view! (*a) (main-layout (*a))))))