                                                                    (let [out (java.io.StringWriter.)]
                                                                      (pprint sizes out)
                                                                      (.toString out))}]))
-                               "stop" (sv (layout this [:text-view {:text "..."}]))
+                               "stop" (sv (layout this idle-screen))
                                :default))))
           sizes {:rear  (camera/preview-sizes 0)
                  :front (camera/preview-sizes 1)}]

(defn save-locally! [activity instruction]
  (when-let [name (:name instruction)]
    (when-let [url (:url instruction)]
      (server/get-bytes url
                        (fn [bytes]
                          (storage/write-bytes! bytes name))))))

(defn view-local [activity instruction]
  (when-let [name (:name instruction)]

(defn swap-view! [activity view]
  (replace-view! activity view))

(def idle-screen
  [:relative-layout {:layout-width :fill
                     :layout-height :fill}
   [:text-view {:text " °"
                :id ::status-indicator
                :text-size 50
                :text-color Color/RED}]])

(defn setup-video-view [view activity path]
  (doto view
    (fit-linear-layout!)
    (setVideoSource path)
    (.setOnCompletionListener
     (reify
       MediaPlayer$OnCompletionListener
       (onCompletion [this mp]
         (swap-view! activity (layout activity idle-screen)))))
    (.start))
  view)

