         (.setPadding this 0 tab-padding-top 0 0)
         (.setOnClickListener new-tab
                              (on-click (println "on-click")))
-        ;(set-state! this :tabs tabs)
-        ;(set-state! this :new-tab new-tab)
+        (set-state! this :tabs tabs)
+        (set-state! this :new-tab new-tab)
         ))
     ([this context attrs] (tab-bar-post-init this context))
     ([this context attrs def-style] (tab-bar-post-init this context)))

                   [android.content.Context android.util.AttributeSet int] [android.content.Context android.util.AttributeSet int]}
    :methods []
    :exposes-methods {onMeasure superOnMeasure
                      onLayout superOnLayout})
  (defn tab-layout-create-state
    [context]
    (atom {}))
  (defn tab-layout-init
    ([context] [[context] (tab-layout-create-state context)])
    ([context attrs] [[context attrs] (tab-layout-create-state context)])
    ([context attrs def-style] [[context attrs def-style] (tab-layout-create-state context)]))
  (defn tab-layout-post-init
    ([this context]
      ;(.setChildrenDrawingOrderEnabled this true)
      )
    ([this context attrs] (tab-layout-post-init this context))
    ([this context attrs def-style] (tab-layout-post-init this context)))
  (defn tab-layout-onMeasure
    [this hspec vspec]
    (.superOnMeasure this hspec vspec))
  (defn tab-layout-onLayout
    [this changed l t r b]
    (.superOnLayout this changed l t r b))
  )

(do
  (gen-class

    :exposes-methods {onLayout superOnLayout})
  (defn tab-scroll-view-create-state
    [context]
    (atom {:selected -1 :content-view (net.nightweb.tabs.TabLayout. context)}))
  (defn tab-scroll-view-init
    ([context] [[context] (tab-scroll-view-create-state context)])
    ([context attrs] [[context attrs] (tab-scroll-view-create-state context)])
    ([context attrs def-style] [[context attrs def-style] (tab-scroll-view-create-state context)]))
  (defn tab-scroll-view-post-init
    ([this context]
      (let [res (.getResources context)
            tab-first-padding-left (.getDimension res (get-resource :dimen :tab_first_padding_left))
            content-view (get-state this :content-view)]
        (.setHorizontalScrollBarEnabled this false)
        (.setOverScrollMode this android.view.View/OVER_SCROLL_NEVER)
        (.setOrientation content-view android.widget.LinearLayout/HORIZONTAL)
        (.setLayoutParams content-view
                          (android.view.ViewGroup$LayoutParams.
                            android.view.ViewGroup$LayoutParams/WRAP_CONTENT
                            android.view.ViewGroup$LayoutParams/MATCH_PARENT))
        (.setPadding content-view tab-first-padding-left 0 0 0)
        (.addView this content-view)
        (.scrollTo this (.getScrollX this) (.getScrollY this))))
    ([this context attrs] (tab-scroll-view-post-init this context))
    ([this context attrs def-style] (tab-scroll-view-post-init this context)))
  (defn tab-scroll-view-onLayout
