質問編集履歴
3
ソースの記述を分割しました。記法を理解せずに投稿してしまいました。申し訳ありません。
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,13 +14,13 @@
|
|
14
14
|
|
15
15
|
###該当のソースコード
|
16
16
|
|
17
|
-
```
|
17
|
+
```xml
|
18
|
-
|
18
|
+
|
19
|
-
|
19
|
+
<!--
|
20
20
|
|
21
21
|
test_fragment.xml
|
22
22
|
|
23
|
-
--
|
23
|
+
-->
|
24
24
|
|
25
25
|
<?xml version="1.0" encoding="utf-8"?>
|
26
26
|
|
@@ -54,13 +54,15 @@
|
|
54
54
|
|
55
55
|
</LinearLayout>
|
56
56
|
|
57
|
-
|
57
|
+
```
|
58
|
+
|
58
|
-
|
59
|
+
```java
|
60
|
+
|
59
|
-
|
61
|
+
/**
|
60
62
|
|
61
63
|
TestFragment.java
|
62
64
|
|
63
|
-
|
65
|
+
**/
|
64
66
|
|
65
67
|
public class TestFragment extends Fragment {
|
66
68
|
|
@@ -110,13 +112,15 @@
|
|
110
112
|
|
111
113
|
}
|
112
114
|
|
113
|
-
|
115
|
+
```
|
116
|
+
|
114
|
-
|
117
|
+
```java
|
118
|
+
|
115
|
-
|
119
|
+
/**
|
116
120
|
|
117
121
|
MainActivity.java
|
118
122
|
|
119
|
-
|
123
|
+
**/
|
120
124
|
|
121
125
|
public class MainActivity extends AppCompatActivity
|
122
126
|
|
@@ -148,15 +152,15 @@
|
|
148
152
|
|
149
153
|
//以下、省略
|
150
154
|
|
151
|
-
|
155
|
+
```
|
152
|
-
|
156
|
+
|
153
|
-
|
157
|
+
```ここに言語を入力
|
154
|
-
|
158
|
+
|
155
|
-
|
159
|
+
/**
|
156
160
|
|
157
161
|
build.gradle(Project: NaviDrawAndFocusTest1)
|
158
162
|
|
159
|
-
|
163
|
+
**/
|
160
164
|
|
161
165
|
buildscript {
|
162
166
|
|
@@ -202,11 +206,15 @@
|
|
202
206
|
|
203
207
|
|
204
208
|
|
209
|
+
```
|
210
|
+
|
205
|
-
|
211
|
+
```ここに言語を入力
|
212
|
+
|
213
|
+
/**
|
206
214
|
|
207
215
|
build.gradle(Module: app)
|
208
216
|
|
209
|
-
|
217
|
+
**/
|
210
218
|
|
211
219
|
apply plugin: 'com.android.application'
|
212
220
|
|
@@ -270,13 +278,15 @@
|
|
270
278
|
|
271
279
|
}
|
272
280
|
|
273
|
-
|
281
|
+
```
|
274
|
-
|
282
|
+
|
275
|
-
|
283
|
+
```ここに言語を入力
|
284
|
+
|
285
|
+
/**
|
276
286
|
|
277
287
|
gradle-warapper.properties
|
278
288
|
|
279
|
-
|
289
|
+
**/
|
280
290
|
|
281
291
|
#Tue Apr 11 11:25:21 JST 2017
|
282
292
|
|
@@ -290,11 +300,7 @@
|
|
290
300
|
|
291
301
|
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
292
302
|
|
293
|
-
|
294
|
-
|
295
|
-
```
|
303
|
+
```
|
296
|
-
|
297
|
-
|
298
304
|
|
299
305
|
###試したこと
|
300
306
|
|
2
質問タイトルのタイポを修正しました。
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Andro
|
1
|
+
Android:EditTextのフォーカスがナビゲーションドロワーの表示では外れなくなった
|
test
CHANGED
File without changes
|
1
ご指摘に従い、ソースコードの最後にgradle関係の内容を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,8 +16,12 @@
|
|
16
16
|
|
17
17
|
```
|
18
18
|
|
19
|
+
==================
|
20
|
+
|
19
21
|
test_fragment.xml
|
20
22
|
|
23
|
+
------------------
|
24
|
+
|
21
25
|
<?xml version="1.0" encoding="utf-8"?>
|
22
26
|
|
23
27
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
@@ -50,10 +54,14 @@
|
|
50
54
|
|
51
55
|
</LinearLayout>
|
52
56
|
|
57
|
+
|
58
|
+
|
53
|
-
|
59
|
+
=================
|
54
60
|
|
55
61
|
TestFragment.java
|
56
62
|
|
63
|
+
=================
|
64
|
+
|
57
65
|
public class TestFragment extends Fragment {
|
58
66
|
|
59
67
|
// 以下、onStart()まで省略
|
@@ -102,10 +110,14 @@
|
|
102
110
|
|
103
111
|
}
|
104
112
|
|
113
|
+
|
114
|
+
|
105
|
-
|
115
|
+
=================
|
106
116
|
|
107
117
|
MainActivity.java
|
108
118
|
|
119
|
+
-----------------
|
120
|
+
|
109
121
|
public class MainActivity extends AppCompatActivity
|
110
122
|
|
111
123
|
implements NavigationView.OnNavigationItemSelectedListener {
|
@@ -136,6 +148,150 @@
|
|
136
148
|
|
137
149
|
//以下、省略
|
138
150
|
|
151
|
+
|
152
|
+
|
153
|
+
以下は、gradle関係の内容になります。
|
154
|
+
|
155
|
+
============================================
|
156
|
+
|
157
|
+
build.gradle(Project: NaviDrawAndFocusTest1)
|
158
|
+
|
159
|
+
--------------------------------------------
|
160
|
+
|
161
|
+
buildscript {
|
162
|
+
|
163
|
+
repositories {
|
164
|
+
|
165
|
+
jcenter()
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
dependencies {
|
170
|
+
|
171
|
+
classpath 'com.android.tools.build:gradle:2.3.1'
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
// NOTE: Do not place your application dependencies here; they belong
|
176
|
+
|
177
|
+
// in the individual module build.gradle files
|
178
|
+
|
179
|
+
}
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
allprojects {
|
186
|
+
|
187
|
+
repositories {
|
188
|
+
|
189
|
+
jcenter()
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
task clean(type: Delete) {
|
198
|
+
|
199
|
+
delete rootProject.buildDir
|
200
|
+
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
==========================
|
206
|
+
|
207
|
+
build.gradle(Module: app)
|
208
|
+
|
209
|
+
--------------------------
|
210
|
+
|
211
|
+
apply plugin: 'com.android.application'
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
android {
|
216
|
+
|
217
|
+
compileSdkVersion 25
|
218
|
+
|
219
|
+
buildToolsVersion "25.0.2"
|
220
|
+
|
221
|
+
defaultConfig {
|
222
|
+
|
223
|
+
applicationId "com.hogehoge.navidrawandfocustest1"
|
224
|
+
|
225
|
+
minSdkVersion 16
|
226
|
+
|
227
|
+
targetSdkVersion 25
|
228
|
+
|
229
|
+
versionCode 1
|
230
|
+
|
231
|
+
versionName "1.0"
|
232
|
+
|
233
|
+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
234
|
+
|
235
|
+
}
|
236
|
+
|
237
|
+
buildTypes {
|
238
|
+
|
239
|
+
release {
|
240
|
+
|
241
|
+
minifyEnabled false
|
242
|
+
|
243
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
244
|
+
|
245
|
+
}
|
246
|
+
|
247
|
+
}
|
248
|
+
|
249
|
+
}
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
dependencies {
|
254
|
+
|
255
|
+
compile fileTree(dir: 'libs', include: ['*.jar'])
|
256
|
+
|
257
|
+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
258
|
+
|
259
|
+
exclude group: 'com.android.support', module: 'support-annotations'
|
260
|
+
|
261
|
+
})
|
262
|
+
|
263
|
+
compile 'com.android.support:appcompat-v7:25.3.1'
|
264
|
+
|
265
|
+
compile 'com.android.support:design:25.3.1'
|
266
|
+
|
267
|
+
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
268
|
+
|
269
|
+
testCompile 'junit:junit:4.12'
|
270
|
+
|
271
|
+
}
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
===========================
|
276
|
+
|
277
|
+
gradle-warapper.properties
|
278
|
+
|
279
|
+
--------------------------
|
280
|
+
|
281
|
+
#Tue Apr 11 11:25:21 JST 2017
|
282
|
+
|
283
|
+
distributionBase=GRADLE_USER_HOME
|
284
|
+
|
285
|
+
distributionPath=wrapper/dists
|
286
|
+
|
287
|
+
zipStoreBase=GRADLE_USER_HOME
|
288
|
+
|
289
|
+
zipStorePath=wrapper/dists
|
290
|
+
|
291
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
292
|
+
|
293
|
+
|
294
|
+
|
139
295
|
```
|
140
296
|
|
141
297
|
|