diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-11-01 17:37:04 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-11-01 17:37:04 +0300 |
commit | 1ebcfa93a6d242406ea58af46e5127efff845099 (patch) | |
tree | e348d6cb6e3d77778c8416d8751cbef90b1da4a5 /app/src/main/java | |
parent | ad41b1df555d085edaaf5f00963ff9007536f88c (diff) |
Hide camera button on Android < 5
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/CardAttachmentPicker.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/CardAttachmentPicker.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/CardAttachmentPicker.java index 1d89ee0ce..c515a7c3d 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/CardAttachmentPicker.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/CardAttachmentPicker.java @@ -23,6 +23,7 @@ import it.niedermann.nextcloud.deck.util.DeckColorUtil; import static android.os.Build.VERSION.SDK_INT; import static android.os.Build.VERSION_CODES.LOLLIPOP; +import static android.view.View.GONE; import static it.niedermann.nextcloud.deck.ui.branding.BrandingUtil.isBrandingEnabled; import static it.niedermann.nextcloud.deck.ui.branding.BrandingUtil.readBrandMainColor; @@ -54,6 +55,10 @@ public class CardAttachmentPicker extends BottomSheetDialogFragment implements B binding = DialogAttachmentPickerBinding.inflate(inflater, container, false); brandedViews = new ImageView[]{binding.pickCameraIamge, binding.pickContactIamge, binding.pickFileIamge}; + if (SDK_INT < LOLLIPOP) { + binding.pickCamera.setVisibility(GONE); + } + @Nullable Context context = getContext(); if (context != null && isBrandingEnabled(context)) { applyBrand(readBrandMainColor(context)); |