From 20696353b8ee249b35249a0cbfd70cd9e0220919 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 10 Oct 2019 19:12:16 +0200 Subject: [PATCH] Attachments: try to improve a bit the UI and adding options [WIP] --- .../attachments/AttachmentTypeSelectorView.kt | 20 +++- .../features/attachments/AttachmentsHelper.kt | 11 ++ .../features/attachments/AttachmentsMapper.kt | 13 +++ .../attachments/AttachmentsPickerCallback.kt | 16 ++- .../attachments/PickerManagerFactory.kt | 16 +++ .../home/room/detail/RoomDetailFragment.kt | 7 +- .../ic_attachment_stickers_white_24dp.png | Bin 0 -> 707 bytes .../ic_attachment_stickers_white_24dp.png | Bin 0 -> 442 bytes .../ic_attachment_stickers_white_24dp.png | Bin 0 -> 928 bytes .../ic_attachment_stickers_white_24dp.png | Bin 0 -> 1388 bytes .../ic_attachment_stickers_white_24dp.png | Bin 0 -> 1907 bytes .../drawable/bg_attachment_type_selector.xml | 24 +++++ .../ic_attachment_audio_white_24dp.xml | 4 + .../ic_attachment_contact_white_24dp.xml | 4 + ....xml => view_attachment_type_selector.xml} | 102 ++++++++++++------ vector/src/main/res/values/styles_riot.xml | 15 +++ 16 files changed, 193 insertions(+), 39 deletions(-) create mode 100644 vector/src/main/res/drawable-hdpi/ic_attachment_stickers_white_24dp.png create mode 100644 vector/src/main/res/drawable-mdpi/ic_attachment_stickers_white_24dp.png create mode 100644 vector/src/main/res/drawable-xhdpi/ic_attachment_stickers_white_24dp.png create mode 100644 vector/src/main/res/drawable-xxhdpi/ic_attachment_stickers_white_24dp.png create mode 100644 vector/src/main/res/drawable-xxxhdpi/ic_attachment_stickers_white_24dp.png create mode 100644 vector/src/main/res/drawable/bg_attachment_type_selector.xml create mode 100644 vector/src/main/res/drawable/ic_attachment_audio_white_24dp.xml create mode 100644 vector/src/main/res/drawable/ic_attachment_contact_white_24dp.xml rename vector/src/main/res/layout/{attachment_type_selector.xml => view_attachment_type_selector.xml} (50%) diff --git a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentTypeSelectorView.kt b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentTypeSelectorView.kt index 9acdd6ae1f..bc34353467 100644 --- a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentTypeSelectorView.kt +++ b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentTypeSelectorView.kt @@ -32,6 +32,7 @@ import android.view.animation.AnimationSet import android.view.animation.OvershootInterpolator import android.view.animation.ScaleAnimation import android.view.animation.TranslateAnimation +import android.widget.FrameLayout import android.widget.ImageButton import android.widget.LinearLayout import android.widget.PopupWindow @@ -39,9 +40,12 @@ import androidx.core.view.doOnNextLayout import com.amulyakhare.textdrawable.TextDrawable import com.amulyakhare.textdrawable.util.ColorGenerator import im.vector.riotx.R +import im.vector.riotx.core.utils.DimensionConverter import kotlin.math.max -class AttachmentTypeSelectorView(context: Context, var callback: Callback?) +class AttachmentTypeSelectorView(context: Context, + inflater: LayoutInflater, + var callback: Callback?) : PopupWindow(context) { interface Callback { @@ -54,21 +58,25 @@ class AttachmentTypeSelectorView(context: Context, var callback: Callback?) private var cameraButton: ImageButton private var fileButton: ImageButton private var stickersButton: ImageButton + private var audioButton: ImageButton + private var contactButton: ImageButton private var anchor: View? = null init { - val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater - val layout = inflater.inflate(R.layout.attachment_type_selector, null, true) + val root = FrameLayout(context) + val layout = inflater.inflate(R.layout.view_attachment_type_selector, root, true) galleryButton = layout.findViewById(R.id.attachmentGalleryButton).configure(TYPE_GALLERY) cameraButton = layout.findViewById(R.id.attachmentCameraButton).configure(TYPE_CAMERA) fileButton = layout.findViewById(R.id.attachmentFileButton).configure(TYPE_FILE) stickersButton = layout.findViewById(R.id.attachmentStickersButton).configure(TYPE_STICKER) + audioButton = layout.findViewById(R.id.attachmentAudioButton).configure(TYPE_AUDIO) + contactButton = layout.findViewById(R.id.attachmentContactButton).configure(TYPE_CONTACT) contentView = layout width = LinearLayout.LayoutParams.MATCH_PARENT height = LinearLayout.LayoutParams.WRAP_CONTENT - setBackgroundDrawable(BitmapDrawable()) animationStyle = 0 + setBackgroundDrawable(BitmapDrawable()) inputMethodMode = INPUT_METHOD_NOT_NEEDED isFocusable = true isTouchable = true @@ -87,6 +95,8 @@ class AttachmentTypeSelectorView(context: Context, var callback: Callback?) animateButtonIn(galleryButton, ANIMATION_DURATION / 2) animateButtonIn(cameraButton, ANIMATION_DURATION / 2) animateButtonIn(fileButton, ANIMATION_DURATION / 4) + animateButtonIn(audioButton, ANIMATION_DURATION / 2) + animateButtonIn(contactButton, ANIMATION_DURATION / 4) animateButtonIn(stickersButton, 0) } } @@ -193,6 +203,8 @@ class AttachmentTypeSelectorView(context: Context, var callback: Callback?) const val TYPE_GALLERY = 1 const val TYPE_FILE = 2 const val TYPE_STICKER = 3 + const val TYPE_AUDIO = 4 + const val TYPE_CONTACT = 5 private const val ANIMATION_DURATION = 250 } diff --git a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsHelper.kt b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsHelper.kt index 3d770f9263..b1b10a7797 100644 --- a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsHelper.kt +++ b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsHelper.kt @@ -66,6 +66,10 @@ class AttachmentsHelper private constructor(private val pickerManagerFactory: Pi pickerManagerFactory.createFilePicker() } + private val audioPicker by lazy { + pickerManagerFactory.createAudioPicker() + } + // Restorable override fun onSaveInstanceState(outState: Bundle) { @@ -97,6 +101,13 @@ class AttachmentsHelper private constructor(private val pickerManagerFactory: Pi imagePicker.pickImage() } + /** + * Starts the process for handling audio picking + */ + fun selectAudio() { + audioPicker.pickAudio() + } + /** * Starts the process for handling capture image picking */ diff --git a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsMapper.kt b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsMapper.kt index fdb9277395..469cef1427 100644 --- a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsMapper.kt +++ b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsMapper.kt @@ -16,6 +16,7 @@ package im.vector.riotx.features.attachments +import com.kbeanie.multipicker.api.entity.ChosenAudio import com.kbeanie.multipicker.api.entity.ChosenFile import com.kbeanie.multipicker.api.entity.ChosenImage import com.kbeanie.multipicker.api.entity.ChosenVideo @@ -32,6 +33,18 @@ fun ChosenFile.toContentAttachmentData(): ContentAttachmentData { ) } +fun ChosenAudio.toContentAttachmentData(): ContentAttachmentData { + return ContentAttachmentData( + path = originalPath, + mimeType = mimeType, + type = mapType(), + size = size, + date = createdAt.time, + name = displayName, + duration = duration + ) +} + fun ChosenFile.mapType(): ContentAttachmentData.Type { return when { mimeType.startsWith("image/") -> ContentAttachmentData.Type.IMAGE diff --git a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsPickerCallback.kt b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsPickerCallback.kt index fc8200fe55..7df0b6f15b 100644 --- a/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsPickerCallback.kt +++ b/vector/src/main/java/im/vector/riotx/features/attachments/AttachmentsPickerCallback.kt @@ -16,9 +16,12 @@ package im.vector.riotx.features.attachments +import com.kbeanie.multipicker.api.callbacks.AudioPickerCallback +import com.kbeanie.multipicker.api.callbacks.ContactPickerCallback import com.kbeanie.multipicker.api.callbacks.FilePickerCallback import com.kbeanie.multipicker.api.callbacks.ImagePickerCallback import com.kbeanie.multipicker.api.callbacks.VideoPickerCallback +import com.kbeanie.multipicker.api.entity.ChosenAudio import com.kbeanie.multipicker.api.entity.ChosenFile import com.kbeanie.multipicker.api.entity.ChosenImage import com.kbeanie.multipicker.api.entity.ChosenVideo @@ -26,7 +29,18 @@ import com.kbeanie.multipicker.api.entity.ChosenVideo /** * This class delegates the PickerManager callbacks to an [AttachmentsHelper.Callback] */ -class AttachmentsPickerCallback(private val callback: AttachmentsHelper.Callback) : ImagePickerCallback, FilePickerCallback, VideoPickerCallback { +class AttachmentsPickerCallback(private val callback: AttachmentsHelper.Callback) : ImagePickerCallback, FilePickerCallback, VideoPickerCallback, AudioPickerCallback { + + override fun onAudiosChosen(audios: MutableList?) { + if (audios.isNullOrEmpty()) { + callback.onAttachmentsProcessFailed() + } else { + val attachments = audios.map { + it.toContentAttachmentData() + } + callback.onAttachmentsReady(attachments) + } + } override fun onFilesChosen(files: MutableList?) { if (files.isNullOrEmpty()) { diff --git a/vector/src/main/java/im/vector/riotx/features/attachments/PickerManagerFactory.kt b/vector/src/main/java/im/vector/riotx/features/attachments/PickerManagerFactory.kt index c0dbcafc48..23344b81ba 100644 --- a/vector/src/main/java/im/vector/riotx/features/attachments/PickerManagerFactory.kt +++ b/vector/src/main/java/im/vector/riotx/features/attachments/PickerManagerFactory.kt @@ -18,7 +18,9 @@ package im.vector.riotx.features.attachments import android.app.Activity import androidx.fragment.app.Fragment +import com.kbeanie.multipicker.api.AudioPicker import com.kbeanie.multipicker.api.CameraImagePicker +import com.kbeanie.multipicker.api.ContactPicker import com.kbeanie.multipicker.api.FilePicker import com.kbeanie.multipicker.api.ImagePicker import com.kbeanie.multipicker.api.VideoPicker @@ -33,6 +35,7 @@ interface PickerManagerFactory { fun createFilePicker(): FilePicker + fun createAudioPicker(): AudioPicker } @@ -67,6 +70,12 @@ class ActivityPickerManagerFactory(private val activity: Activity, callback: Att } } + override fun createAudioPicker(): AudioPicker { + return AudioPicker(activity).also { + it.allowMultiple() + it.setAudioPickerCallback(attachmentsPickerCallback) + } + } } class FragmentPickerManagerFactory(private val fragment: Fragment, callback: AttachmentsHelper.Callback) : PickerManagerFactory { @@ -100,5 +109,12 @@ class FragmentPickerManagerFactory(private val fragment: Fragment, callback: Att } } + override fun createAudioPicker(): AudioPicker { + return AudioPicker(fragment).also { + it.allowMultiple() + it.setAudioPickerCallback(attachmentsPickerCallback) + } + } + } diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt index 734337a108..d3ce4cacb1 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt @@ -622,9 +622,9 @@ class RoomDetailFragment : private fun setupAttachmentButton() { composerLayout.attachmentButton.setOnClickListener { if (!::attachmentTypeSelector.isInitialized) { - attachmentTypeSelector = AttachmentTypeSelectorView(requireContext(), this) + attachmentTypeSelector = AttachmentTypeSelectorView(vectorBaseActivity, vectorBaseActivity.layoutInflater, this) } - attachmentTypeSelector.show(it) + attachmentTypeSelector.show(composerLayout.attachmentButton) } } @@ -1114,7 +1114,10 @@ class RoomDetailFragment : AttachmentTypeSelectorView.TYPE_CAMERA -> attachmentsHelper.openCamera() AttachmentTypeSelectorView.TYPE_FILE -> attachmentsHelper.selectFile() AttachmentTypeSelectorView.TYPE_GALLERY -> attachmentsHelper.selectGallery() + AttachmentTypeSelectorView.TYPE_AUDIO -> attachmentsHelper.selectAudio() + AttachmentTypeSelectorView.TYPE_CONTACT -> vectorBaseActivity.notImplemented("Picking contacts") AttachmentTypeSelectorView.TYPE_STICKER -> vectorBaseActivity.notImplemented("Adding stickers") + } } diff --git a/vector/src/main/res/drawable-hdpi/ic_attachment_stickers_white_24dp.png b/vector/src/main/res/drawable-hdpi/ic_attachment_stickers_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..bf765cfc6dcd054386f02ca24651ebf36127eb98 GIT binary patch literal 707 zcmV;!0zCbRP)>x`3+#bOkOJ+XfiRy3 zz!W%8#+mQpeg!=vpWtl+^m;hvKCmg~D1ygc1to+S;|mjYL{CQeUeRr*++Y@JgO(*%u+JR=tGL2Zy~Cg%irlB(iRkn5lztP$Q(ErUGChrK+bLa1@i706F&X_8SOj0l p&njVGq>FNau7lWr`G-}g`~ywwrNgpyJ#hd4002ovPDHLkV1j0YMVJ5p literal 0 HcmV?d00001 diff --git a/vector/src/main/res/drawable-mdpi/ic_attachment_stickers_white_24dp.png b/vector/src/main/res/drawable-mdpi/ic_attachment_stickers_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..3f4b3e50a5619cde952bbff37da1d7cc460f5eee GIT binary patch literal 442 zcmV;r0Y(0aP)i5QS5J5?`dHK7xW47rIxd7%JU#kz%{nXAlZ1SnwIN_E99bQ?y#GK7uvf#B<>U z2AMQzg4Dpb$jr^0m5{Q5m*3M zqQD*SK#^~2D1j#M#kxyAn{Wj#BVA(r3$=*e3X% zQrv9vnrPE|#@)DsHd0#Eh&(C9AHlj<*J6AachC&`;>{`|ZtU6tC*T-t3tJ3Z;!F3E zhFw>Pc*3r@Vb>DHFVc?duCT)A2`$q`huzW^o}24D?YNe9jZ$=x@q9PyFVo@R>hbso kv}3?lJOIo8`lp|pAGlajBm5tH<^TWy07*qoM6N<$f>~$DFaQ7m literal 0 HcmV?d00001 diff --git a/vector/src/main/res/drawable-xhdpi/ic_attachment_stickers_white_24dp.png b/vector/src/main/res/drawable-xhdpi/ic_attachment_stickers_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..0a96b2bc5de88e693b9a454097cdcdfb74410946 GIT binary patch literal 928 zcmV;R17G}!P)4QRPXvNpk+A0Mfyi|RuwN{Jz+G5m#MFhWs zpj537w((XkptZKKY8zjUvoL`$%$zgllBAU^{2-j{%j+jXaSpm$3lazfmUFn zi@}HiZNQA+^P$$CcI3Iv{{cGPjF#ZL3s@FJ)CVDen>N$H-T>qIejq1ICtm`NGEScX z+slxYOk|s6+H3YIAjw3V=`wY`v`zXZ=74Qp1l%N!eg`~l?4}d_Ca$>^kYbWlX9d?d z-K6amDPv0xE-|5!MuZK(Fvj#eFa$&uozvKbnW=PME5IzWJ`>|srrt2~!Ch4d(As54 zompU=MnDrW%nM0{%chG80a`ngJeNqlgBk&+h|#Ffkv!9p1%&`Nc6Ug<9*ux;Vw4e_ z4>27XPzZ2i*Foyt)d-j(Mva2=D9+tQ9KiuxxH$=MW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fuZr1kYI5RtX@p|as!41166O8w z2FZcRMw4&Yutk4VGiL{PJ`(~SW-O-B(2Z+|00Fha!55B)Y!HAg*Sebwu|ao+;euWc z(fBVI>WY0ny2f1miayH*0o)#&Z5{%erhvDj%bY0nDtMhS_tPeGdb!v0C&r$7pNGX& zs$eei!?)DSr?ZO~56O9DckyU!>3hV6?%fX@M`5R*@fN&-f}zc!RYvZ-U2-6 zQwQz`9?QMV??)*Ij641!T%e!r2fRpGNQqi?71KG`=T(Lu z*SDsYY@h1j{<8Bq~4T&aSf_56L1M3>sMuC7-)ojo}`F_LPyKO9D`uP*}&y$cX zxrh>Fb~E}VdWG{sH2h3TFPNl3um*mIln&Ahny1XKr^nR528uR=GW>MPYMQ1#hNu`5 z>8p!Nl(*mig2vcF|KFD3=TI?a)PsKgl25)(0#au}ua8V+4`p6Uh2F|~Mh#b2^R}{8 z+I-E?JK8Cb$2mteWFQ9}PCi_y?*XPjBuvc>h{oB1t=C^gUNO(J85Rk%Zb>;Gk zxDAYOAGd9vpbotvX6`5|W51HUuPAf^CT3C3M%eI!w1ov`ld!%jX<}5?f*ixj-c@Ol zBVb~c2^W1jM8jkB`;-dt*BeG54S?Mi*z$sRPK*U$bWEXlP@yI(?Da?Sqqj;*51bM- zI$k7;y_!qI*k2bY%jzMIo=}zu|Qs?7%k$C tfDDE+f+N5Y;NS>w1UNVX903j?;2%rqBX!PEGr|A>002ovPDHLkV1lAZaX + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/drawable/ic_attachment_audio_white_24dp.xml b/vector/src/main/res/drawable/ic_attachment_audio_white_24dp.xml new file mode 100644 index 0000000000..3de9a237e8 --- /dev/null +++ b/vector/src/main/res/drawable/ic_attachment_audio_white_24dp.xml @@ -0,0 +1,4 @@ + + + + diff --git a/vector/src/main/res/drawable/ic_attachment_contact_white_24dp.xml b/vector/src/main/res/drawable/ic_attachment_contact_white_24dp.xml new file mode 100644 index 0000000000..20f05d692e --- /dev/null +++ b/vector/src/main/res/drawable/ic_attachment_contact_white_24dp.xml @@ -0,0 +1,4 @@ + + + + diff --git a/vector/src/main/res/layout/attachment_type_selector.xml b/vector/src/main/res/layout/view_attachment_type_selector.xml similarity index 50% rename from vector/src/main/res/layout/attachment_type_selector.xml rename to vector/src/main/res/layout/view_attachment_type_selector.xml index 603cb9d72d..772407ba3f 100644 --- a/vector/src/main/res/layout/attachment_type_selector.xml +++ b/vector/src/main/res/layout/view_attachment_type_selector.xml @@ -1,11 +1,15 @@ - - + android:background="@drawable/bg_attachment_type_selector" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + android:orientation="vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp"> + android:weightSum="3"> @@ -48,16 +48,12 @@ @@ -72,20 +68,66 @@ + + + + + + + + + + + + + + + + + + + + + + - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/vector/src/main/res/values/styles_riot.xml b/vector/src/main/res/values/styles_riot.xml index 1b19c87e08..2019fd8a2a 100644 --- a/vector/src/main/res/values/styles_riot.xml +++ b/vector/src/main/res/values/styles_riot.xml @@ -324,4 +324,19 @@ 12sp + + + + + \ No newline at end of file