summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2013-09-01 22:01:25 -0500
committerDavid Barksdale <amatus@amatus.name>2013-09-01 22:01:25 -0500
commit237be1fc4a9aa5763efb364b8c8441f276c06eef (patch)
tree5aef3232eb6cba9dce722a8a64c7e1218dc54b55 /src
parentcae13d7a7968eb7fca68a6d4f7b4da7adf1f24f7 (diff)
Some work on the authenticator_activity UI.
Diffstat (limited to 'src')
-rw-r--r--src/clojure/io/cons/carddav_sync/authenticator_activity.clj28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/clojure/io/cons/carddav_sync/authenticator_activity.clj b/src/clojure/io/cons/carddav_sync/authenticator_activity.clj
index 1b3e496..8956b26 100644
--- a/src/clojure/io/cons/carddav_sync/authenticator_activity.clj
+++ b/src/clojure/io/cons/carddav_sync/authenticator_activity.clj
@@ -1,15 +1,37 @@
(ns io.cons.carddav_sync.authenticator_activity
(:use [neko.activity :only [defactivity set-content-view!]]
+ [neko.resource :only [get-resource]]
[neko.threading :only [on-ui]]
- [neko.ui :only [make-ui]])
+ [neko.ui :only [make-ui]]
+ [neko.ui.mapping :only [defelement]])
+ (:import android.text.InputType
+ android.widget.LinearLayout)
(:gen-class
:extends android.app.Activity
:exposes-methods {onCreate superOnCreate}))
+(defelement :frame-layout
+ :classname android.widget.FrameLayout
+ :inherits :view-group)
+
+(defelement :scroll-view
+ :classname android.widget.ScrollView
+ :inherits :frame-layout)
+
(defn -onCreate
[this savedInstanceState]
(.superOnCreate this savedInstanceState)
(on-ui
(set-content-view! this
- (make-ui [:linear-layout {}
- [:text-view {:text "Authenticator"}]]))))
+ (make-ui [:scroll-view {}
+ [:linear-layout {:orientation :vertical}
+ [:edit-text {:hint (get-resource :string :prompt-user)}]
+ [:edit-text {:hint (get-resource :string :prompt-password)
+ :input-type
+ (bit-or InputType/TYPE_CLASS_TEXT
+ InputType/TYPE_TEXT_VARIATION_PASSWORD)}]
+ [:edit-text {:hint (get-resource :string :prompt-url)
+ :input-type
+ (bit-or InputType/TYPE_CLASS_TEXT
+ InputType/TYPE_TEXT_VARIATION_URI)}]
+ ]]))))