               ["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

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

  (defn tab-layout-onMeasure
    [this hspec vspec]
    (.superOnMeasure this hspec vspec)
    (let [child-count (.getChildCount this)
          max (java.lang.Math/max 0 (- child-count 1))
          tab-overlap (get-state this :tab-overlap)]
      (.superSetMeasuredDimension this
                                  (- (.getMeasuredWidth this) (* max tab-overlap))
