<commit_before>(ns org.audio.testd.main
  (:require [neko.activity :refer [defactivity set-content-view!]]
            [neko.debug :refer [*a]]
            [neko.threading :refer [on-ui]]
            [neko.action-bar :refer :all]
            [neko.notify :refer [toast]]
            ))

(defactivity org.audio.testd.MainActivity
             :key :main
             :def a
             :on-create
             (fn [this bundle]
               (on-ui
                 (setup-action-bar
                   a {:title           "Testd Clojure"
                      :icon            (neko.resource/get-drawable :android/btn-star-big-on)
                      :display-options [:show-home :show-title :home-as-up]
                      :subtitle        "Lein Droid"
                      :navigation-mode :tabs
                      :tabs            [
                                        [:tab {:text         "Alpha"
                                               :tab-listener (tab-listener
                                                               :on-tab-selected (fn [tab ft]
                                                                                  (toast "alpha")))}]
                                        [:tab {:text         "Beta"
                                               :tab-listener (tab-listener
                                                               :on-tab-selected (fn [tab ft]
                                                                                  (toast "beta")))}]]}))))<commit_msg>* rewrote MainActivity using make-ui<commit_after>(ns org.audio.testd.main
  (:require [neko.activity :refer [defactivity set-content-view!]]
            [neko.debug :refer [*a]]
            [neko.threading :refer [on-ui]]
            [neko.action-bar :refer :all]
            [neko.ui :refer :all]
            [neko.notify :refer [toast]]
            ))

;; https://gist.github.com/alexander-yakushev/2907442

;(def stuff-ui-tree (comp vec concat))

(defn start-recording
  []
  (toast "Started Recording"))

(defactivity org.audio.testd.MainActivity
             :key :main
             :def foobar
             :on-create
             (fn [this bundle]
               (on-ui
                 (set-content-view!
                   foobar
                   (make-ui
                     [:linear-layout {:orientation :vertical}
                      [:button {:text     "Record"
                                :on-click (fn [_] (start-recording))}]])))))

(defactivity org.audio.testd.ActionBarActivity
             :key :main
             :def a
             :on-create
             (fn [this bundle]
               (on-ui
                 (setup-action-bar
                   a {:title           "Testd Clojure"
                      :icon            (neko.resource/get-drawable :android/btn-star-big-on)
                      :display-options [:show-home :show-title :home-as-up]
                      :subtitle        "Lein Droid"
                      :navigation-mode :tabs
                      :tabs            [
                                        [:tab {:text         "Record"
                                               :tab-listener (tab-listener
                                                               :on-tab-selected (fn [tab ft]
                                                                                  (toast "record")))}]
                                        [:tab {:text         "Compare"
                                               :tab-listener (tab-listener
                                                               :on-tab-selected (fn [tab ft]
                                                                                  (toast "compare")))}]]}))))
{'fraction_non_alphanumeric': 0.10258459898747668, 'fraction_numerical': 0.0018651745270450307, 'mean_word_length': 0.7867682056163732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5547102', 'n_tokens_mistral': 874, 'n_tokens_neox': 838, 'n_words': 180}