Commit 2f311bcb authored by Dave Griffiths's avatar Dave Griffiths
Browse files

activity back stack fixed, colours on bgs, version for ESI demo meeting

parent 7bd24289
......@@ -10,22 +10,18 @@
>
<activity android:name="starwisp"
android:noHistory="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="MainActivity"></activity>
<activity android:name="ObservationsActivity"></activity>
<activity android:name="ObservationActivity"></activity>
<activity android:name="IndividualSelectActivity"></activity>
<activity android:name="PupFocalActivity"></activity>
<activity android:name="PupFocalEventActivity"></activity>
<activity android:name="EventSelfActivity"></activity>
<activity android:name="EventFedActivity"></activity>
<activity android:name="EventAggressionActivity"></activity>
<activity android:name="ObservationActivity" android:noHistory="true"></activity>
<activity android:name="IndividualSelectActivity" android:noHistory="true"></activity>
<activity android:name="PupFocalActivity" android:noHistory="true"></activity>
<activity android:name="EventSelfActivity" android:noHistory="true"></activity>
<activity android:name="ManagePacksActivity"></activity>
<activity android:name="NewPackActivity"></activity>
<activity android:name="ManageIndividualActivity"></activity>
......
......@@ -334,12 +334,13 @@
(define (widget-type w) (list-ref w 0))
(define (widget-id w) (list-ref w 1))
(define (linear-layout id orientation layout children)
(list "linear-layout" id orientation layout children))
(define (linear-layout id orientation layout colour children)
(list "linear-layout" id orientation layout colour children))
(define (linear-layout-id t) (list-ref t 1))
(define (linear-layout-orientation t) (list-ref t 2))
(define (linear-layout-layout t) (list-ref t 3))
(define (linear-layout-children t) (list-ref t 4))
(define (linear-layout-colour t) (list-ref t 4))
(define (linear-layout-children t) (list-ref t 5))
;;(define (grid-layout id cols orientation layout children)
;; (list "grid-layout" id cols orientation layout children))
......@@ -517,16 +518,16 @@
(define (horiz . l)
(linear-layout
(make-id "xv")
'horizontal
0 'horizontal
(layout 'fill-parent 'fill-parent 1 'left)
(list 0 0 0 0)
l))
(define (vert . l)
(linear-layout
(make-id "xv")
'vertical
0 'vertical
(layout 'fill-parent 'fill-parent 1 'left)
(list 0 0 0 0)
l))
(define (activity name layout on-create on-start on-resume on-pause on-stop on-destroy on-activity-result)
......
This diff is collapsed.
......@@ -141,7 +141,7 @@ public class StarwispBuilder
BuildLayoutParam(arr.getString(2)),
(float)arr.getDouble(3));
lp.gravity=BuildLayoutGravity(arr.getString(4));
//lp.setMargins(5,5,5,5);
lp.setMargins(0,0,0,0);
return lp;
} catch (JSONException e) {
Log.e("starwisp", "Error parsing data " + e.toString());
......@@ -207,9 +207,11 @@ public class StarwispBuilder
v.setId(arr.getInt(1));
v.setOrientation(BuildOrientation(arr.getString(2)));
v.setLayoutParams(BuildLayoutParams(arr.getJSONArray(3)));
v.setPadding(5,5,5,5);
v.setPadding(2,2,2,2);
JSONArray col = arr.getJSONArray(4);
v.setBackgroundColor(Color.argb(col.getInt(3), col.getInt(0), col.getInt(1), col.getInt(2)));
parent.addView(v);
JSONArray children = arr.getJSONArray(4);
JSONArray children = arr.getJSONArray(5);
for (int i=0; i<children.length(); i++) {
Build(ctx,ctxname,new JSONArray(children.getString(i)), v);
}
......
......@@ -92,7 +92,7 @@ public class starwisp extends StarwispActivity
// build static things
m_Scheme = new Scheme(this);
m_Builder = new StarwispBuilder(m_Scheme);
m_Name = "splash";
m_Name = "main";
// tell scheme the date
final Calendar c = Calendar.getInstance();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment