mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
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()
|
showSortingDialog()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.camera -> {
|
R.id.open_camera -> {
|
||||||
launchCamera()
|
launchCamera()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
menu.findItem(R.id.unhide_folder).isVisible = isFolderHidden && !mShowAll
|
menu.findItem(R.id.unhide_folder).isVisible = isFolderHidden && !mShowAll
|
||||||
|
|
||||||
menu.findItem(R.id.folder_view).isVisible = 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
|
return true
|
||||||
}
|
}
|
||||||
|
@ -121,6 +124,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
toggleFilenameVisibility()
|
toggleFilenameVisibility()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
R.id.open_camera -> {
|
||||||
|
launchCamera()
|
||||||
|
true
|
||||||
|
}
|
||||||
R.id.folder_view -> {
|
R.id.folder_view -> {
|
||||||
switchToFolderView()
|
switchToFolderView()
|
||||||
true
|
true
|
||||||
|
@ -133,6 +140,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
unhideFolder()
|
unhideFolder()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
R.id.settings -> {
|
||||||
|
launchSettings()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.about -> {
|
||||||
|
launchAbout()
|
||||||
|
true
|
||||||
|
}
|
||||||
else -> super.onOptionsItemSelected(item)
|
else -> super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
android:title="@string/sort_by"
|
android:title="@string/sort_by"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/camera"
|
android:id="@+id/open_camera"
|
||||||
android:icon="@mipmap/camera"
|
android:icon="@mipmap/camera"
|
||||||
android:title="@string/open_camera"
|
android:title="@string/open_camera"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
android:icon="@mipmap/toggle_filename"
|
android:icon="@mipmap/toggle_filename"
|
||||||
android:title="@string/toggle_filename"
|
android:title="@string/toggle_filename"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/open_camera"
|
||||||
|
android:icon="@mipmap/camera"
|
||||||
|
android:title="@string/open_camera"
|
||||||
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/folder_view"
|
android:id="@+id/folder_view"
|
||||||
android:title="@string/folder_view"
|
android:title="@string/folder_view"
|
||||||
|
@ -23,4 +28,12 @@
|
||||||
android:id="@+id/unhide_folder"
|
android:id="@+id/unhide_folder"
|
||||||
android:title="@string/unhide_folder"
|
android:title="@string/unhide_folder"
|
||||||
app:showAsAction="never"/>
|
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>
|
</menu>
|
||||||
|
|
Loading…
Reference in a new issue