               ["setSelectedTab" [android.view.View] void]
               ["getSelectedTab" [] int]
               ["animateScroll" [int] void]]
-    :exposes-methods {onLayout superOnLayout})
+    :exposes-methods {onLayout superOnLayout
+                      onScrollChanged superOnScrollChanged})
   (gen-class
     :name "net.nightweb.tabs.TabLayout"
     :extends net.nightweb.LinearLayout

    [this changed l t r b]
    (.superOnLayout this changed l t r b)
    (if (> (.getChildCount this) 1)
      (for [i (range 1 (.getChildCount this))
            :let [first-child (.getChildAt this 0)
                  tab-overlap (get-state this :tab-overlap)
                  left (- (.getRight first-child) tab-overlap)
                  total-left (* left i)
                  tab (.getChildAt this i)
                  w (- (.getRight tab) (.getLeft tab))]]
        (.layout tab total-left (.getTop tab) (+ total-left w) (.getBottom tab)))))
  (defn tab-layout-getChildDrawingOrder
    [this cnt i]
    (let [selected (.getSelectedTab (get-state this :tabs))

      (.setTitle tab-view "New Tab")
      (.setOnClickListener tab-view (on-click (.setSelectedTab this view)))
      (.addView content-view tab-view)
      (.setActivated tab-view false)))
  (defn tab-scroll-view-setSelectedTab
    [this view]
    (let [content-view (get-state this :content-view)
