   + A view object, which will be used directly
   + An integer presumed to be a valid layout ID."
   [^Activity activity, view]
-  {:pre [(activity? activity)]}
+  {:pre [(instance? Activity activity)]}
   (cond
    (instance? View view)
    (.setContentView activity ^View view)

(ns neko.activity
  "Utilities to aid in working with an activity."
  {:author "Daniel Solano Gómez"}
  (:require neko.init
            [neko.ui :refer [make-ui]]
            [neko.debug :refer [all-activities]]
            [neko.-utils :refer :all])
  (:import android.app.Activity
           android.view.View
           android.app.Fragment))

(defn activity?
  "Determines whether the argument is an instance of Activity."
  [x]
  (instance? Activity x))

(defn ^View get-decor-view
  "Returns the root view of the given activity."

  - same as :on-create but require a one-argument function."
  [name & {:keys [extends prefix on-create on-create-options-menu
                  on-options-item-selected on-activity-result
                  on-new-intent def state key features]
           :as options}]
  (let [options (or options {}) ;; Handle no-options case
        sname (simple-name name)
        prefix (or prefix (str sname "-"))
        state (or state `(atom {}))]
    (when def
      (println "WARNING: :def attribute in defactivity is deprecated.
Use (*a) to get the current activity."))
