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
Dave Griffiths
mongoose-2000
Commits
22387655
Commit
22387655
authored
Jun 03, 2014
by
Dave Griffiths
Browse files
more review item stuff
parent
812b98e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
22 deletions
+77
-22
android/AndroidManifest.xml
android/AndroidManifest.xml
+1
-0
android/assets/starwisp.scm
android/assets/starwisp.scm
+45
-22
android/src/foam/mongoose/ReviewItemActivity.java
android/src/foam/mongoose/ReviewItemActivity.java
+30
-0
android/src/foam/mongoose/starwisp.java
android/src/foam/mongoose/starwisp.java
+1
-0
No files found.
android/AndroidManifest.xml
View file @
22387655
...
...
@@ -33,6 +33,7 @@
<activity
android:name=
"SyncActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"ExportActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"ReviewActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"ReviewItemActivity"
android:configChanges=
"orientation"
></activity>
</application>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
...
...
android/assets/starwisp.scm
View file @
22387655
...
...
@@ -345,6 +345,7 @@
;; review
(
define
(
review-build-contents
uid
entity
)
(
msg
"review-build-contents"
)
(
append
(
map
(
lambda
(
ktv
)
...
...
@@ -367,7 +368,20 @@
(
else
(
mtext
""
(
string-append
(
ktv-type
ktv
)
" not handled"
)))))
entity
)
(
list
(
mbutton
(
string-append
uid
"-save"
)
"Save"
(
lambda
()
'
())))))
(
horiz
(
mbutton
"review-item-cancel"
"Cancel"
(
lambda
()
(
list
(
finish-activity
0
))))
(
mbutton
(
string-append
uid
"-save"
)
"Save"
(
lambda
()
'
()))))))
(
define
(
review-item-build
)
(
let
((
uid
(
entity-get-value
"unique_id"
)))
(
msg
"review-item-build"
uid
)
(
list
(
update-widget
'linear-layout
(
get-id
"review-item-container"
)
'contents
(
review-build-contents
uid
(
get-current
'entity-values
'
()))))))
(
define
(
review-update-list
)
(
list
...
...
@@ -379,28 +393,16 @@
(
let*
((
data
(
car
dirty-entity
))
(
entity
(
cadr
dirty-entity
))
(
time
(
ktv-get
entity
"time"
))
(
type
(
list-ref
data
0
))
(
uid
(
list-ref
data
1
)))
(
msg
dirty-entity
)
(
vert
(
mtoggle-button
(
string-append
"review-"
uid
)
(
string-append
(
list-ref
data
0
)
(
if
time
(
string-append
"-"
time
)
""
))
(
lambda
(
v
)
(
list
(
update-widget
'linear-layout
(
get-id
(
string-append
uid
"-container"
))
'contents
(
if
(
not
v
)
'
()
(
review-build-contents
uid
entity
)))
)))
(
linear-layout
(
make-id
(
string-append
uid
"-container"
))
'vertical
(
layout
'fill-parent
'wrap-content
1
'centre
0
)
(
list
0
0
0
0
)
(
list
)))))
(
mbutton
(
string-append
"review-"
uid
)
(
string-append
type
(
if
time
(
string-append
"-"
time
)
""
))
(
lambda
()
(
entity-init!
db
"stream"
type
(
get-entity-by-unique
db
"stream"
uid
))
(
list
(
start-activity
"review-item"
0
""
))))))
(
dirty-entities-for-review
db
"stream"
)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
...
...
@@ -1245,8 +1247,8 @@
'
()))
(
mtext
"foo"
"Database"
)
(
horiz
(
mbutton2
"main-
sync"
"Sync database
"
(
lambda
()
(
list
(
start-activity
"
sync
"
0
""
))))
(
mbutton2
"main-
review"
"Review changes
"
(
lambda
()
(
list
(
start-activity
"
review
"
0
""
))))))
(
mbutton2
"main-
review"
"Review changes
"
(
lambda
()
(
list
(
start-activity
"
review
"
0
""
))))
(
mbutton2
"main-
sync"
"Sync database
"
(
lambda
()
(
list
(
start-activity
"
sync
"
0
""
))))))
(
lambda
(
activity
arg
)
(
activity-layout
activity
))
(
lambda
(
activity
arg
)
...
...
@@ -1963,4 +1965,25 @@
(
lambda
(
activity
)
'
())
(
lambda
(
activity
requestcode
resultcode
)
'
()))
(
activity
"review-item"
(
vert
(
text-view
(
make-id
"title"
)
"Review item"
40
fillwrap
)
(
linear-layout
(
make-id
"review-item-container"
)
'vertical
(
layout
'fill-parent
'wrap-content
1
'left
0
)
(
list
0
0
0
0
)
(
list
))
)
(
lambda
(
activity
arg
)
(
activity-layout
activity
))
(
lambda
(
activity
arg
)
(
review-item-build
))
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
requestcode
resultcode
)
'
()))
)
android/src/foam/mongoose/ReviewItemActivity.java
0 → 100644
View file @
22387655
// 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.mongoose
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.content.Context
;
public
class
ReviewItemActivity
extends
foam
.
starwisp
.
StarwispActivity
{
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
m_Name
=
"review-item"
;
super
.
onCreate
(
savedInstanceState
);
}
}
android/src/foam/mongoose/starwisp.java
View file @
22387655
...
...
@@ -80,6 +80,7 @@ public class starwisp extends StarwispActivity
ActivityManager
.
RegisterActivity
(
"sync"
,
SyncActivity
.
class
);
ActivityManager
.
RegisterActivity
(
"export"
,
ExportActivity
.
class
);
ActivityManager
.
RegisterActivity
(
"review"
,
ReviewActivity
.
class
);
ActivityManager
.
RegisterActivity
(
"review-item"
,
ReviewItemActivity
.
class
);
};
/** Called when the activity is first created. */
...
...
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