質問編集履歴

4

情報修正

2017/06/03 03:06

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,14 @@
22
22
 
23
23
 
24
24
 
25
+
26
+
27
+
28
+
29
+ ※当初の投稿より変更しました。コールバック関数に引数を追加しました。
30
+
31
+
32
+
25
33
  ###発生している問題・エラーメッセージ
26
34
 
27
35
 
@@ -30,43 +38,45 @@
30
38
 
31
39
  ```java
32
40
 
33
- 06-03 10:50:37.061 10896-10896/station.around.aroundsatation I/System.out: あ
34
-
35
- 06-03 10:50:37.061 10896-10896/station.around.aroundsatation I/System.out: []
36
-
37
- 06-03 10:50:37.061 10896-10896/station.around.aroundsatation I/System.out: い
38
-
39
- 06-03 10:50:37.061 10896-10896/station.around.aroundsatation I/System.out: あああ
40
-
41
- 06-03 10:50:37.061 10896-10896/station.around.aroundsatation I/System.out: []
42
-
43
- 06-03 10:50:37.061 10896-10896/station.around.aroundsatation I/System.out: いいい
44
-
45
- 06-03 10:50:37.204 10896-10924/station.around.aroundsatation D/OpenGLRenderer: endAllActiveAnimators on 0x9b340e00 (RippleDrawable) with handle 0xac2ec260
46
-
47
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: [station.around.aroundsatation.model.ListImage@f9ff7a1, station.around.aroundsatation.model.ListImage@c15adc6, station.around.aroundsatation.model.ListImage@d518187, station.around.aroundsatation.model.ListImage@69578b4, station.around.aroundsatation.model.ListImage@7a36cdd]
48
-
49
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@f9ff7a1
50
-
51
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: http://i.imgur.com/9h81ns6.jpg----------HTTP通信で取得したJSONデータ
52
-
53
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@c15adc6
54
-
55
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: kamkack;m----------HTTP通信で取得したJSONデータ
56
-
57
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@d518187
58
-
59
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: lmascml;cal;----------HTTP通信で取得したJSONデータ
60
-
61
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@69578b4
62
-
63
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: lm;ac;mdc;lm----------HTTP通信で取得したJSONデータ
64
-
65
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@7a36cdd
66
-
67
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: l;dcmk;dck;----------HTTP通信で取得したJSONデ
68
-
69
- 06-03 10:50:37.207 10896-10896/station.around.aroundsatation I/System.out: コールバック成功!---------①コールバック関数
41
+ 06-03 12:01:27.429 32110-32110/station.around.aroundsatation I/System.out: あ
42
+
43
+ 06-03 12:01:27.429 32110-32110/station.around.aroundsatation I/System.out: []
44
+
45
+ 06-03 12:01:27.429 32110-32110/station.around.aroundsatation I/System.out: い
46
+
47
+ 06-03 12:01:27.430 32110-32110/station.around.aroundsatation I/System.out: あああ
48
+
49
+ 06-03 12:01:27.430 32110-32110/station.around.aroundsatation I/System.out: []
50
+
51
+ 06-03 12:01:27.430 32110-32110/station.around.aroundsatation I/System.out: いいい
52
+
53
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation I/System.out: [station.around.aroundsatation.model.ListImage@f36cbfa, station.around.aroundsatation.model.ListImage@9d735ab, station.around.aroundsatation.model.ListImage@3e2408, station.around.aroundsatation.model.ListImage@f9ff7a1, station.around.aroundsatation.model.ListImage@c15adc6]
54
+
55
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@f36cbfa
56
+
57
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation I/System.out: http://i.imgur.com/9h81ns6.jpg
58
+
59
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@9d735ab
60
+
61
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation I/System.out: kamkack;m
62
+
63
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@3e2408
64
+
65
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation I/System.out: lmascml;cal;
66
+
67
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@f9ff7a1
68
+
69
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation I/System.out: lm;ac;mdc;lm
70
+
71
+ 06-03 12:01:27.603 32110-32110/station.around.aroundsatation D/debug3: station.around.aroundsatation.model.ListImage@c15adc6
72
+
73
+ 06-03 12:01:27.604 32110-32110/station.around.aroundsatation I/System.out: l;dcmk;dck;
74
+
75
+ 06-03 12:01:27.604 32110-32110/station.around.aroundsatation I/System.out: ルバック成功!
76
+
77
+ 06-03 12:01:27.604 32110-32110/station.around.aroundsatation I/System.out: [http://i.imgur.com/9h81ns6.jpg, kamkack;m, lmascml;cal;, lm;ac;mdc;lm, l;dcmk;dck;]
78
+
79
+ 06-03 12:01:27.652 32110-32130/station.around.aroundsatation D/OpenGLRenderer: endAllActiveAnimators on 0x9b336e00 (RippleDrawable) with handle 0x9b330390
70
80
 
71
81
  ```
72
82
 
@@ -168,7 +178,7 @@
168
178
 
169
179
  }
170
180
 
171
- callback.callbackMethod(); ①コールバック関数
181
+ callback.callbackMethod(lists); ①コールバック関数
172
182
 
173
183
 
174
184
 
@@ -354,12 +364,14 @@
354
364
 
355
365
 
356
366
 
357
- @Override
367
+ @Override ★引数設置★
358
-
368
+
359
- public void callbackMethod(){ ③コールバック関数★Viewに配列(lists)を渡す処理を書きたいです★
369
+ public void callbackMethod(List<String> lists){ ③コールバック関数★Viewに配列(lists)を渡す処理を書きたいです★
360
370
 
361
371
  System.out.println( "コールバック成功!");
362
372
 
373
+ System.out.println(lists);
374
+
363
375
  }
364
376
 
365
377
 
@@ -404,7 +416,7 @@
404
416
 
405
417
  public interface CallHttpCallbacks {
406
418
 
407
- public void callbackMethod();
419
+ public void callbackMethod(List<String> lists); ★変更(引数設置)★
408
420
 
409
421
  }
410
422
 
@@ -426,12 +438,6 @@
426
438
 
427
439
 
428
440
 
429
- public void method() {
430
-
431
- _callHttpCallbacks.callbackMethod();
432
-
433
- }
434
-
435
441
  }
436
442
 
437
443
 

3

情報追加

2017/06/03 03:06

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -84,6 +84,14 @@
84
84
 
85
85
  HttpConnect.java
86
86
 
87
+
88
+
89
+ passListメソッドがHTTP通信でJSON配列データを取得します。
90
+
91
+ passList内のonResponseメソッド内にコールバック関数を仕込みました。
92
+
93
+
94
+
87
95
  ```Java
88
96
 
89
97
 
@@ -206,6 +214,16 @@
206
214
 
207
215
  Present.java
208
216
 
217
+
218
+
219
+ setListAdapterメソッドの第三引数内に配列データが入ります。
220
+
221
+ コールバック関数で第三引数に取得した配列データをセットしたいです。
222
+
223
+ callbackMethodがコールバック関数です。
224
+
225
+
226
+
209
227
  ```Java
210
228
 
211
229
 

2

タグ削除

2017/06/03 02:21

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
File without changes

1

情報追加

2017/06/03 02:08

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -372,7 +372,53 @@
372
372
 
373
373
 
374
374
 
375
-
375
+ 一応、載せておきます。
376
+
377
+ CallHttp.java
378
+
379
+ ```Java
380
+
381
+ public class CallHttp {
382
+
383
+
384
+
385
+ //コールバックインターフェース作成
386
+
387
+ public interface CallHttpCallbacks {
388
+
389
+ public void callbackMethod();
390
+
391
+ }
392
+
393
+
394
+
395
+ //コールバック対象クラス指定用インスタンス生成
396
+
397
+ private CallHttpCallbacks _callHttpCallbacks;
398
+
399
+
400
+
401
+ //コールバック対象クラス指定メソッド
402
+
403
+ public void setCallbacks(CallHttpCallbacks callHttpCallbacks) {
404
+
405
+ _callHttpCallbacks = callHttpCallbacks;
406
+
407
+ }
408
+
409
+
410
+
411
+ public void method() {
412
+
413
+ _callHttpCallbacks.callbackMethod();
414
+
415
+ }
416
+
417
+ }
418
+
419
+
420
+
421
+ ```
376
422
 
377
423
 
378
424