Improved User profile image picking
This commit is contained in:
parent
2c4b00edb9
commit
e015741470
2 changed files with 5 additions and 56 deletions
|
@ -27,6 +27,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.request.RequestListener
|
import com.bumptech.glide.request.RequestListener
|
||||||
import com.bumptech.glide.request.target.Target
|
import com.bumptech.glide.request.target.Target
|
||||||
import com.github.dhaval2404.imagepicker.ImagePicker
|
import com.github.dhaval2404.imagepicker.ImagePicker
|
||||||
|
import com.github.dhaval2404.imagepicker.constant.ImageProvider
|
||||||
import kotlinx.android.synthetic.main.activity_user_info.*
|
import kotlinx.android.synthetic.main.activity_user_info.*
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
@ -100,16 +101,17 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
|
|
||||||
private fun selectBannerImage() {
|
private fun selectBannerImage() {
|
||||||
ImagePicker.with(this)
|
ImagePicker.with(this)
|
||||||
.compress(1024)
|
.compress(1440)
|
||||||
|
.provider(ImageProvider.GALLERY)
|
||||||
.crop(16f, 9f)
|
.crop(16f, 9f)
|
||||||
.start(PICK_BANNER_REQUEST)
|
.start(PICK_BANNER_REQUEST)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickNewPhoto() {
|
private fun pickNewPhoto() {
|
||||||
ImagePicker.with(this)
|
ImagePicker.with(this)
|
||||||
.galleryOnly()
|
.provider(ImageProvider.GALLERY)
|
||||||
.cropSquare()
|
.cropSquare()
|
||||||
.compress(1024)
|
.compress(1440)
|
||||||
.start(PICK_IMAGE_REQUEST)
|
.start(PICK_IMAGE_REQUEST)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,59 +122,6 @@
|
||||||
<item>this_year</item>
|
<item>this_year</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="night">
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/44.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/40.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/36.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/32.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/28.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/24.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/20.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/16.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/12.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/8.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/4.png</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="evening">
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/43.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/39.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/35.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/31.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/27.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/23.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/19.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/15.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/11.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/7.png</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="after_noon">
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/42.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/38.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/34.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/30.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/26.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/22.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/18.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/14.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/10.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/6.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/2.png</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="morning">
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/41.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/37.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/33.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/29.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/25.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/21.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/17.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/13.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/9.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/5.png</item>
|
|
||||||
<item>https://cdn.techjuice.pk/wp-content/uploads/2016/07/1.png</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<array name="pref_album_details_style_layout">
|
<array name="pref_album_details_style_layout">
|
||||||
<item>@layout/activity_album</item>
|
<item>@layout/activity_album</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
Loading…
Reference in a new issue