質問するログイン新規登録

質問編集履歴

1

Frag01.javaを追加しました。

2020/04/14 13:17

投稿

s.sawai
s.sawai

スコア7

title CHANGED
File without changes
body CHANGED
@@ -11,19 +11,6 @@
11
11
  ### 発生している問題・エラーメッセージ
12
12
 
13
13
  ```logcat
14
- 04-13 03:52:06.894 3942-3942/? E/libprocessgroup: failed to make and chown /acct/uid_10073: Read-only file system
15
- 04-13 03:52:06.894 3942-3942/? W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
16
- 04-13 03:52:06.896 3942-3942/? I/art: Not late-enabling -Xcheck:jni (already on)
17
- 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
18
- 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
19
- 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>
20
- 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>
21
- 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
22
- 04-13 03:52:08.607 3942-3965/com.example.booth_test D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
23
- 04-13 03:52:08.678 3942-3942/com.example.booth_test D/Atlas: Validating map...
24
- 04-13 03:52:08.786 3942-3942/com.example.booth_test D/AndroidRuntime: Shutting down VM
25
-
26
-
27
14
  --------- beginning of crash
28
15
  04-13 03:52:08.793 3942-3942/com.example.booth_test E/AndroidRuntime: FATAL EXCEPTION: main
29
16
  Process: com.example.booth_test, PID: 3942
@@ -87,7 +74,30 @@
87
74
  MainActivityは編集していません。
88
75
 
89
76
 
77
+ ```Java
78
+ Frag01.java
90
79
 
80
+ import android.os.Bundle;
81
+ import androidx.annotation.NonNull;
82
+ import androidx.annotation.Nullable;
83
+ import android.view.LayoutInflater;
84
+ import android.view.View;
85
+ import android.view.ViewGroup;
86
+ import androidx.fragment.app.Fragment;
87
+
88
+ public class Frag01 extends Fragment {
89
+
90
+ @Nullable
91
+ @Override
92
+ public View onCreateView(
93
+ @NonNull LayoutInflater inflater,
94
+ @Nullable ViewGroup container,
95
+ @Nullable Bundle savedInstanceState) {
96
+ return inflater.inflate(R.layout.frag01_layout,container,false);//ここが19行目です
97
+ }
98
+ }
99
+ ```
100
+ Frag02,Frag03のFrag01との違いは参照するlayoutファイルのみです。
91
101
  ```Java
92
102
  SectionPagerAdapter.java
93
103