質問編集履歴
2
間違い
test
CHANGED
File without changes
|
test
CHANGED
@@ -177,21 +177,6 @@
|
|
177
177
|
super.onCreate(savedInstanceState)
|
178
178
|
setContentView(R.layout.activity_main)
|
179
179
|
|
180
|
-
val toolbar: Toolbar = findViewById<View>(R.id.toolbar) as Toolbar
|
181
|
-
setSupportActionBar(toolbar)
|
182
|
-
|
183
|
-
val drawer = findViewById<View>(R.id.drawerLayout) as DrawerLayout
|
184
|
-
val toggle = ActionBarDrawerToggle(
|
185
|
-
this, drawer, toolbar,
|
186
|
-
R.string.drawer_open,
|
187
|
-
R.string.drawer_close
|
188
|
-
)
|
189
|
-
drawer.addDrawerListener(toggle)
|
190
|
-
toggle.syncState()
|
191
|
-
|
192
|
-
val navigationView = findViewById<View>(R.id.navigationView) as NavigationView
|
193
|
-
navigationView.setNavigationItemSelectedListener(this)
|
194
|
-
|
195
180
|
this.initSetting()
|
196
181
|
}
|
197
182
|
|
1
あ
test
CHANGED
File without changes
|
test
CHANGED
@@ -195,60 +195,6 @@
|
|
195
195
|
this.initSetting()
|
196
196
|
}
|
197
197
|
|
198
|
-
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
199
|
-
menuInflater.inflate(R.menu.options, menu)
|
200
|
-
return true
|
201
|
-
}
|
202
|
-
|
203
|
-
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
204
|
-
when (item.itemId) {
|
205
|
-
R.id.menu_back -> {
|
206
|
-
if (folderHistory.size > 1) {
|
207
|
-
folderHistory.pop()
|
208
|
-
val previousFolder = folderHistory.peek()
|
209
|
-
updateFolderAndFileList(previousFolder)
|
210
|
-
}
|
211
|
-
return true
|
212
|
-
}
|
213
|
-
R.id.action_settings -> Log.d(TAG, "Settings Selected!")
|
214
|
-
}
|
215
|
-
return true
|
216
|
-
}
|
217
|
-
|
218
|
-
override fun onNavigationItemSelected(item: MenuItem): Boolean {
|
219
|
-
val id = item.itemId
|
220
|
-
val folderName = if (folderHistory.isEmpty()) "" else folderHistory.peek()
|
221
|
-
|
222
|
-
when (item.itemId) {
|
223
|
-
//R.id.menu_Connection -> Log.d(TAG, "Item 1 Selected!")
|
224
|
-
R.id.menu_item2 -> Log.d(TAG, "Item 1 Selected!")
|
225
|
-
R.id.menu_item3 -> Log.d(TAG, "Item 2 Selected!")
|
226
|
-
R.id.menu_item4 -> Log.d(TAG, "Item 3 Selected!")
|
227
|
-
R.id.menu_item5 -> Log.d(TAG, "Item 4 Selected!")
|
228
|
-
}
|
229
|
-
when (id) {
|
230
|
-
R.id.menu_back -> {
|
231
|
-
folderHistory.pop()
|
232
|
-
val previousFolder = if (folderHistory.empty()) "" else folderHistory.peek()
|
233
|
-
updateFolderAndFileList(previousFolder)
|
234
|
-
}
|
235
|
-
R.id.menu_Connection -> {
|
236
|
-
mf_scope.launch {
|
237
|
-
runOnUiThread {
|
238
|
-
// ルートフォルダの内容を表示
|
239
|
-
updateFolderAndFileList("")
|
240
|
-
}
|
241
|
-
}
|
242
|
-
}
|
243
|
-
else -> {
|
244
|
-
updateFolderAndFileList(folderName + item.title)
|
245
|
-
}
|
246
|
-
}
|
247
|
-
val drawer = findViewById<View>(R.id.drawerLayout) as DrawerLayout
|
248
|
-
drawer.closeDrawer(GravityCompat.START)
|
249
|
-
return true
|
250
|
-
}
|
251
|
-
|
252
198
|
private fun playVideo(videoPath: String) {
|
253
199
|
|
254
200
|
Log.d("再生される動画Path:",videoPath)
|