質問編集履歴
1
Frag01.javaを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,32 +24,6 @@
|
|
24
24
|
|
25
25
|
```logcat
|
26
26
|
|
27
|
-
04-13 03:52:06.894 3942-3942/? E/libprocessgroup: failed to make and chown /acct/uid_10073: Read-only file system
|
28
|
-
|
29
|
-
04-13 03:52:06.894 3942-3942/? W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
|
30
|
-
|
31
|
-
04-13 03:52:06.896 3942-3942/? I/art: Not late-enabling -Xcheck:jni (already on)
|
32
|
-
|
33
|
-
04-13 03:52:07.650 3942-3942/com.example.booth_test W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
|
34
|
-
|
35
|
-
04-13 03:52:07.737 3942-3957/com.example.booth_test I/art: Background sticky concurrent mark sweep GC freed 2066(185KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 847KB/1117KB, paused 13.053ms total 81.987ms
|
36
|
-
|
37
|
-
04-13 03:52:07.829 3942-3942/com.example.booth_test I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
|
38
|
-
|
39
|
-
04-13 03:52:07.831 3942-3942/com.example.booth_test I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
|
40
|
-
|
41
|
-
04-13 03:52:08.187 3942-3957/com.example.booth_test I/art: Background partial concurrent mark sweep GC freed 1219(111KB) AllocSpace objects, 0(0B) LOS objects, 51% free, 980KB/2004KB, paused 5.856ms total 175.512ms
|
42
|
-
|
43
|
-
04-13 03:52:08.607 3942-3965/com.example.booth_test D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
|
44
|
-
|
45
|
-
04-13 03:52:08.678 3942-3942/com.example.booth_test D/Atlas: Validating map...
|
46
|
-
|
47
|
-
04-13 03:52:08.786 3942-3942/com.example.booth_test D/AndroidRuntime: Shutting down VM
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
27
|
--------- beginning of crash
|
54
28
|
|
55
29
|
04-13 03:52:08.793 3942-3942/com.example.booth_test E/AndroidRuntime: FATAL EXCEPTION: main
|
@@ -176,10 +150,56 @@
|
|
176
150
|
|
177
151
|
|
178
152
|
|
179
|
-
|
180
|
-
|
181
153
|
```Java
|
182
154
|
|
155
|
+
Frag01.java
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
import android.os.Bundle;
|
160
|
+
|
161
|
+
import androidx.annotation.NonNull;
|
162
|
+
|
163
|
+
import androidx.annotation.Nullable;
|
164
|
+
|
165
|
+
import android.view.LayoutInflater;
|
166
|
+
|
167
|
+
import android.view.View;
|
168
|
+
|
169
|
+
import android.view.ViewGroup;
|
170
|
+
|
171
|
+
import androidx.fragment.app.Fragment;
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
public class Frag01 extends Fragment {
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
@Nullable
|
180
|
+
|
181
|
+
@Override
|
182
|
+
|
183
|
+
public View onCreateView(
|
184
|
+
|
185
|
+
@NonNull LayoutInflater inflater,
|
186
|
+
|
187
|
+
@Nullable ViewGroup container,
|
188
|
+
|
189
|
+
@Nullable Bundle savedInstanceState) {
|
190
|
+
|
191
|
+
return inflater.inflate(R.layout.frag01_layout,container,false);//ここが19行目です
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
```
|
198
|
+
|
199
|
+
Frag02,Frag03のFrag01との違いは参照するlayoutファイルのみです。
|
200
|
+
|
201
|
+
```Java
|
202
|
+
|
183
203
|
SectionPagerAdapter.java
|
184
204
|
|
185
205
|
|