質問編集履歴

2

ソースコードの記述を変更しました

2017/08/05 01:49

投稿

hiroki.c
hiroki.c

スコア8

test CHANGED
File without changes
test CHANGED
@@ -78,9 +78,7 @@
78
78
 
79
79
  ```Android
80
80
 
81
- コード
82
-
83
- ```public class PracticeListFragment extends ListFragment{
81
+ public class PracticeListFragment extends ListFragment{
84
82
 
85
83
  private TextView tv1;
86
84
 
@@ -172,6 +170,8 @@
172
170
 
173
171
  }
174
172
 
173
+ ```
174
+
175
175
 
176
176
 
177
177
  ###補足情報(言語/FW/ツール等のバージョンなど)

1

どこまで実行できているかを追記しました。コードをソースコード用の記述に変更しました

2017/08/05 01:49

投稿

hiroki.c
hiroki.c

スコア8

test CHANGED
File without changes
test CHANGED
@@ -6,13 +6,15 @@
6
6
 
7
7
  調べたのですが理解できなかったためどなたか教えてください
8
8
 
9
+ 現在の状態のコードではフラグメントリストの表示はできています。
10
+
9
11
 
10
12
 
11
13
  ###該当のソースコード
12
14
 
13
- Android
14
15
 
16
+
15
- メインクラス
17
+ ```Android
16
18
 
17
19
  public class MainActivity extends Activity {
18
20
 
@@ -34,13 +36,17 @@
34
36
 
35
37
  setContentView(R.layout.activity_main);
36
38
 
39
+
40
+
37
41
  }
38
42
 
39
43
  }
40
44
 
41
- フラグメントクラス
45
+ ```Android
42
46
 
47
+ コード
48
+
43
- public class PracticeFragment extends Fragment {
49
+ ```public class PracticeFragment extends Fragment {
44
50
 
45
51
  /**
46
52
 
@@ -64,15 +70,19 @@
64
70
 
65
71
  return inflater.inflate(R.layout.fragment, container, false);
66
72
 
73
+ ```
74
+
67
75
  }
68
76
 
69
77
  }
70
78
 
71
- フラグメントのリストクラス
79
+ ```Android
72
80
 
73
- public class PracticeListFragment extends ListFragment{
81
+ コード
74
82
 
83
+ ```public class PracticeListFragment extends ListFragment{
84
+
75
- private TextView tv1;
85
+ private TextView tv1;
76
86
 
77
87
 
78
88