Revision a13e1101
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/examples/effectqueue/EffectQueueActivity.java | ||
---|---|---|
58 | 58 |
{ |
59 | 59 |
super.onCreate(savedInstanceState); |
60 | 60 |
|
61 |
setContentView(R.layout.effects2dlayout);
|
|
61 |
setContentView(R.layout.effectqueuelayout);
|
|
62 | 62 |
|
63 | 63 |
mPosID = 0; |
64 | 64 |
mPosName = 0; |
src/main/res/layout/effectqueuelayout.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
3 |
android:layout_width="fill_parent" |
|
4 |
android:layout_height="fill_parent" |
|
5 |
android:orientation="vertical" > |
|
6 |
|
|
7 |
<org.distorted.examples.effectqueue.EffectQueueSurfaceView |
|
8 |
android:id="@+id/effects2dSurfaceView" |
|
9 |
android:layout_width="fill_parent" |
|
10 |
android:layout_height="0dp" |
|
11 |
android:layout_weight="1" /> |
|
12 |
|
|
13 |
<ScrollView |
|
14 |
android:id="@+id/effects2dscrollView" |
|
15 |
android:layout_width="match_parent" |
|
16 |
android:layout_height="0dp" |
|
17 |
android:layout_weight="0.82" > |
|
18 |
|
|
19 |
<LinearLayout |
|
20 |
android:id="@+id/linearLayout1" |
|
21 |
android:layout_width="fill_parent" |
|
22 |
android:layout_height="wrap_content" |
|
23 |
android:layout_weight="0.3" |
|
24 |
android:gravity="fill_horizontal|top" |
|
25 |
android:orientation="vertical" |
|
26 |
android:weightSum="1"> |
|
27 |
|
|
28 |
<TableLayout |
|
29 |
android:layout_width="fill_parent" |
|
30 |
android:layout_height="wrap_content" |
|
31 |
android:paddingTop="2dp" |
|
32 |
android:paddingBottom="2dp" |
|
33 |
android:stretchColumns="0,1,2" |
|
34 |
android:paddingLeft="10dp" |
|
35 |
android:paddingRight="10dp"> |
|
36 |
|
|
37 |
<TableRow |
|
38 |
android:layout_width="match_parent" |
|
39 |
android:layout_height="match_parent"> |
|
40 |
|
|
41 |
<TextView |
|
42 |
android:layout_width="wrap_content" |
|
43 |
android:layout_height="wrap_content" |
|
44 |
android:text="@string/add" |
|
45 |
android:id="@+id/textView" |
|
46 |
android:layout_gravity="center_vertical" |
|
47 |
android:layout_span="2" |
|
48 |
android:layout_marginLeft="8dp"/> |
|
49 |
|
|
50 |
<Spinner |
|
51 |
android:layout_width="fill_parent" |
|
52 |
android:layout_height="40dp" |
|
53 |
android:id="@+id/effects2d_spinnerAdd" |
|
54 |
/> |
|
55 |
</TableRow> |
|
56 |
|
|
57 |
<TableRow |
|
58 |
android:layout_width="wrap_content" |
|
59 |
android:layout_height="wrap_content" |
|
60 |
android:layout_gravity="center" |
|
61 |
android:orientation="vertical"> |
|
62 |
|
|
63 |
<Button |
|
64 |
android:layout_width="wrap_content" |
|
65 |
android:layout_height="40dp" |
|
66 |
android:text="@string/removebut" |
|
67 |
android:id="@+id/effects2dRemoveID" |
|
68 |
android:onClick="removeByID"/> |
|
69 |
|
|
70 |
<TextView |
|
71 |
android:layout_width="match_parent" |
|
72 |
android:layout_height="wrap_content" |
|
73 |
android:text="@string/id" |
|
74 |
android:id="@+id/textView3" |
|
75 |
android:layout_gravity="center"/> |
|
76 |
|
|
77 |
<Spinner |
|
78 |
android:layout_width="fill_parent" |
|
79 |
android:layout_height="40dp" |
|
80 |
android:id="@+id/effects2d_spinnerID"/> |
|
81 |
</TableRow> |
|
82 |
|
|
83 |
<TableRow |
|
84 |
android:layout_width="wrap_content" |
|
85 |
android:layout_height="wrap_content" |
|
86 |
android:layout_gravity="center"> |
|
87 |
|
|
88 |
<Button |
|
89 |
android:layout_width="wrap_content" |
|
90 |
android:layout_height="40dp" |
|
91 |
android:text="@string/removebut" |
|
92 |
android:id="@+id/effects2dRemoveName" |
|
93 |
android:onClick="removeByName"/> |
|
94 |
|
|
95 |
<TextView |
|
96 |
android:layout_width="match_parent" |
|
97 |
android:layout_height="wrap_content" |
|
98 |
android:text="@string/name" |
|
99 |
android:id="@+id/textView4" |
|
100 |
android:layout_gravity="center"/> |
|
101 |
|
|
102 |
<Spinner |
|
103 |
android:layout_width="fill_parent" |
|
104 |
android:layout_height="40dp" |
|
105 |
android:id="@+id/effects2d_spinnerName"/> |
|
106 |
</TableRow> |
|
107 |
|
|
108 |
<TableRow |
|
109 |
android:layout_width="wrap_content" |
|
110 |
android:layout_height="wrap_content" |
|
111 |
android:layout_gravity="center"> |
|
112 |
|
|
113 |
<Button |
|
114 |
android:layout_width="wrap_content" |
|
115 |
android:layout_height="40dp" |
|
116 |
android:text="@string/removebut" |
|
117 |
android:id="@+id/effects2dRemoveType" |
|
118 |
android:onClick="removeByType"/> |
|
119 |
|
|
120 |
<TextView |
|
121 |
android:layout_width="wrap_content" |
|
122 |
android:layout_height="wrap_content" |
|
123 |
android:text="@string/type" |
|
124 |
android:id="@+id/textView5" |
|
125 |
android:layout_gravity="center"/> |
|
126 |
|
|
127 |
<Spinner |
|
128 |
android:layout_width="fill_parent" |
|
129 |
android:layout_height="40dp" |
|
130 |
android:id="@+id/effects2d_spinnerType"/> |
|
131 |
</TableRow> |
|
132 |
|
|
133 |
</TableLayout> |
|
134 |
<View |
|
135 |
android:layout_height="2dip" |
|
136 |
android:background="#333333" |
|
137 |
android:layout_width="match_parent" |
|
138 |
/> |
|
139 |
|
|
140 |
<TextView |
|
141 |
android:layout_width="wrap_content" |
|
142 |
android:layout_height="wrap_content" |
|
143 |
android:text="@string/list" |
|
144 |
android:id="@+id/textView6" |
|
145 |
android:layout_gravity="center_horizontal"/> |
|
146 |
|
|
147 |
<TableLayout |
|
148 |
android:id="@+id/effects2dTableList" |
|
149 |
android:layout_width="match_parent" |
|
150 |
android:layout_height="match_parent" |
|
151 |
android:paddingTop="2dp" |
|
152 |
android:paddingBottom="2dp" |
|
153 |
android:stretchColumns="0,1,2,3" |
|
154 |
android:paddingLeft="10dp" |
|
155 |
android:paddingRight="10dp"> |
|
156 |
</TableLayout> |
|
157 |
|
|
158 |
</LinearLayout> |
|
159 |
|
|
160 |
</ScrollView> |
|
161 |
</LinearLayout> |
src/main/res/layout/effects2dlayout.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
3 |
android:layout_width="fill_parent" |
|
4 |
android:layout_height="fill_parent" |
|
5 |
android:orientation="vertical" > |
|
6 |
|
|
7 |
<org.distorted.examples.effectqueue.EffectQueueSurfaceView |
|
8 |
android:id="@+id/effects2dSurfaceView" |
|
9 |
android:layout_width="fill_parent" |
|
10 |
android:layout_height="0dp" |
|
11 |
android:layout_weight="1" /> |
|
12 |
|
|
13 |
<ScrollView |
|
14 |
android:id="@+id/effects2dscrollView" |
|
15 |
android:layout_width="match_parent" |
|
16 |
android:layout_height="0dp" |
|
17 |
android:layout_weight="0.82" > |
|
18 |
|
|
19 |
<LinearLayout |
|
20 |
android:id="@+id/linearLayout1" |
|
21 |
android:layout_width="fill_parent" |
|
22 |
android:layout_height="wrap_content" |
|
23 |
android:layout_weight="0.3" |
|
24 |
android:gravity="fill_horizontal|top" |
|
25 |
android:orientation="vertical" |
|
26 |
android:weightSum="1"> |
|
27 |
|
|
28 |
<TableLayout |
|
29 |
android:layout_width="fill_parent" |
|
30 |
android:layout_height="wrap_content" |
|
31 |
android:paddingTop="2dp" |
|
32 |
android:paddingBottom="2dp" |
|
33 |
android:stretchColumns="0,1,2" |
|
34 |
android:paddingLeft="10dp" |
|
35 |
android:paddingRight="10dp"> |
|
36 |
|
|
37 |
<TableRow |
|
38 |
android:layout_width="match_parent" |
|
39 |
android:layout_height="match_parent"> |
|
40 |
|
|
41 |
<TextView |
|
42 |
android:layout_width="wrap_content" |
|
43 |
android:layout_height="wrap_content" |
|
44 |
android:text="@string/add" |
|
45 |
android:id="@+id/textView" |
|
46 |
android:layout_gravity="center_vertical" |
|
47 |
android:layout_span="2" |
|
48 |
android:layout_marginLeft="8dp"/> |
|
49 |
|
|
50 |
<Spinner |
|
51 |
android:layout_width="fill_parent" |
|
52 |
android:layout_height="40dp" |
|
53 |
android:id="@+id/effects2d_spinnerAdd" |
|
54 |
/> |
|
55 |
</TableRow> |
|
56 |
|
|
57 |
<TableRow |
|
58 |
android:layout_width="wrap_content" |
|
59 |
android:layout_height="wrap_content" |
|
60 |
android:layout_gravity="center" |
|
61 |
android:orientation="vertical"> |
|
62 |
|
|
63 |
<Button |
|
64 |
android:layout_width="wrap_content" |
|
65 |
android:layout_height="40dp" |
|
66 |
android:text="@string/removebut" |
|
67 |
android:id="@+id/effects2dRemoveID" |
|
68 |
android:onClick="removeByID"/> |
|
69 |
|
|
70 |
<TextView |
|
71 |
android:layout_width="match_parent" |
|
72 |
android:layout_height="wrap_content" |
|
73 |
android:text="@string/id" |
|
74 |
android:id="@+id/textView3" |
|
75 |
android:layout_gravity="center"/> |
|
76 |
|
|
77 |
<Spinner |
|
78 |
android:layout_width="fill_parent" |
|
79 |
android:layout_height="40dp" |
|
80 |
android:id="@+id/effects2d_spinnerID"/> |
|
81 |
</TableRow> |
|
82 |
|
|
83 |
<TableRow |
|
84 |
android:layout_width="wrap_content" |
|
85 |
android:layout_height="wrap_content" |
|
86 |
android:layout_gravity="center"> |
|
87 |
|
|
88 |
<Button |
|
89 |
android:layout_width="wrap_content" |
|
90 |
android:layout_height="40dp" |
|
91 |
android:text="@string/removebut" |
|
92 |
android:id="@+id/effects2dRemoveName" |
|
93 |
android:onClick="removeByName"/> |
|
94 |
|
|
95 |
<TextView |
|
96 |
android:layout_width="match_parent" |
|
97 |
android:layout_height="wrap_content" |
|
98 |
android:text="@string/name" |
|
99 |
android:id="@+id/textView4" |
|
100 |
android:layout_gravity="center"/> |
|
101 |
|
|
102 |
<Spinner |
|
103 |
android:layout_width="fill_parent" |
|
104 |
android:layout_height="40dp" |
|
105 |
android:id="@+id/effects2d_spinnerName"/> |
|
106 |
</TableRow> |
|
107 |
|
|
108 |
<TableRow |
|
109 |
android:layout_width="wrap_content" |
|
110 |
android:layout_height="wrap_content" |
|
111 |
android:layout_gravity="center"> |
|
112 |
|
|
113 |
<Button |
|
114 |
android:layout_width="wrap_content" |
|
115 |
android:layout_height="40dp" |
|
116 |
android:text="@string/removebut" |
|
117 |
android:id="@+id/effects2dRemoveType" |
|
118 |
android:onClick="removeByType"/> |
|
119 |
|
|
120 |
<TextView |
|
121 |
android:layout_width="wrap_content" |
|
122 |
android:layout_height="wrap_content" |
|
123 |
android:text="@string/type" |
|
124 |
android:id="@+id/textView5" |
|
125 |
android:layout_gravity="center"/> |
|
126 |
|
|
127 |
<Spinner |
|
128 |
android:layout_width="fill_parent" |
|
129 |
android:layout_height="40dp" |
|
130 |
android:id="@+id/effects2d_spinnerType"/> |
|
131 |
</TableRow> |
|
132 |
|
|
133 |
</TableLayout> |
|
134 |
<View |
|
135 |
android:layout_height="2dip" |
|
136 |
android:background="#333333" |
|
137 |
android:layout_width="match_parent" |
|
138 |
/> |
|
139 |
|
|
140 |
<TextView |
|
141 |
android:layout_width="wrap_content" |
|
142 |
android:layout_height="wrap_content" |
|
143 |
android:text="@string/list" |
|
144 |
android:id="@+id/textView6" |
|
145 |
android:layout_gravity="center_horizontal"/> |
|
146 |
|
|
147 |
<TableLayout |
|
148 |
android:id="@+id/effects2dTableList" |
|
149 |
android:layout_width="match_parent" |
|
150 |
android:layout_height="match_parent" |
|
151 |
android:paddingTop="2dp" |
|
152 |
android:paddingBottom="2dp" |
|
153 |
android:stretchColumns="0,1,2,3" |
|
154 |
android:paddingLeft="10dp" |
|
155 |
android:paddingRight="10dp"> |
|
156 |
</TableLayout> |
|
157 |
|
|
158 |
</LinearLayout> |
|
159 |
|
|
160 |
</ScrollView> |
|
161 |
</LinearLayout> |
Also available in: Unified diff
Minor