Merge pull request #95 from amadeu01/master

Fixed `MediaAction.ACTION_VIDEO` and `MediaAction.ACTION_PHOTO` on PreviewActivity
pull/104/head
Florent CHAMPIGNY 7 years ago committed by GitHub
commit 25879d6d8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 2
      build.gradle
  3. 4
      camerafragment/src/main/java/com/github/florent37/camerafragment/PreviewActivity.java

@ -145,7 +145,7 @@ CameraFragment comes with some default views
In your module [![Download](https://api.bintray.com/packages/florent37/maven/CameraFragment/images/download.svg)](https://bintray.com/florent37/maven/CameraFragment/_latestVersion) In your module [![Download](https://api.bintray.com/packages/florent37/maven/CameraFragment/images/download.svg)](https://bintray.com/florent37/maven/CameraFragment/_latestVersion)
```groovy ```groovy
compile 'com.github.florent37:camerafragment:1.0.8' compile 'com.github.florent37:camerafragment:1.0.9'
``` ```
# Community # Community

@ -22,6 +22,6 @@ ext {
sdk = 25 sdk = 25
buildTools = "25.0.0" //keep 25.0.0 for Continuous Integration buildTools = "25.0.0" //keep 25.0.0 for Continuous Integration
minSdk = 10 minSdk = 10
libraryVersion = "1.0.8" libraryVersion = "1.0.9"
supportVersion = "25.0.0" supportVersion = "25.0.0"
} }

@ -145,9 +145,9 @@ public class PreviewActivity extends AppCompatActivity implements View.OnClickLi
mediaAction = args.getInt(MEDIA_ACTION_ARG); mediaAction = args.getInt(MEDIA_ACTION_ARG);
previewFilePath = args.getString(FILE_PATH_ARG); previewFilePath = args.getString(FILE_PATH_ARG);
if (mediaAction == Configuration.MEDIA_ACTION_VIDEO) { if (mediaAction == MediaAction.ACTION_VIDEO) {
displayVideo(savedInstanceState); displayVideo(savedInstanceState);
} else if (mediaAction == Configuration.MEDIA_ACTION_PHOTO) { } else if (mediaAction == MediaAction.ACTION_PHOTO) {
displayImage(); displayImage();
} else { } else {
String mimeType = Utils.getMimeType(previewFilePath); String mimeType = Utils.getMimeType(previewFilePath);

Loading…
Cancel
Save