Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nebogeo
symbai
Commits
90e8000b
Commit
90e8000b
authored
Mar 05, 2014
by
Dave Griffiths
Browse files
local activities work, more formatting, title page
parent
036b1e9c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
357 additions
and
54 deletions
+357
-54
android/AndroidManifest.xml
android/AndroidManifest.xml
+2
-1
android/assets/fonts/ConcertOne-Regular.ttf
android/assets/fonts/ConcertOne-Regular.ttf
+0
-0
android/assets/lib.scm
android/assets/lib.scm
+2
-2
android/assets/starwisp.scm
android/assets/starwisp.scm
+180
-51
android/res/drawable/bg.png
android/res/drawable/bg.png
+0
-0
android/res/drawable/bg_style.xml
android/res/drawable/bg_style.xml
+5
-0
android/res/drawable/bgpaw.png
android/res/drawable/bgpaw.png
+0
-0
android/res/drawable/face.png
android/res/drawable/face.png
+0
-0
android/res/drawable/swarmbutton.xml
android/res/drawable/swarmbutton.xml
+40
-0
android/src/foam/symbai/VillageActivity.java
android/src/foam/symbai/VillageActivity.java
+30
-0
android/src/foam/symbai/starwisp.java
android/src/foam/symbai/starwisp.java
+98
-0
No files found.
android/AndroidManifest.xml
View file @
90e8000b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
android:hardwareAccelerated=
"true"
android:hardwareAccelerated=
"true"
>
>
<activity
android:name=
"foam.s
tarwisp
.starwisp"
<activity
android:name=
"foam.s
ymbai
.starwisp"
android:configChanges=
"orientation"
android:configChanges=
"orientation"
android:label=
"@string/app_name"
>
android:label=
"@string/app_name"
>
<intent-filter>
<intent-filter>
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
"foam.symbai.VillageActivity"
android:configChanges=
"orientation"
></activity>
</application>
</application>
...
...
android/assets/fonts/ConcertOne-Regular.ttf
0 → 100644
View file @
90e8000b
File added
android/assets/lib.scm
View file @
90e8000b
...
@@ -639,10 +639,10 @@
...
@@ -639,10 +639,10 @@
(
list
0
0
0
0
)
(
list
0
0
0
0
)
l
))
l
))
(
define
(
relative
-
rules
rules
.
l
)
(
define
(
relative
rules
colour
.
l
)
(
relative-layout
(
relative-layout
0
(
rlayout
'fill-parent
'wrap-content
20
rules
)
0
(
rlayout
'fill-parent
'wrap-content
20
rules
)
(
list
0
255
0
127
)
colour
l
))
l
))
(
define
(
activity
name
layout
on-create
on-start
on-resume
on-pause
on-stop
on-destroy
on-activity-result
)
(
define
(
activity
name
layout
on-create
on-start
on-resume
on-pause
on-stop
on-destroy
on-activity-result
)
...
...
android/assets/starwisp.scm
View file @
90e8000b
...
@@ -42,41 +42,99 @@
...
@@ -42,41 +42,99 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; user interface abstraction
;; user interface abstraction
;;;;;;;;;;;;; i18n ;;;;;;;;;;;;;;;;;;;;;;
(
define
i18n-lang
0
)
(
define
i18n-text
(
list
(
list
'title
(
list
"Symbai"
"Symbai"
"Symbai"
))
(
list
'sync
(
list
"Sync"
"Sync"
"Sync"
))
(
list
'languages
(
list
"Choose language"
"Choose language"
"Choose language"
))
(
list
'english
(
list
"English"
"English"
"English"
))
(
list
'khasi
(
list
"Khasi"
"Khasi"
"Khasi"
))
(
list
'hindi
(
list
"Hindi"
"Hindi"
"Hindi"
))
(
list
'user-id
(
list
"User ID"
"User ID"
"User ID"
))
(
list
'ok
(
list
"Ok"
"Ok"
"Ok"
))
(
list
'cancel
(
list
"Cancel"
"Cancel"
"Cancel"
))
))
(
define
(
mtext-lookup
id
)
(
alog
id
)
(
define
(
_
l
)
(
cond
((
null?
l
)
(
string-append
(
symbol->string
id
)
" not translated"
))
((
eq?
(
car
(
car
l
))
id
)
(
list-ref
(
cadr
(
car
l
))
i18n-lang
))
(
else
(
_
(
cdr
l
)))))
(
_
i18n-text
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(
define
(
mbutton
id
title
fn
)
(
define
(
mbutton
id
title
fn
)
(
button
(
make-id
id
)
title
30
(
layout
'fill-parent
'wrap-content
-1
'left
0
)
fn
))
(
button
(
make-id
id
)
(
mtext-lookup
title
)
40
(
layout
'fill-parent
'wrap-content
-1
'left
5
)
fn
))
(
define
(
mbutton-scale
id
title
fn
)
(
define
(
mbutton-scale
id
title
fn
)
(
button
(
make-id
id
)
title
30
(
layout
'fill-parent
'wrap-content
1
'left
0
)
fn
))
(
button
(
make-id
id
)
(
mtext-lookup
title
)
(
define
(
mbutton2
id
title
fn
)
40
(
layout
'fill-parent
'wrap-content
1
'left
5
)
fn
))
(
button
(
make-id
id
)
title
30
(
layout
150
100
1
'left
0
)
fn
))
(
define
(
mtoggle-button
id
title
fn
)
(
define
(
mtoggle-button
id
title
fn
)
(
toggle-button
(
make-id
id
)
title
30
(
layout
'fill-parent
'wrap-content
1
'left
0
)
"fancy"
fn
))
(
toggle-button
(
make-id
id
)
(
mtext-lookup
title
)
30
(
layout
'fill-parent
'wrap-content
1
'left
0
)
"fancy"
fn
))
(
define
(
mtoggle-button-yes
id
title
fn
)
(
define
(
mtoggle-button-yes
id
title
fn
)
(
toggle-button
(
make-id
id
)
title
30
(
layout
49
43
1
'left
0
)
"yes"
fn
))
(
toggle-button
(
make-id
id
)
(
mtext-lookup
title
)
30
(
layout
49
43
1
'left
0
)
"yes"
fn
))
(
define
(
mtoggle-button-maybe
id
title
fn
)
(
define
(
mtoggle-button-maybe
id
title
fn
)
(
toggle-button
(
make-id
id
)
title
30
(
layout
49
43
1
'left
0
)
"maybe"
fn
))
(
toggle-button
(
make-id
id
)
(
mtext-lookup
title
)
30
(
layout
49
43
1
'left
0
)
"maybe"
fn
))
(
define
(
mtoggle-button-no
id
title
fn
)
(
define
(
mtoggle-button-no
id
title
fn
)
(
toggle-button
(
make-id
id
)
title
30
(
layout
49
43
1
'left
0
)
"no"
fn
))
(
toggle-button
(
make-id
id
)
(
mtext-lookup
title
)
(
define
(
mtoggle-button2
id
title
fn
)
30
(
layout
49
43
1
'left
0
)
"no"
fn
))
(
toggle-button
(
make-id
id
)
title
30
(
layout
150
100
1
'left
0
)
"plain"
fn
))
(
define
(
mtext
id
text
)
(
define
(
mtext
id
text
)
(
text-view
(
make-id
id
)
text
30
wrap
))
(
text-view
(
make-id
id
)
(
mtext-lookup
text
)
30
(
layout
'wrap-content
'wrap-content
-1
'left
0
)))
(
define
(
mtext-scale
id
text
)
(
text-view
(
make-id
id
)
(
mtext-lookup
text
)
30
(
layout
'wrap-content
'wrap-content
1
'left
0
)))
(
define
(
mtitle
id
text
)
(
define
(
mtitle
id
text
)
(
text-view
(
make-id
id
)
text
50
(
layout
'fill-parent
'wrap-content
-1
'left
0
)))
(
text-view
(
make-id
id
)
(
mtext-lookup
text
)
50
(
layout
'fill-parent
'wrap-content
-1
'left
0
)))
(
define
(
medit-text
id
text
type
fn
)
(
define
(
medit-text
id
text
type
fn
)
(
vert
(
vert
(
mtext
(
string-append
id
"-title"
)
text
)
(
mtext
(
string-append
id
"-title"
)
text
)
(
edit-text
(
make-id
id
)
""
30
type
fillwrap
fn
)))
(
edit-text
(
make-id
id
)
""
30
type
fillwrap
fn
)))
(
define
(
mspinner
id
name
types
fn
)
(
vert
(
mtext
""
name
)
(
spinner
(
make-id
(
string-append
id
"-spinner"
))
(
map
mtext-lookup
types
)
fillwrap
(
lambda
(
c
)
(
fn
c
)))))
(
define
(
mspinner-other
id
name
types
fn
)
(
horiz
(
mspinner
id
name
types
fn
(
lambda
(
c
)
(
fn
c
)))
(
vert
(
mtext
""
'other
)
(
edit-text
(
make-id
(
string-append
id
"-edit-text"
))
""
30
"normal"
fillwrap
(
lambda
(
t
)
(
fn
t
))))))
(
define
(
mclear-toggles
id-list
)
(
define
(
mclear-toggles
id-list
)
(
map
(
map
(
lambda
(
id
)
(
lambda
(
id
)
...
@@ -90,16 +148,6 @@
...
@@ -90,16 +148,6 @@
r
(
cons
(
update-widget
'toggle-button
(
get-id
id
)
'checked
0
)
r
)))
r
(
cons
(
update-widget
'toggle-button
(
get-id
id
)
'checked
0
)
r
)))
'
()
id-list
))
'
()
id-list
))
(
define
(
xwise
n
l
)
(
define
(
_
c
l
)
(
cond
((
null?
l
)
(
if
(
null?
c
)
'
()
(
list
c
)))
((
eqv?
(
length
c
)
(
-
n
1
))
(
cons
(
append
c
(
list
(
car
l
)))
(
_
'
()
(
cdr
l
))))
(
else
(
_
(
append
c
(
list
(
car
l
)))
(
cdr
l
)))))
(
_
'
()
l
))
;;;;
;;;;
(
define
(
db-mongooses-by-pack
)
(
define
(
db-mongooses-by-pack
)
...
@@ -221,26 +269,49 @@
...
@@ -221,26 +269,49 @@
(
define-fragment-list
(
define-fragment-list
(
fragment
(
fragment
"pf-timer"
"top"
(
relative-layout
(
horiz
(
make-id
""
)
fillwrap
trans-col
(
image-view
0
"face"
(
layout
48
64
-1
'left
0
))
(
list
(
text-view
(
make-id
""
)
'title
30
(
mtitle
"pf-details"
"Pack: xxx Pup: xxx"
)))
(
layout
'fill-parent
'fill-parent
0.25
'centre
10
))
(
linear-layout
0
'vertical
(
layout
'fill-parent
'wrap-content
0.75
'left
0
)
(
list
0
0
0
0
)
(
list
(
text-view
(
make-id
""
)
'name
20
(
layout
'fill-parent
'wrap-content
1
'left
0
))
(
text-view
(
make-id
""
)
'photoid
20
(
layout
'fill-parent
'wrap-content
1
'left
0
)))))
(
lambda
(
fragment
arg
)
(
lambda
(
fragment
arg
)
(
activity-layout
fragment
))
(
activity-layout
fragment
))
(
lambda
(
fragment
arg
)
(
lambda
(
fragment
arg
)
(
list
(
list
))
(
update-widget
'text-view
(
get-id
"pf-details"
)
'text
(
string-append
"Pack: "
(
ktv-get
(
get-current
'pack
'
())
"name"
)
" "
"Pup: "
(
ktv-get
(
get-current
'individual
'
())
"name"
))
)))
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
()))
(
lambda
(
fragment
)
'
()))
(
fragment
"bottom"
(
linear-layout
0
'horizontal
(
layout
'fill-parent
'fill-parent
1
'left
0
)
(
list
0
0
0
0
)
(
list
(
mbutton-scale
"cancel"
'cancel
(
lambda
()
(
list
)))
(
mbutton-scale
"ok"
'ok
(
lambda
()
(
list
)))))
(
lambda
(
fragment
arg
)
(
activity-layout
fragment
))
(
lambda
(
fragment
arg
)
(
list
))
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
())
(
lambda
(
fragment
)
'
()))
)
)
...
@@ -257,28 +328,86 @@
...
@@ -257,28 +328,86 @@
"main"
"main"
(
vert-fill
(
vert-fill
(
relative
-rules
(
relative
'
((
"parent-top"
))
'
((
"parent-top"
))
(
horiz
(
list
100
100
255
127
)
(
mbutton-scale
"cancel"
"Cancel"
(
lambda
()
(
list
)))
(
build-fragment
"top"
(
make-id
"top"
)
fillwrap
))
(
mbutton-scale
"ok"
"Ok"
(
lambda
()
(
list
)))))
(
scroll-view-vert
0
(
layout
'fill-parent
'fill-parent
1
'left
0
)
(
list
(
vert-fill
(
mtitle
""
'title
)
(
horiz
(
medit-text
"user-id"
'user-id
"normal"
(
lambda
()
(
list
)))
(
mbutton-scale
"sync"
'sync
(
lambda
()
(
list
))))
(
vert
(
mspinner
"languages"
'languages
(
list
'english
'khasi
'hindi
)
(
lambda
(
c
)
(
list
)))
;;(image-view (make-id "face") "face" (layout 640 470 1 'left 0))
(
mbutton
"new-village"
'new-village
(
lambda
()
(
list
(
start-activity
"village"
0
""
))))
(
mtitle
""
"Symbai"
)
(
mtext
""
"Database"
)
(
mbutton
"main-sync"
"Sync database1"
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mbutton
"main-sync"
"Sync database2"
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mbutton
"main-sync"
"Sync database3"
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
)
(
relative-rules
)))
(
relative
'
((
"parent-bottom"
))
'
((
"parent-bottom"
))
(
horiz
(
list
100
100
255
127
)
(
mbutton-scale
"cancel"
"Cancel"
(
lambda
()
(
list
)))
(
vert
(
mbutton-scale
"ok"
"Ok"
(
lambda
()
(
list
)))))
(
spacer
5
)
(
build-fragment
"bottom"
(
make-id
"bottom"
)
fillwrap
)))
)
(
lambda
(
activity
arg
)
(
activity-layout
activity
))
(
lambda
(
activity
arg
)
(
let
((
user-id
(
ktv-get
(
get-entity
db
"local"
1
)
"user-id"
)))
(
set-current!
'user-id
user-id
)
(
list
)))
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
requestcode
resultcode
)
'
()))
(
activity
"village"
(
vert-fill
(
relative
'
((
"parent-top"
))
(
list
100
100
255
127
)
(
build-fragment
"top"
(
make-id
"top"
)
fillwrap
))
(
scroll-view-vert
0
(
layout
'fill-parent
'fill-parent
1
'left
0
)
(
list
(
vert-fill
;;(image-view (make-id "face") "face" (layout 640 470 1 'left 0))
(
mtitle
""
'title
)
(
mtext
""
'database
)
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
(
mbutton
"main-sync"
'sync
(
lambda
()
(
list
(
start-activity
"sync"
0
""
))))
(
mspinner-other
"test"
'test
(
list
'one
'two
'three
)
(
lambda
(
c
)
(
list
)))
)))
(
relative
'
((
"parent-bottom"
))
(
list
100
100
255
127
)
(
vert
(
spacer
5
)
(
build-fragment
"bottom"
(
make-id
"bottom"
)
fillwrap
)))
)
)
(
lambda
(
activity
arg
)
(
lambda
(
activity
arg
)
(
activity-layout
activity
))
(
activity-layout
activity
))
...
...
android/res/drawable/bg.png
0 → 100644
View file @
90e8000b
1.22 KB
android/res/drawable/bg_style.xml
0 → 100644
View file @
90e8000b
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:src=
"@drawable/bgpaw"
android:tileMode=
"repeat"
/>
android/res/drawable/bgpaw.png
0 → 100644
View file @
90e8000b
265 Bytes
android/res/drawable/face.png
0 → 100644
View file @
90e8000b
10.4 KB
android/res/drawable/swarmbutton.xml
0 → 100644
View file @
90e8000b
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_checked=
"true"
>
<shape>
<gradient
android:endColor=
"#eeffa276"
android:startColor=
"#eeefa276"
android:angle=
"270"
/>
<corners
android:radius=
"10dp"
/>
<padding
android:left=
"4dp"
android:top=
"4dp"
android:right=
"4dp"
android:bottom=
"4dp"
/>
</shape>
</item>
<item
android:state_pressed=
"true"
>
<shape>
<gradient
android:endColor=
"#77ffa276"
android:startColor=
"#77efa276"
android:angle=
"270"
/>
<corners
android:radius=
"10dp"
/>
<padding
android:left=
"4dp"
android:top=
"4dp"
android:right=
"4dp"
android:bottom=
"4dp"
/>
</shape>
</item>
<item
android:state_focused=
"true"
>
<shape>
<gradient
android:endColor=
"#ffffa276"
android:startColor=
"#ffefa276"
android:angle=
"270"
/>
<corners
android:radius=
"10dp"
/>
<padding
android:left=
"4dp"
android:top=
"4dp"
android:right=
"4dp"
android:bottom=
"4dp"
/>
</shape>
</item>
<item>
<shape>
<gradient
android:endColor=
"#ffff8256"
android:startColor=
"#ffefa276"
android:angle=
"270"
/>
<corners
android:radius=
"10dp"
/>
<padding
android:left=
"4dp"
android:top=
"4dp"
android:right=
"4dp"
android:bottom=
"4dp"
/>
</shape>
</item>
</selector>
android/src/foam/symbai/VillageActivity.java
0 → 100644
View file @
90e8000b
// Starwisp Copyright (C) 2013 Dave Griffiths
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package
foam.symbai
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.content.Context
;
public
class
VillageActivity
extends
foam
.
starwisp
.
StarwispActivity
{
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
m_Name
=
"village"
;
super
.
onCreate
(
savedInstanceState
);
}
}
android/src/foam/symbai/starwisp.java
0 → 100644
View file @
90e8000b
// Starwisp Copyright (C) 2013 Dave Griffiths
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package
foam.symbai
;
import
java.util.ArrayList
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.content.Context
;
import
android.graphics.Color
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.BufferedReader
;
import
java.io.InputStreamReader
;
import
android.widget.TextView
;
import
android.widget.Button
;
import
android.widget.LinearLayout
;
import
android.widget.SeekBar
;
import
android.widget.Spinner
;
import
android.widget.ArrayAdapter
;
import
android.widget.AdapterView
;
import
android.widget.EditText
;
import
android.widget.Toast
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup.LayoutParams
;
import
android.view.WindowManager
;
import
android.view.View
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.text.TextWatcher
;
import
android.text.Editable
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONArray
;
import
java.util.Calendar
;
import
foam.starwisp.StarwispActivity
;
import
foam.starwisp.ActivityManager
;
import
foam.starwisp.Scheme
;
import
foam.starwisp.StarwispBuilder
;
public
class
starwisp
extends
StarwispActivity
{
static
{
// register all activities here
ActivityManager
.
RegisterActivity
(
"main"
,
starwisp
.
class
);
ActivityManager
.
RegisterActivity
(
"village"
,
VillageActivity
.
class
);
};
/** Called when the activity is first created. */
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
setContentView
(
R
.
layout
.
main
);
String
dirname
=
"starwisp/"
;
m_AppDir
=
"/sdcard/"
+
dirname
;
File
appdir
=
new
File
(
m_AppDir
);
appdir
.
mkdirs
();
// build static things
m_Scheme
=
new
Scheme
(
this
);
m_Builder
=
new
StarwispBuilder
(
m_Scheme
);
m_Name
=
"main"
;
// tell scheme the date
final
Calendar
c
=
Calendar
.
getInstance
();
int
day
=
c
.
get
(
Calendar
.
DAY_OF_MONTH
);
int
month
=
c
.
get
(
Calendar
.
MONTH
)+
1
;
int
year
=
c
.
get
(
Calendar
.
YEAR
);
// pass in a bunch of useful stuff
m_Scheme
.
eval
(
"(define dirname \"/sdcard/"
+
dirname
+
"\")(define date-day "
+
day
+
") (define date-month "
+
month
+
") (define date-year "
+
year
+
")"
);
Log
.
i
(
"starwisp"
,
"started, now running starwisp.scm..."
);
m_Scheme
.
eval
(
m_Scheme
.
readRawTextFile
(
this
,
"starwisp.scm"
));
super
.
onCreate
(
savedInstanceState
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment