mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-06 02:33:28 +01:00
fix #416, allow viewing bigger contact photos on the View screen
This commit is contained in:
parent
71d9f740f0
commit
5eba2ff251
@ -8,6 +8,7 @@ import android.view.MenuItem
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
|
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
|
||||||
import com.simplemobiletools.contacts.pro.R
|
import com.simplemobiletools.contacts.pro.R
|
||||||
@ -146,6 +147,16 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
showPhotoPlaceholder(contact_photo)
|
showPhotoPlaceholder(contact_photo)
|
||||||
} else {
|
} else {
|
||||||
updateContactPhoto(contact!!.photoUri, contact_photo, contact!!.photo)
|
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
|
val textColor = config.textColor
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/contact_wrapper"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
android:id="@+id/contact_scrollview"
|
android:id="@+id/contact_scrollview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -409,3 +414,16 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_photo_big"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#88000000"
|
||||||
|
android:clickable="true"
|
||||||
|
android:padding="@dimen/activity_margin"
|
||||||
|
android:src="@drawable/img_write_storage"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user