質問編集履歴

1

ログキャットの内容の追加とコメントにて指摘された点についての修正

2023/02/03 18:42

投稿

star_moca
star_moca

スコア2

test CHANGED
File without changes
test CHANGED
@@ -11,13 +11,39 @@
11
11
  ### 発生している問題・エラーメッセージ
12
12
 
13
13
  一番上のbutton20を押したときは遷移するのですが、それ以外のボタンを押したときはアプリが落ちてしまいます。何が原因なのでしょうか。
14
+ ログキャットの内容
15
+ ```
16
+ 2023-02-04 03:32:20.508 13666-13710/es.exsample E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
17
+ 2023-02-04 03:32:54.311 13666-13666/es.exsample E/AndroidRuntime: FATAL EXCEPTION: main
18
+ Process: es.exsample, PID: 13666
19
+ android.content.ActivityNotFoundException: Unable to find explicit activity class {es.exsample/es.exsample.Calendar_Mon}; have you declared this activity in your AndroidManifest.xml?
20
+ at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005)
21
+ at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
22
+ at android.app.Activity.startActivityForResult(Activity.java:4586)
23
+ at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:705)
24
+ at android.app.Activity.startActivityForResult(Activity.java:4544)
25
+ at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:686)
26
+ at android.app.Activity.startActivity(Activity.java:4905)
27
+ at android.app.Activity.startActivity(Activity.java:4873)
28
+ at es.exsample.ExSample.onClick(ExSample.java:60)
29
+ at es.exsample.ExSample$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
30
+ at android.view.View.performClick(View.java:6597)
31
+ at android.view.View.performClickInternal(View.java:6574)
32
+ at android.view.View.access$3100(View.java:778)
33
+ at android.view.View$PerformClick.run(View.java:25885)
34
+ at android.os.Handler.handleCallback(Handler.java:873)
35
+ at android.os.Handler.dispatchMessage(Handler.java:99)
36
+ at android.os.Looper.loop(Looper.java:193)
37
+ at android.app.ActivityThread.main(ActivityThread.java:6669)
38
+ at java.lang.reflect.Method.invoke(Native Method)
39
+ at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
40
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
41
+ ```
14
42
 
15
43
  ### 該当のソースコード
16
44
 
17
- java
45
+ 言語:java
18
-
19
- ソースコード
20
- ExSample.java
46
+ ```ExSample.java
21
47
  package es.exsample;
22
48
 
23
49
  import android.content.Intent;
@@ -96,107 +122,105 @@
96
122
  }
97
123
  }
98
124
  }
99
-
100
- xml
125
+ ```
126
+
101
- <?xml version="1.0" encoding="utf-8"?>
127
+ ```activity_tabexsample.xml
102
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
128
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
103
129
  xmlns:tools="http://schemas.android.com/tools"
104
130
  android:layout_width="match_parent"
105
- android:layout_height="match_parent">
131
+ android:layout_height="match_parent"
106
-
132
+ android:paddingBottom="@dimen/activity_vertical_margin"
133
+ android:paddingLeft="@dimen/activity_horizontal_margin"
134
+ android:paddingRight="@dimen/activity_horizontal_margin"
135
+ android:paddingTop="@dimen/activity_vertical_margin"
136
+ tools:context="." >
137
+
138
+
107
- <LinearLayout
139
+ <TabHost
140
+ android:id="@android:id/tabhost"
108
141
  android:layout_width="match_parent"
109
142
  android:layout_height="match_parent"
110
- android:orientation="vertical"
111
- tools:layout_editor_absoluteX="1dp"
143
+ android:layout_alignParentLeft="true"
112
- tools:layout_editor_absoluteY="83dp">
144
+ android:layout_alignParentTop="true" >
113
-
145
+
114
- <TextView
146
+ <LinearLayout
115
- android:id="@+id/textView13"
116
147
  android:layout_width="match_parent"
117
- android:layout_height="51dp"
118
- android:text="勤務先名"
119
- android:textSize="20sp" />
120
-
121
- <EditText
122
- android:id="@+id/editText"
123
- android:layout_width="match_parent"
124
- android:layout_height="wrap_content"
125
- android:ems="10"
126
- android:inputType="textPersonName"
127
- android:text="○○○○" />
128
-
129
- <TextView
130
- android:id="@+id/textView14"
131
- android:layout_width="match_parent"
132
- android:layout_height="40dp"
133
- android:text="時給"
134
- android:textSize="20sp" />
135
-
136
- <EditText
137
- android:id="@+id/editTextNumber"
138
- android:layout_width="match_parent"
139
- android:layout_height="wrap_content"
140
- android:ems="10"
141
- android:inputType="number" />
142
-
143
- <TextView
144
- android:id="@+id/textView15"
145
- android:layout_width="match_parent"
146
- android:layout_height="51dp"
147
- android:text="開始時刻"
148
- android:textSize="20sp" />
149
-
150
- <EditText
151
- android:id="@+id/editTextTime"
152
- android:layout_width="match_parent"
153
- android:layout_height="72dp"
154
- android:ems="10"
155
- android:inputType="time" />
156
-
157
- <TextView
158
- android:id="@+id/textView16"
159
- android:layout_width="match_parent"
160
- android:layout_height="51dp"
161
- android:text="終了時刻"
162
- android:textSize="20sp" />
163
-
164
- <EditText
165
- android:id="@+id/editTextTime2"
166
- android:layout_width="match_parent"
167
- android:layout_height="73dp"
168
- android:ems="10"
169
- android:inputType="time" />
170
-
171
- <EditText
172
- android:id="@+id/textView2"
173
- android:layout_width="match_parent"
174
- android:layout_height="80dp"
175
- android:text="表示欄"
176
- android:textSize="20sp" />
177
-
178
- <Button
179
- android:id="@+id/button12"
180
- android:layout_width="match_parent"
181
- android:layout_height="wrap_content"
182
- android:text="保存"
183
- android:textSize="20sp" />
184
-
185
- <Button
186
- android:id="@+id/button18"
187
- android:layout_width="match_parent"
188
- android:layout_height="wrap_content"
189
- android:text="表示"
190
- android:textSize="20sp" />
191
-
192
- <Button
193
- android:id="@+id/button15"
194
- android:layout_width="match_parent"
195
- android:layout_height="wrap_content"
196
- android:text="戻る"
197
- android:textSize="20sp" />
198
- </LinearLayout>
199
- </androidx.constraintlayout.widget.ConstraintLayout>
148
+ android:layout_height="match_parent"
149
+ android:orientation="vertical" >
150
+
151
+ <TabWidget
152
+ android:id="@android:id/tabs"
153
+ android:layout_width="match_parent"
154
+ android:layout_height="wrap_content"></TabWidget>
155
+
156
+ <FrameLayout
157
+ android:id="@android:id/tabcontent"
158
+ android:layout_width="match_parent"
159
+ android:layout_height="match_parent"
160
+ android:orientation="vertical">
161
+
162
+ <LinearLayout
163
+ android:id="@+id/tab1"
164
+ android:layout_width="match_parent"
165
+ android:layout_height="match_parent"
166
+ android:orientation="vertical">
167
+
168
+ <CalendarView
169
+ android:id="@+id/calendarView2"
170
+ android:layout_width="match_parent"
171
+ android:layout_height="301dp" />
172
+
173
+ <Button
174
+ android:id="@+id/button20"
175
+ android:layout_width="match_parent"
176
+ android:layout_height="wrap_content"
177
+ android:text="日曜日" />
178
+
179
+ <Button
180
+ android:id="@+id/button21"
181
+ android:layout_width="match_parent"
182
+ android:layout_height="wrap_content"
183
+ android:text="月曜日" />
184
+
185
+ <Button
186
+ android:id="@+id/button22"
187
+ android:layout_width="match_parent"
188
+ android:layout_height="wrap_content"
189
+ android:text="火曜日" />
190
+
191
+ <Button
192
+ android:id="@+id/button23"
193
+ android:layout_width="match_parent"
194
+ android:layout_height="wrap_content"
195
+ android:text="水曜日" />
196
+
197
+ <Button
198
+ android:id="@+id/button24"
199
+ android:layout_width="match_parent"
200
+ android:layout_height="wrap_content"
201
+ android:text="木曜日" />
202
+
203
+ <Button
204
+ android:id="@+id/button25"
205
+ android:layout_width="match_parent"
206
+ android:layout_height="wrap_content"
207
+ android:text="金曜日" />
208
+
209
+ <Button
210
+ android:id="@+id/button26"
211
+ android:layout_width="match_parent"
212
+ android:layout_height="wrap_content"
213
+ android:text="土曜日" />
214
+
215
+ </LinearLayout>
216
+
217
+ </FrameLayout>
218
+ </LinearLayout>
219
+ </TabHost>
220
+
221
+ </RelativeLayout>
222
+ ```
223
+
200
224
 
201
225
  ### 試したこと
202
226