add a button to open the Camera, closes #4
- added it only to the main screen with the directories, as adding it in the specific album might be confusing. People could think that the photo will be saved in that album
This commit is contained in:
parent
acee888740
commit
c3420aa748
|
@ -90,17 +90,23 @@ public class MainActivity extends AppCompatActivity
|
|||
if (mIsThirdPartyIntent)
|
||||
return false;
|
||||
|
||||
getMenuInflater().inflate(R.menu.menu, menu);
|
||||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.about:
|
||||
case R.id.camera: {
|
||||
final Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
case R.id.about: {
|
||||
final Intent intent = new Intent(getApplicationContext(), AboutActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
@ -473,7 +479,7 @@ public class MainActivity extends AppCompatActivity
|
|||
@Override
|
||||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||
final MenuInflater inflater = mode.getMenuInflater();
|
||||
inflater.inflate(R.menu.directories_menu, menu);
|
||||
inflater.inflate(R.menu.directories_cab, menu);
|
||||
mActionMode = mode;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/camera"
|
||||
android:icon="@mipmap/camera"
|
||||
android:title="@string/open_camera"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/about"
|
||||
android:title="@string/about"
|
Binary file not shown.
After Width: | Height: | Size: 364 B |
Binary file not shown.
After Width: | Height: | Size: 240 B |
Binary file not shown.
After Width: | Height: | Size: 446 B |
Binary file not shown.
After Width: | Height: | Size: 666 B |
Binary file not shown.
After Width: | Height: | Size: 894 B |
|
@ -18,6 +18,7 @@
|
|||
<string name="extension">Extension</string>
|
||||
<string name="file_deleted">File deleted</string>
|
||||
<string name="setting_wallpaper">Setting wallpaper</string>
|
||||
<string name="open_camera">Open camera</string>
|
||||
|
||||
<plurals name="folders_deleted">
|
||||
<item quantity="one">1 folder deleted</item>
|
||||
|
|
Loading…
Reference in New Issue