mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Add the default number indicator at the View Details too
This commit is contained in:
		| @@ -63,7 +63,7 @@ android { | |||||||
| } | } | ||||||
|  |  | ||||||
| dependencies { | dependencies { | ||||||
|     implementation 'com.github.SimpleMobileTools:Simple-Commons:1bc50d636c' |     implementation 'com.github.SimpleMobileTools:Simple-Commons:2752395357' | ||||||
|     implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' |     implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' | ||||||
|     implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' |     implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' | ||||||
|     implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' |     implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' | ||||||
|   | |||||||
| @@ -70,6 +70,10 @@ class EditContactActivity : ContactActivity() { | |||||||
|     private var emailViewToColor: EditText? = null |     private var emailViewToColor: EditText? = null | ||||||
|     private var originalContactSource = "" |     private var originalContactSource = "" | ||||||
|  |  | ||||||
|  |     enum class PrimaryNumberStatus { | ||||||
|  |         UNCHANGED, STARRED, UNSTARRED | ||||||
|  |     } | ||||||
|  |  | ||||||
|     override fun onCreate(savedInstanceState: Bundle?) { |     override fun onCreate(savedInstanceState: Bundle?) { | ||||||
|         showTransparentTop = true |         showTransparentTop = true | ||||||
|         super.onCreate(savedInstanceState) |         super.onCreate(savedInstanceState) | ||||||
| @@ -1024,8 +1028,14 @@ class EditContactActivity : ContactActivity() { | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         val contactValues = fillContactValues() | ||||||
|  |  | ||||||
|         val oldPhotoUri = contact!!.photoUri |         val oldPhotoUri = contact!!.photoUri | ||||||
|         contact = fillContactValues() |         val oldPrimary = contact!!.phoneNumbers.find { it.isPrimary } | ||||||
|  |         val newPrimary = contactValues.phoneNumbers.find { it.isPrimary } | ||||||
|  |         val primaryState = Pair(oldPrimary, newPrimary) | ||||||
|  |  | ||||||
|  |         contact = contactValues | ||||||
|  |  | ||||||
|         ensureBackgroundThread { |         ensureBackgroundThread { | ||||||
|             config.lastUsedContactSource = contact!!.source |             config.lastUsedContactSource = contact!!.source | ||||||
| @@ -1034,7 +1044,7 @@ class EditContactActivity : ContactActivity() { | |||||||
|                 originalContactSource != contact!!.source -> insertNewContact(true) |                 originalContactSource != contact!!.source -> insertNewContact(true) | ||||||
|                 else -> { |                 else -> { | ||||||
|                     val photoUpdateStatus = getPhotoUpdateStatus(oldPhotoUri, contact!!.photoUri) |                     val photoUpdateStatus = getPhotoUpdateStatus(oldPhotoUri, contact!!.photoUri) | ||||||
|                     updateContact(photoUpdateStatus) |                     updateContact(photoUpdateStatus, primaryState) | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| @@ -1199,17 +1209,75 @@ class EditContactActivity : ContactActivity() { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun updateContact(photoUpdateStatus: Int) { |     private fun updateContact(photoUpdateStatus: Int, primaryState: Pair<PhoneNumber?, PhoneNumber?>) { | ||||||
|         isSaving = true |         isSaving = true | ||||||
|         if (ContactsHelper(this@EditContactActivity).updateContact(contact!!, photoUpdateStatus)) { |         if (ContactsHelper(this@EditContactActivity).updateContact(contact!!, photoUpdateStatus)) { | ||||||
|  |             val status = getPrimaryNumberStatus(primaryState.first, primaryState.second) | ||||||
|  |             if (status != PrimaryNumberStatus.UNCHANGED) { | ||||||
|  |                 updateDefaultNumberForDuplicateContacts(primaryState, status) { | ||||||
|                     setResult(Activity.RESULT_OK) |                     setResult(Activity.RESULT_OK) | ||||||
|                     hideKeyboard() |                     hideKeyboard() | ||||||
|                     finish() |                     finish() | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 setResult(Activity.RESULT_OK) | ||||||
|  |                 hideKeyboard() | ||||||
|  |                 finish() | ||||||
|  |             } | ||||||
|         } else { |         } else { | ||||||
|             toast(R.string.unknown_error_occurred) |             toast(R.string.unknown_error_occurred) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private fun updateDefaultNumberForDuplicateContacts( | ||||||
|  |         toggleState: Pair<PhoneNumber?, PhoneNumber?>, | ||||||
|  |         primaryStatus: PrimaryNumberStatus, | ||||||
|  |         callback: () -> Unit | ||||||
|  |     ) { | ||||||
|  |         val contactsHelper = ContactsHelper(this) | ||||||
|  |  | ||||||
|  |         contactsHelper.getDuplicatesOfContact(contact!!, false) { contacts -> | ||||||
|  |             ensureBackgroundThread { | ||||||
|  |                 val displayContactSources = getVisibleContactSources() | ||||||
|  |                 contacts.filter { displayContactSources.contains(it.source) }.forEach { contact -> | ||||||
|  |                     val duplicate = contactsHelper.getContactWithId(contact.id, contact.isPrivate()) | ||||||
|  |                     if (duplicate != null) { | ||||||
|  |                         if (primaryStatus == PrimaryNumberStatus.UNSTARRED) { | ||||||
|  |                             val number = duplicate.phoneNumbers.find { it.normalizedNumber == toggleState.first!!.normalizedNumber } | ||||||
|  |                             number?.isPrimary = false | ||||||
|  |                         } else if (primaryStatus == PrimaryNumberStatus.STARRED) { | ||||||
|  |                             val number = duplicate.phoneNumbers.find { it.normalizedNumber == toggleState.second!!.normalizedNumber } | ||||||
|  |                             if (number != null) { | ||||||
|  |                                 duplicate.phoneNumbers.forEach { | ||||||
|  |                                     it.isPrimary = false | ||||||
|  |                                 } | ||||||
|  |                                 number.isPrimary = true | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|  |  | ||||||
|  |                         contactsHelper.updateContact(duplicate, PHOTO_UNCHANGED) | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 runOnUiThread { | ||||||
|  |                     callback.invoke() | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private fun getPrimaryNumberStatus(oldPrimary: PhoneNumber?, newPrimary: PhoneNumber?): PrimaryNumberStatus { | ||||||
|  |         return if (oldPrimary != null && newPrimary != null && oldPrimary != newPrimary) { | ||||||
|  |             PrimaryNumberStatus.STARRED | ||||||
|  |         } else if (oldPrimary == null && newPrimary != null) { | ||||||
|  |             PrimaryNumberStatus.STARRED | ||||||
|  |         } else if (oldPrimary != null && newPrimary == null) { | ||||||
|  |             PrimaryNumberStatus.UNSTARRED | ||||||
|  |         } else { | ||||||
|  |             PrimaryNumberStatus.UNCHANGED | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     private fun getPhotoUpdateStatus(oldUri: String, newUri: String): Int { |     private fun getPhotoUpdateStatus(oldUri: String, newUri: String): Int { | ||||||
|         return if (oldUri.isEmpty() && newUri.isNotEmpty()) { |         return if (oldUri.isEmpty() && newUri.isNotEmpty()) { | ||||||
|             PHOTO_ADDED |             PHOTO_ADDED | ||||||
|   | |||||||
| @@ -12,6 +12,7 @@ import android.view.View | |||||||
| import android.view.WindowInsetsController | import android.view.WindowInsetsController | ||||||
| import android.view.WindowManager | import android.view.WindowManager | ||||||
| import android.widget.RelativeLayout | import android.widget.RelativeLayout | ||||||
|  | import androidx.core.view.isVisible | ||||||
| import com.bumptech.glide.Glide | import com.bumptech.glide.Glide | ||||||
| import com.bumptech.glide.load.resource.bitmap.FitCenter | import com.bumptech.glide.load.resource.bitmap.FitCenter | ||||||
| import com.bumptech.glide.load.resource.bitmap.RoundedCorners | import com.bumptech.glide.load.resource.bitmap.RoundedCorners | ||||||
| @@ -45,6 +46,10 @@ class ViewContactActivity : ContactActivity() { | |||||||
|     private var contactSources = ArrayList<ContactSource>() |     private var contactSources = ArrayList<ContactSource>() | ||||||
|     private var showFields = 0 |     private var showFields = 0 | ||||||
|     private var fullContact: Contact? = null    // contact with all fields filled from duplicates |     private var fullContact: Contact? = null    // contact with all fields filled from duplicates | ||||||
|  |     private var duplicateInitialized = false | ||||||
|  |     private val mergeDuplicate: Boolean by lazy { | ||||||
|  |         config.mergeDuplicateContacts | ||||||
|  |     } | ||||||
|  |  | ||||||
|     private val COMPARABLE_PHONE_NUMBER_LENGTH = 9 |     private val COMPARABLE_PHONE_NUMBER_LENGTH = 9 | ||||||
|  |  | ||||||
| @@ -250,16 +255,13 @@ class ViewContactActivity : ContactActivity() { | |||||||
|             contactSources = it |             contactSources = it | ||||||
|             runOnUiThread { |             runOnUiThread { | ||||||
|                 setupContactDetails() |                 setupContactDetails() | ||||||
|                 if (config.mergeDuplicateContacts) { |  | ||||||
|                 getDuplicateContacts { |                 getDuplicateContacts { | ||||||
|                         if (duplicateContacts.isNotEmpty()) { |                     duplicateInitialized = true | ||||||
|                     setupContactDetails() |                     setupContactDetails() | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private fun setupContactDetails() { |     private fun setupContactDetails() { | ||||||
|         if (isFinishing || isDestroyed || contact == null) { |         if (isFinishing || isDestroyed || contact == null) { | ||||||
| @@ -282,6 +284,7 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun launchEditContact(contact: Contact) { |     private fun launchEditContact(contact: Contact) { | ||||||
|         wasEditLaunched = true |         wasEditLaunched = true | ||||||
|  |         duplicateInitialized = false | ||||||
|         editContact(contact) |         editContact(contact) | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -332,9 +335,33 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun setupPhoneNumbers() { |     private fun setupPhoneNumbers() { | ||||||
|         var phoneNumbers = contact!!.phoneNumbers.toMutableSet() as LinkedHashSet<PhoneNumber> |         var phoneNumbers = contact!!.phoneNumbers.toMutableSet() as LinkedHashSet<PhoneNumber> | ||||||
|  |  | ||||||
|  |         if (mergeDuplicate) { | ||||||
|             duplicateContacts.forEach { |             duplicateContacts.forEach { | ||||||
|                 phoneNumbers.addAll(it.phoneNumbers) |                 phoneNumbers.addAll(it.phoneNumbers) | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (duplicateInitialized) { | ||||||
|  |             val contactDefaultsNumbers = contact!!.phoneNumbers.filter { it.isPrimary } | ||||||
|  |             val duplicateContactsDefaultNumbers = duplicateContacts.flatMap { it.phoneNumbers }.filter { it.isPrimary } | ||||||
|  |             val defaultNumbers = (contactDefaultsNumbers + duplicateContactsDefaultNumbers).toSet() | ||||||
|  |  | ||||||
|  |             if (defaultNumbers.size > 1) { | ||||||
|  |                 phoneNumbers.forEach { it.isPrimary = false } | ||||||
|  |             } else if (defaultNumbers.size == 1) { | ||||||
|  |                 if (mergeDuplicate) { | ||||||
|  |                     val defaultNumber = defaultNumbers.first() | ||||||
|  |                     val candidate = phoneNumbers.find { it.normalizedNumber == defaultNumber.normalizedNumber && !it.isPrimary } | ||||||
|  |                     candidate?.isPrimary = true | ||||||
|  |                 } else { | ||||||
|  |                     duplicateContactsDefaultNumbers.forEach { defaultNumber -> | ||||||
|  |                         val candidate = phoneNumbers.find { it.normalizedNumber == defaultNumber.normalizedNumber && !it.isPrimary } | ||||||
|  |                         candidate?.isPrimary = true | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         phoneNumbers = phoneNumbers.distinctBy { |         phoneNumbers = phoneNumbers.distinctBy { | ||||||
|             if (it.normalizedNumber.length >= COMPARABLE_PHONE_NUMBER_LENGTH) { |             if (it.normalizedNumber.length >= COMPARABLE_PHONE_NUMBER_LENGTH) { | ||||||
| @@ -349,9 +376,8 @@ class ViewContactActivity : ContactActivity() { | |||||||
|         contact_numbers_holder.removeAllViews() |         contact_numbers_holder.removeAllViews() | ||||||
|  |  | ||||||
|         if (phoneNumbers.isNotEmpty() && showFields and SHOW_PHONE_NUMBERS_FIELD != 0) { |         if (phoneNumbers.isNotEmpty() && showFields and SHOW_PHONE_NUMBERS_FIELD != 0) { | ||||||
|             phoneNumbers.forEach { |             phoneNumbers.forEach { phoneNumber -> | ||||||
|                 layoutInflater.inflate(R.layout.item_view_phone_number, contact_numbers_holder, false).apply { |                 layoutInflater.inflate(R.layout.item_view_phone_number, contact_numbers_holder, false).apply { | ||||||
|                     val phoneNumber = it |  | ||||||
|                     contact_numbers_holder.addView(this) |                     contact_numbers_holder.addView(this) | ||||||
|                     contact_number.text = phoneNumber.value |                     contact_number.text = phoneNumber.value | ||||||
|                     contact_number_type.text = getPhoneNumberTypeText(phoneNumber.type, phoneNumber.label) |                     contact_number_type.text = getPhoneNumberTypeText(phoneNumber.type, phoneNumber.label) | ||||||
| @@ -366,6 +392,8 @@ class ViewContactActivity : ContactActivity() { | |||||||
|                             startCallIntent(phoneNumber.value) |                             startCallIntent(phoneNumber.value) | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|  |                     contact_number_holder.default_toggle_icon.isVisible = duplicateInitialized && phoneNumber.isPrimary | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             contact_numbers_image.beVisible() |             contact_numbers_image.beVisible() | ||||||
| @@ -410,9 +438,12 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun setupAddresses() { |     private fun setupAddresses() { | ||||||
|         var addresses = contact!!.addresses.toMutableSet() as LinkedHashSet<Address> |         var addresses = contact!!.addresses.toMutableSet() as LinkedHashSet<Address> | ||||||
|  |  | ||||||
|  |         if (mergeDuplicate) { | ||||||
|             duplicateContacts.forEach { |             duplicateContacts.forEach { | ||||||
|                 addresses.addAll(it.addresses) |                 addresses.addAll(it.addresses) | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         addresses = addresses.sortedBy { it.type }.toMutableSet() as LinkedHashSet<Address> |         addresses = addresses.sortedBy { it.type }.toMutableSet() as LinkedHashSet<Address> | ||||||
|         fullContact!!.addresses = addresses.toMutableList() as ArrayList<Address> |         fullContact!!.addresses = addresses.toMutableList() as ArrayList<Address> | ||||||
| @@ -442,9 +473,12 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun setupIMs() { |     private fun setupIMs() { | ||||||
|         var IMs = contact!!.IMs.toMutableSet() as LinkedHashSet<IM> |         var IMs = contact!!.IMs.toMutableSet() as LinkedHashSet<IM> | ||||||
|  |  | ||||||
|  |         if (mergeDuplicate) { | ||||||
|             duplicateContacts.forEach { |             duplicateContacts.forEach { | ||||||
|                 IMs.addAll(it.IMs) |                 IMs.addAll(it.IMs) | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         IMs = IMs.sortedBy { it.type }.toMutableSet() as LinkedHashSet<IM> |         IMs = IMs.sortedBy { it.type }.toMutableSet() as LinkedHashSet<IM> | ||||||
|         fullContact!!.IMs = IMs.toMutableList() as ArrayList<IM> |         fullContact!!.IMs = IMs.toMutableList() as ArrayList<IM> | ||||||
| @@ -470,9 +504,12 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun setupEvents() { |     private fun setupEvents() { | ||||||
|         var events = contact!!.events.toMutableSet() as LinkedHashSet<Event> |         var events = contact!!.events.toMutableSet() as LinkedHashSet<Event> | ||||||
|  |  | ||||||
|  |         if (mergeDuplicate) { | ||||||
|             duplicateContacts.forEach { |             duplicateContacts.forEach { | ||||||
|                 events.addAll(it.events) |                 events.addAll(it.events) | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         events = events.sortedBy { it.type }.toMutableSet() as LinkedHashSet<Event> |         events = events.sortedBy { it.type }.toMutableSet() as LinkedHashSet<Event> | ||||||
|         fullContact!!.events = events.toMutableList() as ArrayList<Event> |         fullContact!!.events = events.toMutableList() as ArrayList<Event> | ||||||
| @@ -497,9 +534,12 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun setupWebsites() { |     private fun setupWebsites() { | ||||||
|         var websites = contact!!.websites.toMutableSet() as LinkedHashSet<String> |         var websites = contact!!.websites.toMutableSet() as LinkedHashSet<String> | ||||||
|  |  | ||||||
|  |         if (mergeDuplicate) { | ||||||
|             duplicateContacts.forEach { |             duplicateContacts.forEach { | ||||||
|                 websites.addAll(it.websites) |                 websites.addAll(it.websites) | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         websites = websites.sorted().toMutableSet() as LinkedHashSet<String> |         websites = websites.sorted().toMutableSet() as LinkedHashSet<String> | ||||||
|         fullContact!!.websites = websites.toMutableList() as ArrayList<String> |         fullContact!!.websites = websites.toMutableList() as ArrayList<String> | ||||||
| @@ -528,9 +568,12 @@ class ViewContactActivity : ContactActivity() { | |||||||
|  |  | ||||||
|     private fun setupGroups() { |     private fun setupGroups() { | ||||||
|         var groups = contact!!.groups.toMutableSet() as LinkedHashSet<Group> |         var groups = contact!!.groups.toMutableSet() as LinkedHashSet<Group> | ||||||
|  |  | ||||||
|  |         if (mergeDuplicate) { | ||||||
|             duplicateContacts.forEach { |             duplicateContacts.forEach { | ||||||
|                 groups.addAll(it.groups) |                 groups.addAll(it.groups) | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         groups = groups.sortedBy { it.title }.toMutableSet() as LinkedHashSet<Group> |         groups = groups.sortedBy { it.title }.toMutableSet() as LinkedHashSet<Group> | ||||||
|         fullContact!!.groups = groups.toMutableList() as ArrayList<Group> |         fullContact!!.groups = groups.toMutableList() as ArrayList<Group> | ||||||
| @@ -558,9 +601,12 @@ class ViewContactActivity : ContactActivity() { | |||||||
|         if (showFields and SHOW_CONTACT_SOURCE_FIELD != 0) { |         if (showFields and SHOW_CONTACT_SOURCE_FIELD != 0) { | ||||||
|             var sources = HashMap<Contact, String>() |             var sources = HashMap<Contact, String>() | ||||||
|             sources[contact!!] = getPublicContactSourceSync(contact!!.source, contactSources) |             sources[contact!!] = getPublicContactSourceSync(contact!!.source, contactSources) | ||||||
|  |  | ||||||
|  |             if (mergeDuplicate) { | ||||||
|                 duplicateContacts.forEach { |                 duplicateContacts.forEach { | ||||||
|                     sources[it] = getPublicContactSourceSync(it.source, contactSources) |                     sources[it] = getPublicContactSourceSync(it.source, contactSources) | ||||||
|                 } |                 } | ||||||
|  |             } | ||||||
|  |  | ||||||
|             if (sources.size > 1) { |             if (sources.size > 1) { | ||||||
|                 sources = sources.toList().sortedBy { (key, value) -> value.toLowerCase() }.toMap() as LinkedHashMap<Contact, String> |                 sources = sources.toList().sortedBy { (key, value) -> value.toLowerCase() }.toMap() as LinkedHashMap<Contact, String> | ||||||
|   | |||||||
| @@ -1,20 +1,29 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|  |     xmlns:app="http://schemas.android.com/apk/res-auto" | ||||||
|     android:id="@+id/contact_number_holder" |     android:id="@+id/contact_number_holder" | ||||||
|     android:layout_width="match_parent" |     android:layout_width="match_parent" | ||||||
|     android:layout_height="wrap_content" |     android:layout_height="46dp" | ||||||
|     android:background="?attr/selectableItemBackground" |     android:background="?attr/selectableItemBackground" | ||||||
|     android:paddingStart="@dimen/small_margin" |     android:paddingStart="@dimen/small_margin" | ||||||
|     android:paddingTop="@dimen/normal_margin" |     android:paddingEnd="@dimen/normal_margin"> | ||||||
|     android:paddingEnd="@dimen/normal_margin" |  | ||||||
|     android:paddingBottom="@dimen/normal_margin"> |     <ImageView | ||||||
|  |         android:id="@+id/default_toggle_icon" | ||||||
|  |         android:layout_width="@dimen/contact_icons_size" | ||||||
|  |         android:layout_height="match_parent" | ||||||
|  |         android:layout_centerVertical="true" | ||||||
|  |         android:layout_toStartOf="@+id/contact_number_type" | ||||||
|  |         android:padding="@dimen/tiny_margin" | ||||||
|  |         android:visibility="gone" | ||||||
|  |         app:srcCompat="@drawable/ic_star_vector" /> | ||||||
|  |  | ||||||
|     <com.simplemobiletools.commons.views.MyTextView |     <com.simplemobiletools.commons.views.MyTextView | ||||||
|         android:id="@+id/contact_number" |         android:id="@+id/contact_number" | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:layout_centerVertical="true" |         android:layout_centerVertical="true" | ||||||
|         android:layout_toStartOf="@+id/contact_number_type" |         android:layout_toStartOf="@+id/default_toggle_icon" | ||||||
|         android:lines="1" |         android:lines="1" | ||||||
|         android:maxLines="1" |         android:maxLines="1" | ||||||
|         android:singleLine="true" |         android:singleLine="true" | ||||||
| @@ -29,6 +38,7 @@ | |||||||
|         android:layout_alignParentEnd="true" |         android:layout_alignParentEnd="true" | ||||||
|         android:layout_centerVertical="true" |         android:layout_centerVertical="true" | ||||||
|         android:gravity="center" |         android:gravity="center" | ||||||
|  |         android:minWidth="70dp" | ||||||
|         android:paddingStart="@dimen/medium_margin" |         android:paddingStart="@dimen/medium_margin" | ||||||
|         android:paddingEnd="@dimen/medium_margin" |         android:paddingEnd="@dimen/medium_margin" | ||||||
|         android:text="@string/mobile" |         android:text="@string/mobile" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user