fix #416, allow viewing bigger contact photos on the View screen

This commit is contained in:
tibbi
2019-08-14 16:11:53 +02:00
parent 71d9f740f0
commit 5eba2ff251
2 changed files with 398 additions and 369 deletions

View File

@ -8,6 +8,7 @@ import android.view.MenuItem
import android.view.View
import android.view.WindowManager
import android.widget.RelativeLayout
import com.bumptech.glide.Glide
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
import com.simplemobiletools.contacts.pro.R
@ -146,6 +147,16 @@ class ViewContactActivity : ContactActivity() {
showPhotoPlaceholder(contact_photo)
} else {
updateContactPhoto(contact!!.photoUri, contact_photo, contact!!.photo)
Glide.with(this).load(currentContactPhotoPath).into(contact_photo_big)
contact_photo.setOnClickListener {
contact_photo_big.alpha = 0f
contact_photo_big.beVisible()
contact_photo_big.animate().alpha(1f).start()
}
contact_photo_big.setOnClickListener {
contact_photo_big.animate().alpha(0f).withEndAction { it.beGone() }.start()
}
}
val textColor = config.textColor