add Camera, Settings and About to ShowAll actionbar
This commit is contained in:
parent
3e779c0a98
commit
4c0a0a43b8
4 changed files with 30 additions and 2 deletions
|
@ -77,7 +77,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
showSortingDialog()
|
||||
true
|
||||
}
|
||||
R.id.camera -> {
|
||||
R.id.open_camera -> {
|
||||
launchCamera()
|
||||
true
|
||||
}
|
||||
|
|
|
@ -107,6 +107,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
menu.findItem(R.id.unhide_folder).isVisible = isFolderHidden && !mShowAll
|
||||
|
||||
menu.findItem(R.id.folder_view).isVisible = mShowAll
|
||||
menu.findItem(R.id.open_camera).isVisible = mShowAll
|
||||
menu.findItem(R.id.settings).isVisible = mShowAll
|
||||
menu.findItem(R.id.about).isVisible = mShowAll
|
||||
|
||||
return true
|
||||
}
|
||||
|
@ -121,6 +124,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
toggleFilenameVisibility()
|
||||
true
|
||||
}
|
||||
R.id.open_camera -> {
|
||||
launchCamera()
|
||||
true
|
||||
}
|
||||
R.id.folder_view -> {
|
||||
switchToFolderView()
|
||||
true
|
||||
|
@ -133,6 +140,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
unhideFolder()
|
||||
true
|
||||
}
|
||||
R.id.settings -> {
|
||||
launchSettings()
|
||||
true
|
||||
}
|
||||
R.id.about -> {
|
||||
launchAbout()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:title="@string/sort_by"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/camera"
|
||||
android:id="@+id/open_camera"
|
||||
android:icon="@mipmap/camera"
|
||||
android:title="@string/open_camera"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
android:icon="@mipmap/toggle_filename"
|
||||
android:title="@string/toggle_filename"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/open_camera"
|
||||
android:icon="@mipmap/camera"
|
||||
android:title="@string/open_camera"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/folder_view"
|
||||
android:title="@string/folder_view"
|
||||
|
@ -23,4 +28,12 @@
|
|||
android:id="@+id/unhide_folder"
|
||||
android:title="@string/unhide_folder"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/settings"
|
||||
android:title="@string/settings"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/about"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="never"/>
|
||||
</menu>
|
||||
|
|
Loading…
Reference in a new issue