From e015741470ec6d289f9d37625b3f6002a95d42f8 Mon Sep 17 00:00:00 2001 From: Hemanth S Date: Thu, 21 May 2020 04:37:44 +0530 Subject: [PATCH] Improved User profile image picking --- .../retromusic/activities/UserInfoActivity.kt | 8 +-- app/src/main/res/values/arrays.xml | 53 ------------------- 2 files changed, 5 insertions(+), 56 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/UserInfoActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/UserInfoActivity.kt index b61e7688..245d96e0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/UserInfoActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/UserInfoActivity.kt @@ -27,6 +27,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.request.RequestListener import com.bumptech.glide.request.target.Target import com.github.dhaval2404.imagepicker.ImagePicker +import com.github.dhaval2404.imagepicker.constant.ImageProvider import kotlinx.android.synthetic.main.activity_user_info.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -100,16 +101,17 @@ class UserInfoActivity : AbsBaseActivity() { private fun selectBannerImage() { ImagePicker.with(this) - .compress(1024) + .compress(1440) + .provider(ImageProvider.GALLERY) .crop(16f, 9f) .start(PICK_BANNER_REQUEST) } private fun pickNewPhoto() { ImagePicker.with(this) - .galleryOnly() + .provider(ImageProvider.GALLERY) .cropSquare() - .compress(1024) + .compress(1440) .start(PICK_IMAGE_REQUEST) } diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 3b1e598b..1d2e6a10 100755 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -122,59 +122,6 @@ this_year - - https://cdn.techjuice.pk/wp-content/uploads/2016/07/44.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/40.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/36.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/32.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/28.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/24.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/20.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/16.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/12.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/8.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/4.png - - - https://cdn.techjuice.pk/wp-content/uploads/2016/07/43.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/39.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/35.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/31.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/27.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/23.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/19.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/15.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/11.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/7.png - - - https://cdn.techjuice.pk/wp-content/uploads/2016/07/42.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/38.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/34.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/30.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/26.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/22.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/18.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/14.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/10.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/6.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/2.png - - - https://cdn.techjuice.pk/wp-content/uploads/2016/07/41.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/37.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/33.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/29.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/25.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/21.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/17.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/13.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/9.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/5.png - https://cdn.techjuice.pk/wp-content/uploads/2016/07/1.png - - - @layout/activity_album