                    [android.content.Context android.util.AttributeSet int] [android.content.Context android.util.AttributeSet int]}
     :methods []
     :exposes-methods {onMeasure superOnMeasure
-                      onConfigurationChanged superOnConfigurationChanged
-                      setMeasuredDimension superSetMeasuredDimension})
+                      onConfigurationChanged superOnConfigurationChanged})
   (defn tab-bar-create-state
     [context]
     (let [res (.getResources context)]

            tabs (find-view this (get-resource :id :tabs))
            new-tab (find-view this (get-resource :id :newtab))]
        (.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)
        ))
    ([this context attrs] (tab-bar-post-init this context))
    ([this context attrs def-style] (tab-bar-post-init this context)))
  (defn tab-bar-onConfigurationChanged

          tab-width (get-resource :dimen :tab_width)]
      (set-state! this :tab-width (.getDimension res tab-width))
      (.updateLayout (get-state this :tabs))))
  (defn tab-bar-onMeasure
    [this hspec vspec]
    (.superOnMeasure this hspec vspec)
    (.superSetMeasuredDimension this
                           (- (.getMeasuredWidth this)
                              (get-state this :tab-add-overlap))
                           (.getMeasuredHeight this)))
  (defn tab-bar-onLayout
    [this changed left top right bottom]
    (let [new-tab (get-state this :new-tab)
          tabs (get-state this :tabs)
          pl (.getPaddingLeft this)
          pt (.getPaddingTop this)
          w (- right left pl)
          tab-add-overlap (get-state this :tab-add-overlap)
          button-width (- (.getMeasuredWidth new-tab) tab-add-overlap)
          sw (- w button-width)]
      (.layout tabs pl pt (+ pl sw) (- bottom top))
      (.layout new-tab (- (+ pl sw) tab-add-overlap) pt
               (- (+ pl sw button-width) tab-add-overlap) (- bottom top))))
  )

(defn show-tab-bar
