|
1 | 1 | (ns plain.someactivity2
|
2 |
| - (:require [clojure.tools.nrepl.server :as repl] |
3 |
| - [clojure.core.async :as a] |
4 |
| - [org.httpkit.client :as http]) |
| 2 | + (:require |
| 3 | + [clojure.tools.nrepl.server :as repl] |
| 4 | + [clojure.core.async :as a] |
| 5 | + [org.httpkit.client :as http]) |
5 | 6 | (:import
|
6 | 7 | (android.support.v7.app AppCompatActivity)
|
7 | 8 | (android.util Log)
|
|
20 | 21 | (com.mindorks.tensorflowexample TensorFlowImageClassifier Classifier))
|
21 | 22 | (:gen-class
|
22 | 23 | :name "plain.someactivity2.MyActivity"
|
23 |
| - :exposes-methods {onCreate superOnCreate} |
| 24 | + :exposes-methods {onCreate superOnCreate |
| 25 | + onResume superonResume |
| 26 | + onPause superonPause |
| 27 | + onDestroy superonDestroy} |
24 | 28 | :extends android.support.v7.app.AppCompatActivity
|
25 | 29 | :prefix "some-"))
|
26 | 30 |
|
|
92 | 96 | (.captureImage camera-view))))
|
93 | 97 | )
|
94 | 98 | #_(.. this
|
95 |
| - (findViewById com.example.ndksample.myapplication.R$id/getButton) |
96 |
| - (setOnClickListener (reify android.view.View$OnClickListener |
97 |
| - (onClick [this v] |
98 |
| - (Log/i "clojure" "hello"))))) |
| 99 | + (findViewById com.example.ndksample.myapplication.R$id/getButton) |
| 100 | + (setOnClickListener (reify android.view.View$OnClickListener |
| 101 | + (onClick [this v] |
| 102 | + (Log/i "clojure" "hello"))))) |
99 | 103 |
|
100 | 104 | #_(let [tv (.findViewById this com.example.ndksample.myapplication.R$id/text)
|
101 |
| - handler (Handler.)] |
102 |
| - (.start (Thread. (fn [] |
103 |
| - (let [data (:body @(fetch "https://clojure.org"))] |
104 |
| - (.post handler #(.setText tv data)))))))) |
| 105 | + handler (Handler.)] |
| 106 | + (.start (Thread. (fn [] |
| 107 | + (let [data (:body @(fetch "https://clojure.org"))] |
| 108 | + (.post handler #(.setText tv data)))))))) |
0 commit comments