質問編集履歴
1
activity_main.xml追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -91,3 +91,177 @@
|
|
91
91
|
|
92
92
|
|
93
93
|
よろしくお願いします!
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
↓activity_main.xml追記↓
|
98
|
+
|
99
|
+
```activity_main.xml
|
100
|
+
|
101
|
+
<?xml version="1.0" encoding="utf-8"?>
|
102
|
+
|
103
|
+
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
104
|
+
|
105
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
106
|
+
|
107
|
+
xmlns:tools="http://schemas.android.com/tools"
|
108
|
+
|
109
|
+
android:id="@+id/drawer_layout"
|
110
|
+
|
111
|
+
android:layout_width="match_parent"
|
112
|
+
|
113
|
+
android:layout_height="match_parent"
|
114
|
+
|
115
|
+
android:fitsSystemWindows="true"
|
116
|
+
|
117
|
+
tools:openDrawer="end">
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
126
|
+
|
127
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
128
|
+
|
129
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
130
|
+
|
131
|
+
xmlns:tools="http://schemas.android.com/tools"
|
132
|
+
|
133
|
+
android:layout_width="match_parent"
|
134
|
+
|
135
|
+
android:layout_height="match_parent"
|
136
|
+
|
137
|
+
tools:context=".MainActivity">
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<com.google.android.material.appbar.AppBarLayout
|
144
|
+
|
145
|
+
android:layout_height="wrap_content"
|
146
|
+
|
147
|
+
android:layout_width="match_parent"
|
148
|
+
|
149
|
+
android:theme="@style/AppTheme.AppBarOverlay">
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<androidx.appcompat.widget.Toolbar
|
154
|
+
|
155
|
+
android:id="@+id/toolbar"
|
156
|
+
|
157
|
+
android:layout_width="match_parent"
|
158
|
+
|
159
|
+
android:layout_height="match_parent"
|
160
|
+
|
161
|
+
android:background="@color/white"
|
162
|
+
|
163
|
+
android:paddingTop="15dp"
|
164
|
+
|
165
|
+
android:paddingBottom="15dp"
|
166
|
+
|
167
|
+
app:layout_scrollFlags="scroll|enterAlways">
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<androidx.appcompat.widget.AppCompatImageButton
|
174
|
+
|
175
|
+
android:id="@+id/logo_top"
|
176
|
+
|
177
|
+
android:layout_width="wrap_content"
|
178
|
+
|
179
|
+
android:layout_height="wrap_content"
|
180
|
+
|
181
|
+
android:layout_gravity="center"
|
182
|
+
|
183
|
+
android:adjustViewBounds="true"
|
184
|
+
|
185
|
+
android:scaleType="fitCenter"/>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
</androidx.appcompat.widget.Toolbar>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<com.google.android.material.tabs.TabLayout
|
194
|
+
|
195
|
+
android:id="@+id/tabs"
|
196
|
+
|
197
|
+
android:layout_width="match_parent"
|
198
|
+
|
199
|
+
android:layout_height="35dp"
|
200
|
+
|
201
|
+
android:background="@color/white"
|
202
|
+
|
203
|
+
android:paddingTop="0dp"
|
204
|
+
|
205
|
+
android:paddingBottom="0dp"
|
206
|
+
|
207
|
+
android:paddingLeft="0dp"
|
208
|
+
|
209
|
+
android:paddingRight="0dp"
|
210
|
+
|
211
|
+
android:state_selected="true"
|
212
|
+
|
213
|
+
app:tabBackground="@drawable/tab_color_selector"
|
214
|
+
|
215
|
+
app:tabGravity="fill"
|
216
|
+
|
217
|
+
app:tabMaxWidth="0dp"
|
218
|
+
|
219
|
+
app:tabMode="fixed"
|
220
|
+
|
221
|
+
app:tabTextAppearance="@style/TabText" />
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</com.google.android.material.appbar.AppBarLayout>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<androidx.viewpager.widget.ViewPager
|
232
|
+
|
233
|
+
android:id="@+id/view_pager"
|
234
|
+
|
235
|
+
android:layout_width="match_parent"
|
236
|
+
|
237
|
+
android:layout_height="match_parent"
|
238
|
+
|
239
|
+
android:focusable = "true"
|
240
|
+
|
241
|
+
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
246
|
+
|
247
|
+
<com.google.android.material.navigation.NavigationView
|
248
|
+
|
249
|
+
android:id="@+id/nav_view"
|
250
|
+
|
251
|
+
android:layout_width="240dp"
|
252
|
+
|
253
|
+
android:layout_height="match_parent"
|
254
|
+
|
255
|
+
android:layout_gravity="end"
|
256
|
+
|
257
|
+
android:fitsSystemWindows="true"
|
258
|
+
|
259
|
+
app:menu="@menu/activity_main_drawer" />
|
260
|
+
|
261
|
+
</androidx.drawerlayout.widget.DrawerLayout>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
```
|