Merge pull request #23 from SimpleMobileTools/master

upd
This commit is contained in:
solokot 2019-08-15 09:01:13 +03:00 committed by GitHub
commit 88f1a65b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
173 changed files with 3222 additions and 843 deletions

1
.gitignore vendored
View file

@ -2,7 +2,6 @@
*.aab
.gradle
/local.properties
/gradle.properties
/.idea/
.DS_Store
/build

View file

@ -1,6 +1,40 @@
Changelog
==========
Version 6.3.4 *(2019-08-14)*
----------------------------
* Allow enlarging contact photos by clicking on them
* Fixed photo deleting at locally stored contacts
* Improved light theme handling
* Allow searching at the groups tab
* Replaced icons with vectors for better quality and smaller size
* Some other glitches fixed + translation improvements
Version 6.3.3 *(2019-08-03)*
----------------------------
* Allow customizing the bottom navigation bar color
* Some smaller translation and misc improvements
Version 6.3.2 *(2019-06-14)*
----------------------------
* Fixed not all fields being properly exported in .vcf files
* Couple stability and translation improvements
Version 6.3.1 *(2019-03-07)*
----------------------------
* Made contact avatars rounded and a bit bigger
* Added shortcuts for showing the dialpad or creating new contacts
Version 6.3.0 *(2019-01-24)*
----------------------------
* Fixed local contact source not being properly shown
* Fixed some glitches related to exporting contacts
Version 6.2.0 *(2019-01-06)*
----------------------------

View file

@ -7,10 +7,10 @@ You can use it for managing user emails and events too. It has the ability to so
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors.
This app is just one piece of a bigger series of apps. You can find the rest of them at http://www.simplemobiletools.com
This app is just one piece of a bigger series of apps. You can find the rest of them at https://www.simplemobiletools.com
<a href='https://play.google.com/store/apps/details?id=com.simplemobiletools.contacts.pro'><img src='http://simplemobiletools.github.io/assets/public/google-play.png' alt='Get it on Google Play' height='45' /></a>
<a href='https://f-droid.org/packages/com.simplemobiletools.contacts.pro'><img src='http://simplemobiletools.github.io/assets/public/f-droid.png' alt='Get it on F-Droid' height='45' /></a>
<a href='https://play.google.com/store/apps/details?id=com.simplemobiletools.contacts.pro'><img src='https://simplemobiletools.com/assets/images/google-play.png' alt='Get it on Google Play' height='45' /></a>
<a href='https://f-droid.org/packages/com.simplemobiletools.contacts.pro'><img src='https://simplemobiletools.com/assets/images/f-droid.png' alt='Get it on F-Droid' height='45' /></a>
<div style="display:flex;">
<img alt="App image" src="fastlane/metadata/android/en-US/images/phoneScreenshots/app.png" width="30%">

View file

@ -15,8 +15,8 @@ android {
applicationId "com.simplemobiletools.contacts.pro"
minSdkVersion 21
targetSdkVersion 28
versionCode 40
versionName "6.2.0"
versionCode 45
versionName "6.3.4"
setProperty("archivesBaseName", "contacts")
}
@ -51,12 +51,12 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.6.5'
implementation 'com.simplemobiletools:commons:5.16.7'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
kapt "androidx.room:room-compiler:2.0.0"
implementation "androidx.room:room-runtime:2.0.0"
annotationProcessor "androidx.room:room-compiler:2.0.0"
kapt "androidx.room:room-compiler:2.1.0"
implementation "androidx.room:room-runtime:2.1.0"
annotationProcessor "androidx.room:room-compiler:2.1.0"
}

View file

@ -31,7 +31,8 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_launcher_name"
android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name=".activities.SplashActivity"

View file

@ -1,6 +1,7 @@
package com.simplemobiletools.contacts.pro.activities
import android.graphics.Bitmap
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import android.provider.ContactsContract
import android.widget.ImageView
@ -14,7 +15,8 @@ import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.Target
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.getColoredBitmap
import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
import com.simplemobiletools.commons.extensions.getContrastColor
import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.contacts.pro.R
@ -31,10 +33,14 @@ abstract class ContactActivity : SimpleActivity() {
protected var currentContactPhotoPath = ""
fun showPhotoPlaceholder(photoView: ImageView) {
val placeholder = resources.getColoredBitmap(R.drawable.ic_person, config.primaryColor.getContrastColor())
val background = resources.getDrawable(R.drawable.contact_circular_background)
background.applyColorFilter(config.primaryColor)
photoView.background = background
val placeholder = resources.getColoredDrawableWithColor(R.drawable.ic_person_vector, config.primaryColor.getContrastColor())
val padding = resources.getDimension(R.dimen.activity_margin).toInt()
photoView.setPadding(padding, padding, padding, padding)
photoView.setImageBitmap(placeholder)
photoView.setImageDrawable(placeholder)
currentContactPhotoPath = ""
contact?.photo = null
}
@ -53,9 +59,11 @@ abstract class ContactActivity : SimpleActivity() {
.load(bitmap ?: path)
.transition(DrawableTransitionOptions.withCrossFade())
.apply(options)
.apply(RequestOptions.circleCropTransform())
.listener(object : RequestListener<Drawable> {
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
photoView.setPadding(0, 0, 0, 0)
photoView.background = ColorDrawable(0)
return false
}

View file

@ -8,6 +8,7 @@ import android.os.Build
import android.os.Bundle
import android.telecom.PhoneAccount
import android.telecom.TelecomManager
import android.view.Menu
import com.simplemobiletools.commons.extensions.showErrorToast
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.contacts.pro.R
@ -37,6 +38,11 @@ class DialerActivity : SimpleActivity() {
}
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
@SuppressLint("MissingPermission")
private fun initOutgoingCall() {
try {

View file

@ -36,6 +36,10 @@ class DialpadActivity : SimpleActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_dialpad)
if (checkAppSideloading()) {
return
}
dialpad_0_holder.setOnClickListener { dialpadPressed("0", it) }
dialpad_1.setOnClickListener { dialpadPressed("1", it) }
dialpad_2.setOnClickListener { dialpadPressed("2", it) }
@ -56,7 +60,7 @@ class DialpadActivity : SimpleActivity() {
ContactsHelper(this).getContacts { gotContacts(it) }
disableKeyboardPopping()
val callIcon = resources.getColoredDrawableWithColor(R.drawable.ic_phone_huge, if (isBlackAndWhiteTheme()) Color.BLACK else Color.WHITE)
val callIcon = resources.getColoredDrawableWithColor(R.drawable.ic_phone_vector, if (isBlackAndWhiteTheme()) Color.BLACK else config.primaryColor.getContrastColor())
dialpad_call_button.setImageDrawable(callIcon)
dialpad_call_button.background.applyColorFilter(getAdjustedPrimaryColor())
@ -74,6 +78,7 @@ class DialpadActivity : SimpleActivity() {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_dialpad, menu)
updateMenuItemColors(menu)
return true
}

View file

@ -6,7 +6,6 @@ import android.content.ClipData
import android.content.ContentValues
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.drawable.ColorDrawable
import android.net.Uri
import android.os.Bundle
import android.provider.ContactsContract.CommonDataKinds
@ -22,6 +21,7 @@ import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CONTACTS
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.dialogs.CustomLabelDialog
@ -60,7 +60,10 @@ class EditContactActivity : ContactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_edit_contact)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross)
if (checkAppSideloading()) {
return
}
val action = intent.action
isThirdPartyIntent = action == Intent.ACTION_EDIT || action == Intent.ACTION_INSERT || action == ADD_NEW_CONTACT_NUMBER
@ -93,6 +96,8 @@ class EditContactActivity : ContactActivity() {
menu.findItem(R.id.share).isVisible = contact?.id != 0
menu.findItem(R.id.open_with).isVisible = contact?.id != 0 && contact?.isPrivate() == false
}
updateMenuItemColors(menu, true)
return true
}
@ -144,7 +149,7 @@ class EditContactActivity : ContactActivity() {
}
if (contactId != 0) {
Thread {
ensureBackgroundThread {
contact = ContactsHelper(this).getContactWithId(contactId, intent.getBooleanExtra(IS_PRIVATE, false))
if (contact == null) {
toast(R.string.unknown_error_occurred)
@ -154,7 +159,7 @@ class EditContactActivity : ContactActivity() {
gotContact()
}
}
}.start()
}
} else {
gotContact()
}
@ -195,7 +200,9 @@ class EditContactActivity : ContactActivity() {
contact_start_call.beVisibleIf(contact!!.phoneNumbers.isNotEmpty())
contact_send_email.beVisibleIf(contact!!.emails.isNotEmpty())
contact_photo.background = ColorDrawable(config.primaryColor)
val background = resources.getDrawable(R.drawable.contact_circular_background)
background.applyColorFilter(config.primaryColor)
contact_photo.background = background
if (contact!!.photoUri.isEmpty() && contact!!.photo == null) {
showPhotoPlaceholder(contact_photo)
@ -378,7 +385,7 @@ class EditContactActivity : ContactActivity() {
private fun setupEditContact() {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
supportActionBar?.title = resources.getString(R.string.edit_contact)
updateActionBarTitle(resources.getString(R.string.edit_contact))
setupNames()
setupPhoneNumbers()
@ -575,7 +582,7 @@ class EditContactActivity : ContactActivity() {
}
private fun setupNewContact() {
supportActionBar?.title = resources.getString(R.string.new_contact)
updateActionBarTitle(resources.getString(R.string.new_contact))
originalContactSource = if (hasContactPermissions()) config.lastUsedContactSource else SMT_PRIVATE
contact = getEmptyContact()
getPublicContactSource(contact!!.source) {
@ -869,7 +876,7 @@ class EditContactActivity : ContactActivity() {
val jobPosition = contact_organization_job_position.value
organization = Organization(company, jobPosition)
Thread {
ensureBackgroundThread {
config.lastUsedContactSource = source
when {
id == 0 -> insertNewContact(false)
@ -879,7 +886,7 @@ class EditContactActivity : ContactActivity() {
updateContact(photoUpdateStatus)
}
}
}.start()
}
}
}
@ -1088,7 +1095,7 @@ class EditContactActivity : ContactActivity() {
private fun isContactStarred() = contact_toggle_favorite.tag == 1
private fun getStarDrawable(on: Boolean) = resources.getDrawable(if (on) R.drawable.ic_star_on_big else R.drawable.ic_star_off_big)
private fun getStarDrawable(on: Boolean) = resources.getDrawable(if (on) R.drawable.ic_star_on_vector else R.drawable.ic_star_off_vector)
private fun trySetPhoto() {
val items = arrayListOf(

View file

@ -7,6 +7,7 @@ import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.underlineText
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.adapters.ContactsAdapter
import com.simplemobiletools.contacts.pro.dialogs.SelectContactsDialog
@ -53,8 +54,9 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
refreshContacts()
}
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_group, menu)
updateMenuItemColors(menu)
return true
}
@ -69,11 +71,11 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
private fun fabClicked() {
SelectContactsDialog(this, allContacts, groupContacts) { addedContacts, removedContacts ->
Thread {
ensureBackgroundThread {
addContactsToGroup(addedContacts, group.id!!)
removeContactsFromGroup(removedContacts, group.id!!)
refreshContacts()
}.start()
}
}
}
@ -123,11 +125,11 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
}
override fun removeFromGroup(contacts: ArrayList<Contact>) {
Thread {
ensureBackgroundThread {
removeContactsFromGroup(contacts, group.id!!)
if (groupContacts.size == contacts.size) {
refreshContacts()
}
}.start()
}
}
}

View file

@ -4,10 +4,8 @@ import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.provider.ContactsContract
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.updateTextColors
import android.view.Menu
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.adapters.ContactsAdapter
@ -24,6 +22,11 @@ class InsertOrEditContactActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_insert_edit_contact)
if (checkAppSideloading()) {
return
}
title = getString(R.string.select_contact)
setupViews()
@ -35,9 +38,14 @@ class InsertOrEditContactActivity : SimpleActivity() {
}
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun setupViews() {
updateTextColors(insert_edit_contact_holder)
new_contact_tmb.setImageDrawable(resources.getColoredDrawableWithColor(R.drawable.ic_new_contact, config.textColor))
new_contact_tmb.setImageDrawable(resources.getColoredDrawableWithColor(R.drawable.ic_new_contact_vector, config.textColor))
new_contact_holder.setOnClickListener {
Intent().apply {
action = Intent.ACTION_INSERT

View file

@ -1,11 +1,16 @@
package com.simplemobiletools.contacts.pro.activities
import android.annotation.SuppressLint
import android.app.SearchManager
import android.content.Context
import android.content.Intent
import android.content.pm.ShortcutInfo
import android.content.pm.ShortcutManager
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import android.graphics.drawable.Icon
import android.graphics.drawable.LayerDrawable
import android.net.Uri
import android.os.Bundle
import android.os.Handler
@ -32,12 +37,12 @@ import com.simplemobiletools.contacts.pro.extensions.getTempFile
import com.simplemobiletools.contacts.pro.fragments.MyViewPagerFragment
import com.simplemobiletools.contacts.pro.helpers.*
import com.simplemobiletools.contacts.pro.interfaces.RefreshContactsListener
import com.simplemobiletools.contacts.pro.models.Contact
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_contacts.*
import kotlinx.android.synthetic.main.fragment_favorites.*
import kotlinx.android.synthetic.main.fragment_groups.*
import java.io.FileOutputStream
import java.util.*
class MainActivity : SimpleActivity(), RefreshContactsListener {
private var isSearchOpen = false
@ -148,7 +153,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
}
}
val dialpadIcon = resources.getColoredDrawableWithColor(R.drawable.ic_dialpad, if (isBlackAndWhiteTheme()) Color.BLACK else Color.WHITE)
val dialpadIcon = resources.getColoredDrawableWithColor(R.drawable.ic_dialpad_vector, if (isBlackAndWhiteTheme()) Color.BLACK else config.primaryColor.getContrastColor())
main_dialpad_button.apply {
setImageDrawable(dialpadIcon)
background.applyColorFilter(getAdjustedPrimaryColor())
@ -156,6 +161,8 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
}
isFirstResume = false
checkShortcuts()
invalidateOptionsMenu()
}
override fun onPause() {
@ -176,11 +183,12 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
val currentFragment = getCurrentFragment()
menu.apply {
findItem(R.id.search).isVisible = currentFragment != groups_fragment
findItem(R.id.sort).isVisible = currentFragment != groups_fragment
findItem(R.id.filter).isVisible = currentFragment != groups_fragment
setupSearch(this)
updateMenuItemColors(this)
}
setupSearch(menu)
return true
}
@ -216,7 +224,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
(searchMenuItem!!.actionView as SearchView).apply {
setSearchableInfo(searchManager.getSearchableInfo(componentName))
isSubmitButtonEnabled = false
queryHint = getString(if (getCurrentFragment() == contacts_fragment) R.string.search_contacts else R.string.search_favorites)
queryHint = getString(getSearchString())
setOnQueryTextListener(object : SearchView.OnQueryTextListener {
override fun onQueryTextSubmit(query: String) = false
@ -244,6 +252,64 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
})
}
private fun getSearchString(): Int {
return when (getCurrentFragment()) {
favorites_fragment -> R.string.search_favorites
groups_fragment -> R.string.search_groups
else -> R.string.search_contacts
}
}
@SuppressLint("NewApi")
private fun checkShortcuts() {
val appIconColor = config.appIconColor
if (isNougatMR1Plus() && config.lastHandledShortcutColor != appIconColor) {
val launchDialpad = getLaunchDialpadShortcut(appIconColor)
val createNewContact = getCreateNewContactShortcut(appIconColor)
val manager = getSystemService(ShortcutManager::class.java)
try {
manager.dynamicShortcuts = Arrays.asList(launchDialpad, createNewContact)
config.lastHandledShortcutColor = appIconColor
} catch (ignored: Exception) {
}
}
}
@SuppressLint("NewApi")
private fun getLaunchDialpadShortcut(appIconColor: Int): ShortcutInfo {
val newEvent = getString(R.string.dialpad)
val drawable = resources.getDrawable(R.drawable.shortcut_dialpad)
(drawable as LayerDrawable).findDrawableByLayerId(R.id.shortcut_dialpad_background).applyColorFilter(appIconColor)
val bmp = drawable.convertToBitmap()
val intent = Intent(this, DialpadActivity::class.java)
intent.action = Intent.ACTION_VIEW
return ShortcutInfo.Builder(this, "launch_dialpad")
.setShortLabel(newEvent)
.setLongLabel(newEvent)
.setIcon(Icon.createWithBitmap(bmp))
.setIntent(intent)
.build()
}
@SuppressLint("NewApi")
private fun getCreateNewContactShortcut(appIconColor: Int): ShortcutInfo {
val newEvent = getString(R.string.create_new_contact)
val drawable = resources.getDrawable(R.drawable.shortcut_plus)
(drawable as LayerDrawable).findDrawableByLayerId(R.id.shortcut_plus_background).applyColorFilter(appIconColor)
val bmp = drawable.convertToBitmap()
val intent = Intent(this, EditContactActivity::class.java)
intent.action = Intent.ACTION_VIEW
return ShortcutInfo.Builder(this, "create_new_contact")
.setShortLabel(newEvent)
.setLongLabel(newEvent)
.setIcon(Icon.createWithBitmap(bmp))
.setIntent(intent)
.build()
}
private fun getCurrentFragment(): MyViewPagerFragment? {
val showTabs = config.showTabs
val fragments = arrayListOf<MyViewPagerFragment>()
@ -351,9 +417,9 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
private fun getTabIcon(position: Int): Drawable {
val drawableId = when (position) {
LOCATION_CONTACTS_TAB -> R.drawable.ic_person
LOCATION_FAVORITES_TAB -> R.drawable.ic_star_on
else -> R.drawable.ic_group
LOCATION_CONTACTS_TAB -> R.drawable.ic_person_vector
LOCATION_FAVORITES_TAB -> R.drawable.ic_star_on_vector
else -> R.drawable.ic_group_vector
}
return resources.getColoredDrawableWithColor(drawableId, config.textColor)
@ -429,23 +495,20 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
private fun exportContacts() {
FilePickerDialog(this, pickFile = false, showFAB = true) {
ExportContactsDialog(this, it) { file, contactSources ->
Thread {
ContactsHelper(this).getContacts { allContacts ->
val contacts = allContacts.filter { contactSources.contains(it.source) }
if (contacts.isEmpty()) {
toast(R.string.no_entries_for_exporting)
} else {
VcfExporter().exportContacts(this, file, contacts as ArrayList<Contact>, true) { result ->
toast(when (result) {
VcfExporter.ExportResult.EXPORT_OK -> R.string.exporting_successful
VcfExporter.ExportResult.EXPORT_PARTIAL -> R.string.exporting_some_entries_failed
else -> R.string.exporting_failed
})
}
ExportContactsDialog(this, it) { file, ignoredContactSources ->
ContactsHelper(this).getContacts(ignoredContactSources) { contacts ->
if (contacts.isEmpty()) {
toast(R.string.no_entries_for_exporting)
} else {
VcfExporter().exportContacts(this, file, contacts, true) { result ->
toast(when (result) {
VcfExporter.ExportResult.EXPORT_OK -> R.string.exporting_successful
VcfExporter.ExportResult.EXPORT_PARTIAL -> R.string.exporting_some_entries_failed
else -> R.string.exporting_failed
})
}
}
}.start()
}
}
}
}
@ -456,7 +519,8 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
val faqItems = arrayListOf(
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons),
FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons)
FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons),
FAQItem(R.string.faq_7_title_commons, R.string.faq_7_text_commons)
)
startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true)
@ -474,13 +538,12 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
viewpager.currentItem = config.lastUsedViewPagerPage
}
ContactsHelper(this).getContacts {
ContactsHelper(this).getContacts { contacts ->
isGettingContacts = false
if (isDestroyed) {
return@getContacts
}
val contacts = it
if (refreshTabsMask and CONTACTS_TAB_MASK != 0) {
contacts_fragment?.refreshContacts(contacts)
}

View file

@ -8,6 +8,7 @@ import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.underlineText
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.adapters.ManageBlockedNumbersAdapter
@ -39,8 +40,9 @@ class ManageBlockedNumbersActivity : SimpleActivity(), RefreshRecyclerViewListen
}
}
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_add_blocked_number, menu)
updateMenuItemColors(menu)
return true
}
@ -58,11 +60,11 @@ class ManageBlockedNumbersActivity : SimpleActivity(), RefreshRecyclerViewListen
private fun updatePlaceholderTexts() {
manage_blocked_numbers_placeholder.text = getString(if (isDefaultDialer()) R.string.not_blocking_anyone else R.string.must_make_default_dialer)
manage_blocked_numbers_placeholder_2.text = getString(if (isDefaultDialer()) R.string.add_a_blocked_number else R.string.set_to_default)
manage_blocked_numbers_placeholder_2.text = getString(if (isDefaultDialer()) R.string.add_a_blocked_number else R.string.set_as_default)
}
private fun updateBlockedNumbers() {
Thread {
ensureBackgroundThread {
val blockedNumbers = getBlockedNumbers()
runOnUiThread {
ManageBlockedNumbersAdapter(this, blockedNumbers, this, manage_blocked_numbers_list) {
@ -74,7 +76,7 @@ class ManageBlockedNumbersActivity : SimpleActivity(), RefreshRecyclerViewListen
manage_blocked_numbers_placeholder.beVisibleIf(blockedNumbers.isEmpty())
manage_blocked_numbers_placeholder_2.beVisibleIf(blockedNumbers.isEmpty())
}
}.start()
}
}
private fun addOrEditBlockedNumber(currentNumber: BlockedNumber? = null) {

View file

@ -26,6 +26,11 @@ class SelectContactActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_select_contact)
if (checkAppSideloading()) {
return
}
setupPlaceholders()
handlePermission(PERMISSION_READ_CONTACTS) {
@ -52,6 +57,7 @@ class SelectContactActivity : SimpleActivity() {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_select_activity, menu)
updateMenuItemColors(menu)
return true
}

View file

@ -4,6 +4,7 @@ import android.annotation.TargetApi
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.view.Menu
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.updateTextColors
@ -44,6 +45,12 @@ class SettingsActivity : SimpleActivity() {
setupShowDialpadLetters()
setupOnContactClick()
updateTextColors(settings_holder)
invalidateOptionsMenu()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private fun setupCustomizeColors() {

View file

@ -1,7 +1,6 @@
package com.simplemobiletools.contacts.pro.activities
import android.content.Intent
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.provider.ContactsContract
import android.view.Menu
@ -9,8 +8,10 @@ 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.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.dialogs.CallConfirmationDialog
import com.simplemobiletools.contacts.pro.extensions.*
@ -32,6 +33,11 @@ class ViewContactActivity : ContactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_view_contact)
if (checkAppSideloading()) {
return
}
showFields = config.showContactFields
}
@ -41,18 +47,18 @@ class ViewContactActivity : ContactActivity() {
if (isViewIntent) {
handlePermission(PERMISSION_READ_CONTACTS) {
if (it) {
Thread {
ensureBackgroundThread {
initContact()
}.start()
}
} else {
toast(R.string.no_contacts_permission)
finish()
}
}
} else {
Thread {
ensureBackgroundThread {
initContact()
}.start()
}
}
}
@ -60,6 +66,7 @@ class ViewContactActivity : ContactActivity() {
menuInflater.inflate(R.menu.menu_view_contact, menu)
menu.apply {
findItem(R.id.open_with).isVisible = contact?.isPrivate() == false
updateMenuItemColors(this)
}
return true
}
@ -133,12 +140,24 @@ class ViewContactActivity : ContactActivity() {
contact_start_call.beVisibleIf(contact!!.phoneNumbers.isNotEmpty())
contact_send_email.beVisibleIf(contact!!.emails.isNotEmpty())
contact_photo.background = ColorDrawable(config.primaryColor)
val background = resources.getDrawable(R.drawable.contact_circular_background)
background.applyColorFilter(config.primaryColor)
contact_photo.background = background
if (contact!!.photoUri.isEmpty() && contact!!.photo == null) {
showPhotoPlaceholder(contact_photo)
} else {
updateContactPhoto(contact!!.photoUri, contact_photo, contact!!.photo)
Glide.with(this).load(contact!!.photo ?: 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
@ -148,6 +167,7 @@ class ViewContactActivity : ContactActivity() {
contact_name_image.applyColorFilter(textColor)
contact_numbers_image.applyColorFilter(textColor)
contact_emails_image.applyColorFilter(textColor)
contact_addresses_image.applyColorFilter(textColor)
contact_events_image.applyColorFilter(textColor)
contact_source_image.applyColorFilter(textColor)
contact_notes_image.applyColorFilter(textColor)
@ -458,7 +478,7 @@ class ViewContactActivity : ContactActivity() {
}
}
private fun getStarDrawable(on: Boolean) = resources.getDrawable(if (on) R.drawable.ic_star_on_big else R.drawable.ic_star_off_big)
private fun getStarDrawable(on: Boolean) = resources.getDrawable(if (on) R.drawable.ic_star_on_vector else R.drawable.ic_star_off_vector)
private fun View.copyOnLongClick(value: String) {
setOnLongClickListener {

View file

@ -20,6 +20,7 @@ import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
import com.simplemobiletools.commons.extensions.highlightTextPart
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.commons.views.FastScroller
import com.simplemobiletools.commons.views.MyRecyclerView
@ -51,6 +52,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
var showPhoneNumbers: Boolean
private var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt()
private var mediumPadding = activity.resources.getDimension(R.dimen.medium_margin).toInt()
private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt()
init {
@ -126,8 +128,8 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
private fun getItemWithKey(key: Int): Contact? = contactItems.firstOrNull { it.id == key }
fun initDrawables() {
contactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_person, textColor)
businessContactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_business, textColor)
contactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_person_vector, textColor)
businessContactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_business_vector, textColor)
}
fun updateItems(newItems: ArrayList<Contact>, highlightText: String = "") {
@ -163,9 +165,9 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
val positions = getSelectedItemPositions()
contactItems.removeAll(contactsToRemove)
Thread {
ensureBackgroundThread {
ContactsHelper(activity).deleteContacts(contactsToRemove)
}.start()
}
if (contactItems.isEmpty()) {
refreshListener?.refreshContacts(ALL_TABS_MASK)
@ -218,17 +220,17 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
RadioGroupDialog(activity, radioItems, 0) {
if (it as Int == NEW_GROUP_ID) {
CreateNewGroupDialog(activity) {
Thread {
ensureBackgroundThread {
activity.addContactsToGroup(selectedContacts, it.id!!.toLong())
refreshListener?.refreshContacts(GROUPS_TAB_MASK)
}.start()
}
finishActMode()
}
} else {
Thread {
ensureBackgroundThread {
activity.addContactsToGroup(selectedContacts, it.toLong())
refreshListener?.refreshContacts(GROUPS_TAB_MASK)
}.start()
}
finishActMode()
}
}
@ -295,7 +297,13 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
.error(placeholderImage)
.centerCrop()
Glide.with(activity).load(contact.photoUri).transition(DrawableTransitionOptions.withCrossFade()).apply(options).into(contact_tmb)
Glide.with(activity)
.load(contact.photoUri)
.transition(DrawableTransitionOptions.withCrossFade())
.apply(options)
.apply(RequestOptions.circleCropTransform())
.into(contact_tmb)
contact_tmb.setPadding(smallPadding, smallPadding, smallPadding, smallPadding)
}
contact.photo != null -> {
val options = RequestOptions()
@ -304,9 +312,18 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
.error(placeholderImage)
.centerCrop()
Glide.with(activity).load(contact.photo).transition(DrawableTransitionOptions.withCrossFade()).apply(options).into(contact_tmb)
Glide.with(activity)
.load(contact.photo)
.transition(DrawableTransitionOptions.withCrossFade())
.apply(options)
.apply(RequestOptions.circleCropTransform())
.into(contact_tmb)
contact_tmb.setPadding(smallPadding, smallPadding, smallPadding, smallPadding)
}
else -> {
contact_tmb.setPadding(mediumPadding, mediumPadding, mediumPadding, mediumPadding)
contact_tmb.setImageDrawable(placeholderImage)
}
else -> contact_tmb.setImageDrawable(placeholderImage)
}
}
}

View file

@ -7,6 +7,9 @@ import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.highlightTextPart
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.views.FastScroller
import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.contacts.pro.R
@ -26,7 +29,9 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
private var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt()
private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt()
private var textToHighlight = ""
var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
var showContactThumbnails = activity.config.showContactThumbnails
init {
@ -75,10 +80,16 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
private fun getItemWithKey(key: Int): Group? = groups.firstOrNull { it.id!!.toInt() == key }
fun updateItems(newItems: ArrayList<Group>) {
groups = newItems
notifyDataSetChanged()
finishActMode()
fun updateItems(newItems: ArrayList<Group>, highlightText: String = "") {
if (newItems.hashCode() != groups.hashCode()) {
groups = newItems
textToHighlight = highlightText
notifyDataSetChanged()
finishActMode()
} else if (textToHighlight != highlightText) {
textToHighlight = highlightText
notifyDataSetChanged()
}
fastScroller?.measureRecyclerView()
}
@ -92,9 +103,9 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
private fun askConfirmDelete() {
ConfirmationDialog(activity) {
Thread {
ensureBackgroundThread {
deleteGroups()
}.start()
}
}
}
@ -127,9 +138,16 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
private fun setupView(view: View, group: Group) {
view.apply {
group_frame?.isSelected = selectedKeys.contains(group.id!!.toInt())
val titleWithCnt = "${group.title} (${group.contactsCount})"
val groupTitle = if (textToHighlight.isEmpty()) {
titleWithCnt
} else {
titleWithCnt.highlightTextPart(textToHighlight, adjustedPrimaryColor)
}
group_name.apply {
setTextColor(textColor)
text = String.format(activity.getString(R.string.groups_placeholder), group.title, group.contactsCount.toString())
text = groupTitle
setPadding(if (showContactThumbnails) smallPadding else bigPadding, smallPadding, smallPadding, 0)
}

View file

@ -29,7 +29,7 @@ class SelectContactsAdapter(val activity: SimpleActivity, val contacts: List<Con
private val selectedPositions = HashSet<Int>()
private val config = activity.config
private val textColor = config.textColor
private val contactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_person, textColor)
private val contactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_person_vector, textColor)
private val showContactThumbnails = config.showContactThumbnails
private val itemLayout = if (config.showPhoneNumbers) R.layout.item_add_favorite_with_number else R.layout.item_add_favorite_without_number

View file

@ -8,10 +8,11 @@ import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.extensions.showKeyboard
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.value
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.extensions.getPrivateContactSource
import com.simplemobiletools.contacts.pro.helpers.ContactsHelper
import com.simplemobiletools.contacts.pro.helpers.SMT_PRIVATE
import com.simplemobiletools.contacts.pro.models.ContactSource
import com.simplemobiletools.contacts.pro.models.Group
import kotlinx.android.synthetic.main.dialog_create_new_group.view.*
@ -36,8 +37,7 @@ class CreateNewGroupDialog(val activity: BaseSimpleActivity, val callback: (newG
val contactSources = ArrayList<ContactSource>()
ContactsHelper(activity).getContactSources {
it.filter { it.type.contains("google", true) }.mapTo(contactSources) { ContactSource(it.name, it.type, it.name) }
val phoneSecret = activity.getString(R.string.phone_storage_hidden)
contactSources.add(ContactSource(phoneSecret, SMT_PRIVATE, phoneSecret))
contactSources.add(activity.getPrivateContactSource())
val items = ArrayList<RadioItem>()
contactSources.forEachIndexed { index, contactSource ->
@ -61,7 +61,7 @@ class CreateNewGroupDialog(val activity: BaseSimpleActivity, val callback: (newG
}
private fun createGroupUnder(name: String, contactSource: ContactSource, dialog: AlertDialog) {
Thread {
ensureBackgroundThread {
val newGroup = ContactsHelper(activity).createNewGroup(name, contactSource.name, contactSource.type)
activity.runOnUiThread {
if (newGroup != null) {
@ -69,6 +69,6 @@ class CreateNewGroupDialog(val activity: BaseSimpleActivity, val callback: (newG
}
dialog.dismiss()
}
}.start()
}
}
}

View file

@ -3,18 +3,18 @@ package com.simplemobiletools.contacts.pro.dialogs
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.activities.SimpleActivity
import com.simplemobiletools.contacts.pro.adapters.FilterContactSourcesAdapter
import com.simplemobiletools.contacts.pro.extensions.getVisibleContactSources
import com.simplemobiletools.contacts.pro.helpers.ContactsHelper
import com.simplemobiletools.contacts.pro.helpers.SMT_PRIVATE
import com.simplemobiletools.contacts.pro.models.ContactSource
import kotlinx.android.synthetic.main.dialog_export_contacts.view.*
import java.io.File
import java.util.*
class ExportContactsDialog(val activity: SimpleActivity, val path: String, private val callback: (file: File, contactSources: HashSet<String>) -> Unit) {
class ExportContactsDialog(val activity: SimpleActivity, val path: String, private val callback: (file: File, ignoredContactSources: HashSet<String>) -> Unit) {
private var contactSources = ArrayList<ContactSource>()
init {
@ -50,13 +50,12 @@ class ExportContactsDialog(val activity: SimpleActivity, val path: String, priva
return@setOnClickListener
}
val selectedSources = (view.export_contacts_list.adapter as FilterContactSourcesAdapter).getSelectedContactSources()
val selectedContactSourceNames = HashSet<String>()
selectedSources.forEach {
selectedContactSourceNames.add(if (it.type == SMT_PRIVATE) SMT_PRIVATE else it.name)
ensureBackgroundThread {
val selectedSources = (view.export_contacts_list.adapter as FilterContactSourcesAdapter).getSelectedContactSources()
val ignoredSources = contactSources.filter { !selectedSources.contains(it) }.map { it.getFullIdentifier() }.toHashSet()
callback(file, ignoredSources)
dismiss()
}
callback(file, selectedContactSourceNames)
dismiss()
}
else -> activity.toast(R.string.invalid_name)
}

View file

@ -4,6 +4,7 @@ import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.activities.SimpleActivity
import com.simplemobiletools.contacts.pro.extensions.config
@ -41,11 +42,11 @@ class ImportContactsDialog(val activity: SimpleActivity, val path: String, priva
activity.setupDialogStuff(view, this, R.string.import_contacts) {
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
activity.toast(R.string.importing)
Thread {
ensureBackgroundThread {
val result = VcfImporter(activity).importContacts(path, targetContactSource)
handleParseResult(result)
dismiss()
}.start()
}
}
}
}

View file

@ -3,6 +3,7 @@ package com.simplemobiletools.contacts.pro.dialogs
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.extensions.groupsDB
import com.simplemobiletools.contacts.pro.helpers.ContactsHelper
@ -35,7 +36,7 @@ class RenameGroupDialog(val activity: BaseSimpleActivity, val group: Group, val
}
group.title = newTitle
Thread {
ensureBackgroundThread {
if (group.isPrivateSecretGroup()) {
activity.groupsDB.insertOrUpdate(group)
} else {
@ -45,7 +46,7 @@ class RenameGroupDialog(val activity: BaseSimpleActivity, val group: Group, val
callback()
dismiss()
}
}.start()
}
}
}
}

View file

@ -3,6 +3,7 @@ package com.simplemobiletools.contacts.pro.dialogs
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.commons.extensions.baseConfig
import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.activities.SimpleActivity
import com.simplemobiletools.contacts.pro.adapters.SelectContactsAdapter
@ -45,13 +46,13 @@ class SelectContactsDialog(val activity: SimpleActivity, initialContacts: ArrayL
}
private fun dialogConfirmed() {
Thread {
ensureBackgroundThread {
val adapter = view?.select_contact_list?.adapter as? SelectContactsAdapter
val selectedContacts = adapter?.getSelectedItemsSet()?.toList() ?: ArrayList()
val newlySelectedContacts = selectedContacts.filter { !initiallySelectedContacts.contains(it) } as ArrayList
val unselectedContacts = initiallySelectedContacts.filter { !selectedContacts.contains(it) } as ArrayList
callback(newlySelectedContacts, unselectedContacts)
}.start()
}
}
}

View file

@ -15,10 +15,7 @@ import android.provider.ContactsContract
import android.telecom.TelecomManager
import androidx.core.content.FileProvider
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CONTACTS
import com.simplemobiletools.commons.helpers.isMarshmallowPlus
import com.simplemobiletools.commons.helpers.isNougatPlus
import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.contacts.pro.BuildConfig
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.activities.EditContactActivity
@ -199,7 +196,7 @@ fun Context.getPublicContactSource(source: String, callback: (String) -> Unit) {
when (source) {
SMT_PRIVATE -> callback(getString(R.string.phone_storage_hidden))
else -> {
Thread {
ensureBackgroundThread {
ContactsHelper(this).getContactSources {
var newSource = source
for (contactSource in it) {
@ -212,7 +209,7 @@ fun Context.getPublicContactSource(source: String, callback: (String) -> Unit) {
callback(newSource)
}
}
}.start()
}
}
}
}
@ -304,13 +301,16 @@ fun Context.getContactPublicUri(contact: Contact): Uri {
}
fun Context.getVisibleContactSources(): ArrayList<String> {
val sources = ContactsHelper(this).getDeviceContactSources()
val phoneSecret = getString(R.string.phone_storage_hidden)
sources.add(ContactSource(phoneSecret, SMT_PRIVATE, phoneSecret))
val sources = getAllContactSources()
val ignoredContactSources = config.ignoredContactSources
val sourceNames = ArrayList(sources).filter { !ignoredContactSources.contains(it.getFullIdentifier()) }
.map { if (it.type == SMT_PRIVATE) SMT_PRIVATE else it.name }.toMutableList() as ArrayList<String>
return sourceNames
return ArrayList(sources).filter { !ignoredContactSources.contains(it.getFullIdentifier()) }
.map { it.name }.toMutableList() as ArrayList<String>
}
fun Context.getAllContactSources(): List<ContactSource> {
val sources = ContactsHelper(this).getDeviceContactSources()
sources.add(getPrivateContactSource())
return sources.toMutableList()
}
@TargetApi(Build.VERSION_CODES.N)
@ -368,3 +368,5 @@ fun Context.deleteBlockedNumber(number: String) {
@TargetApi(Build.VERSION_CODES.M)
fun Context.isDefaultDialer() = isMarshmallowPlus() && telecomManager.defaultDialerPackage == packageName
fun Context.getPrivateContactSource() = ContactSource(SMT_PRIVATE, SMT_PRIVATE, getString(R.string.phone_storage_hidden))

View file

@ -29,6 +29,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
private var lastHashCode = 0
private var contactsIgnoringSearch = ArrayList<Contact>()
private var groupsIgnoringSearch = ArrayList<Group>()
private lateinit var config: Config
var skipHashComparing = false
@ -78,6 +79,10 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
(fragment_list.adapter as? ContactsAdapter)?.apply {
adjustedPrimaryColor = context.getAdjustedPrimaryColor()
}
(fragment_list.adapter as? GroupsAdapter)?.apply {
adjustedPrimaryColor = context.getAdjustedPrimaryColor()
}
}
fun startNameWithSurnameChanged(startNameWithSurname: Boolean) {
@ -130,6 +135,8 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
if (this is ContactsFragment || this is FavoritesFragment) {
contactsIgnoringSearch = (fragment_list?.adapter as? ContactsAdapter)?.contactItems ?: ArrayList()
} else if (this is GroupsFragment) {
groupsIgnoringSearch = (fragment_list?.adapter as? GroupsAdapter)?.groups ?: ArrayList()
}
}
@ -177,7 +184,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
}
private fun setupContactsFavoritesAdapter(contacts: ArrayList<Contact>) {
setupViewVisibility(contacts)
setupViewVisibility(contacts.isNotEmpty())
val currAdapter = fragment_list.adapter
if (currAdapter == null || forceListRedraw) {
forceListRedraw = false
@ -227,9 +234,10 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
}
fun onSearchQueryChanged(text: String) {
val shouldNormalize = text.normalizeString() == text
val convertLetters = config.showDialpadLetters
(fragment_list.adapter as? ContactsAdapter)?.apply {
val adapter = fragment_list.adapter
if (adapter is ContactsAdapter) {
val shouldNormalize = text.normalizeString() == text
val convertLetters = config.showDialpadLetters
val filtered = contactsIgnoringSearch.filter {
getProperText(it.getNameToDisplay(), shouldNormalize).contains(text, true) ||
getProperText(it.nickname, shouldNormalize).contains(text, true) ||
@ -249,11 +257,22 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
}
if (filtered.isEmpty() && this@MyViewPagerFragment is FavoritesFragment) {
fragment_placeholder.text = activity.getString(R.string.no_items_found)
fragment_placeholder.text = activity?.getString(R.string.no_items_found)
}
fragment_placeholder.beVisibleIf(filtered.isEmpty())
updateItems(filtered, text.normalizeString())
(adapter as? ContactsAdapter)?.updateItems(filtered, text.normalizeString())
} else if (adapter is GroupsAdapter) {
val filtered = groupsIgnoringSearch.filter {
it.title.contains(text, true)
} as ArrayList
if (filtered.isEmpty()) {
fragment_placeholder.text = activity?.getString(R.string.no_items_found)
}
fragment_placeholder.beVisibleIf(filtered.isEmpty())
(adapter as? GroupsAdapter)?.updateItems(filtered, text)
}
}
@ -261,11 +280,17 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fun onSearchOpened() {
contactsIgnoringSearch = (fragment_list?.adapter as? ContactsAdapter)?.contactItems ?: ArrayList()
groupsIgnoringSearch = (fragment_list?.adapter as? GroupsAdapter)?.groups ?: ArrayList()
}
fun onSearchClosed() {
(fragment_list.adapter as? ContactsAdapter)?.updateItems(contactsIgnoringSearch)
setupViewVisibility(contactsIgnoringSearch)
if (fragment_list.adapter is ContactsAdapter) {
(fragment_list.adapter as? ContactsAdapter)?.updateItems(contactsIgnoringSearch)
setupViewVisibility(contactsIgnoringSearch.isNotEmpty())
} else if (fragment_list.adapter is GroupsAdapter) {
(fragment_list.adapter as? GroupsAdapter)?.updateItems(groupsIgnoringSearch)
setupViewVisibility(groupsIgnoringSearch.isNotEmpty())
}
if (this is FavoritesFragment) {
fragment_placeholder.text = activity?.getString(R.string.no_favorites)
@ -279,10 +304,10 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fragment_placeholder_2.setTextColor(context.getAdjustedPrimaryColor())
}
private fun setupViewVisibility(contacts: ArrayList<Contact>) {
fragment_placeholder_2.beVisibleIf(contacts.isEmpty())
fragment_placeholder.beVisibleIf(contacts.isEmpty())
fragment_list.beVisibleIf(contacts.isNotEmpty())
private fun setupViewVisibility(hasItemsToShow: Boolean) {
fragment_placeholder_2.beVisibleIf(!hasItemsToShow)
fragment_placeholder.beVisibleIf(!hasItemsToShow)
fragment_list.beVisibleIf(hasItemsToShow)
}
abstract fun fabClicked()

View file

@ -28,11 +28,17 @@ class ContactsHelper(val context: Context) {
private val BATCH_SIZE = 100
private var displayContactSources = ArrayList<String>()
fun getContacts(callback: (ArrayList<Contact>) -> Unit) {
Thread {
fun getContacts(ignoredContactSources: HashSet<String> = HashSet(), callback: (ArrayList<Contact>) -> Unit) {
ensureBackgroundThread {
val contacts = SparseArray<Contact>()
displayContactSources = context.getVisibleContactSources()
getDeviceContacts(contacts)
if (ignoredContactSources.isNotEmpty()) {
displayContactSources = context.getAllContactSources().filter {
it.getFullIdentifier().isNotEmpty() && !ignoredContactSources.contains(it.getFullIdentifier())
}.map { it.getFullIdentifier() }.toMutableList() as ArrayList
}
getDeviceContacts(contacts, ignoredContactSources)
if (displayContactSources.contains(SMT_PRIVATE)) {
LocalContactsHelper(context).getAllContacts().forEach {
@ -46,7 +52,7 @@ class ContactsHelper(val context: Context) {
val resultContacts = ArrayList<Contact>(contactsSize)
(0 until contactsSize).filter {
if (showOnlyContactsWithNumbers) {
if (ignoredContactSources.isEmpty() && showOnlyContactsWithNumbers) {
contacts.valueAt(it).phoneNumbers.isNotEmpty()
} else {
true
@ -55,7 +61,7 @@ class ContactsHelper(val context: Context) {
contacts.valueAt(it)
}
if (context.config.filterDuplicates) {
if (ignoredContactSources.isEmpty() && context.config.filterDuplicates) {
tempContacts = tempContacts.distinctBy {
it.getHashToCompare()
} as ArrayList<Contact>
@ -87,17 +93,24 @@ class ContactsHelper(val context: Context) {
Handler(Looper.getMainLooper()).post {
callback(resultContacts)
}
}.start()
}
}
private fun getContentResolverAccounts(): HashSet<ContactSource> {
val uri = ContactsContract.Data.CONTENT_URI
val sources = HashSet<ContactSource>()
arrayOf(ContactsContract.Groups.CONTENT_URI, ContactsContract.Settings.CONTENT_URI, ContactsContract.RawContacts.CONTENT_URI).forEach {
fillSourcesFromUri(it, sources)
}
return sources
}
private fun fillSourcesFromUri(uri: Uri, sources: HashSet<ContactSource>) {
val projection = arrayOf(
ContactsContract.RawContacts.ACCOUNT_NAME,
ContactsContract.RawContacts.ACCOUNT_TYPE
)
val sources = HashSet<ContactSource>()
var cursor: Cursor? = null
try {
cursor = context.contentResolver.query(uri, projection, null, null, null)
@ -118,16 +131,14 @@ class ContactsHelper(val context: Context) {
} finally {
cursor?.close()
}
return sources
}
private fun getDeviceContacts(contacts: SparseArray<Contact>) {
private fun getDeviceContacts(contacts: SparseArray<Contact>, ignoredContactSources: HashSet<String>?) {
if (!context.hasContactPermissions()) {
return
}
val ignoredSources = context.config.ignoredContactSources
val ignoredSources = ignoredContactSources ?: context.config.ignoredContactSources
val uri = ContactsContract.Data.CONTENT_URI
val projection = getContactProjection()
@ -656,12 +667,12 @@ class ContactsHelper(val context: Context) {
}
fun getStoredGroups(callback: (ArrayList<Group>) -> Unit) {
Thread {
ensureBackgroundThread {
val groups = getStoredGroupsSync()
Handler(Looper.getMainLooper()).post {
callback(groups)
}
}.start()
}
}
fun getStoredGroupsSync(): ArrayList<Group> {
@ -827,15 +838,14 @@ class ContactsHelper(val context: Context) {
}
fun getContactSources(callback: (ArrayList<ContactSource>) -> Unit) {
Thread {
ensureBackgroundThread {
callback(getContactSourcesSync())
}.start()
}
}
private fun getContactSourcesSync(): ArrayList<ContactSource> {
val sources = getDeviceContactSources()
val phoneSecret = context.getString(R.string.phone_storage_hidden)
sources.add(ContactSource(phoneSecret, SMT_PRIVATE, phoneSecret))
sources.add(context.getPrivateContactSource())
return ArrayList(sources)
}
@ -1239,7 +1249,8 @@ class ContactsHelper(val context: Context) {
ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).apply {
withValue(ContactsContract.RawContacts.ACCOUNT_NAME, contact.source)
withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, getContactSourceType(contact.source))
withValue(ContactsContract.RawContacts.DIRTY, 1)
withValue(ContactsContract.RawContacts.DIRTY, 0)
withValue(ContactsContract.RawContacts.DELETED, 0)
operations.add(build())
}
@ -1465,21 +1476,21 @@ class ContactsHelper(val context: Context) {
}
fun addFavorites(contacts: ArrayList<Contact>) {
Thread {
ensureBackgroundThread {
toggleLocalFavorites(contacts, true)
if (context.hasContactPermissions()) {
toggleFavorites(contacts, true)
}
}.start()
}
}
fun removeFavorites(contacts: ArrayList<Contact>) {
Thread {
ensureBackgroundThread {
toggleLocalFavorites(contacts, false)
if (context.hasContactPermissions()) {
toggleFavorites(contacts, false)
}
}.start()
}
}
private fun toggleFavorites(contacts: ArrayList<Contact>, addToFavorites: Boolean) {
@ -1509,13 +1520,13 @@ class ContactsHelper(val context: Context) {
}
fun deleteContact(contact: Contact) {
Thread {
ensureBackgroundThread {
if (contact.isPrivate()) {
context.contactsDB.deleteContactId(contact.id)
} else {
deleteContacts(arrayListOf(contact))
}
}.start()
}
}
fun deleteContacts(contacts: ArrayList<Contact>) {

View file

@ -117,6 +117,12 @@ class LocalContactsHelper(val context: Context) {
}
private fun convertContactToLocalContact(contact: Contact): LocalContact {
val photoByteArray = if (contact.photoUri.isNotEmpty()) {
getPhotoByteArray(contact.photoUri)
} else {
contact.photo?.getByteArray()
}
return getEmptyLocalContact().apply {
id = if (contact.id == 0) null else contact.id
prefix = contact.prefix
@ -125,7 +131,7 @@ class LocalContactsHelper(val context: Context) {
surname = contact.surname
suffix = contact.suffix
nickname = contact.nickname
photo = getPhotoByteArray(contact.photoUri)
photo = photoByteArray
phoneNumbers = contact.phoneNumbers
emails = contact.emails
events = contact.events

View file

@ -30,7 +30,7 @@ class VcfExporter {
private var contactsFailed = 0
fun exportContacts(activity: BaseSimpleActivity, file: File, contacts: ArrayList<Contact>, showExportingToast: Boolean, callback: (result: ExportResult) -> Unit) {
activity.getFileOutputStream(file.toFileDirItem(activity), true) {
activity.getFileOutputStream(file.toFileDirItem(), true) {
try {
if (it == null) {
callback(EXPORT_FAIL)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/color_primary"/>
</shape>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3,5v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2L5,3c-1.11,0 -2,0.9 -2,2zM15,9c0,1.66 -1.34,3 -3,3s-3,-1.34 -3,-3 1.34,-3 3,-3 3,1.34 3,3zM6,17c0,-2 4,-3.1 6,-3.1s6,1.1 6,3.1v1L6,18v-1z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M22,3L7,3c-0.69,0 -1.23,0.35 -1.59,0.88L0,12l5.41,8.11c0.36,0.53 0.9,0.89 1.59,0.89h15c1.1,0 2,-0.9 2,-2L24,5c0,-1.1 -0.9,-2 -2,-2zM19,15.59L17.59,17 14,13.41 10.41,17 9,15.59 12.59,12 9,8.41 10.41,7 14,10.59 17.59,7 19,8.41 15.41,12 19,15.59z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,7L12,3L2,3v18h20L22,7L12,7zM6,19L4,19v-2h2v2zM6,15L4,15v-2h2v2zM6,11L4,11L4,9h2v2zM6,7L4,7L4,5h2v2zM10,19L8,19v-2h2v2zM10,15L8,15v-2h2v2zM10,11L8,11L8,9h2v2zM10,7L8,7L8,5h2v2zM20,19h-8v-2h2v-2h-2v-2h2v-2h-2L12,9h8v10zM18,11h-2v2h2v-2zM18,15h-2v2h2v-2z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,6c1.11,0 2,-0.9 2,-2 0,-0.38 -0.1,-0.73 -0.29,-1.03L12,0l-1.71,2.97c-0.19,0.3 -0.29,0.65 -0.29,1.03 0,1.1 0.9,2 2,2zM16.6,15.99l-1.07,-1.07 -1.08,1.07c-1.3,1.3 -3.58,1.31 -4.89,0l-1.07,-1.07 -1.09,1.07C6.75,16.64 5.88,17 4.96,17c-0.73,0 -1.4,-0.23 -1.96,-0.61L3,21c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1v-4.61c-0.56,0.38 -1.23,0.61 -1.96,0.61 -0.92,0 -1.79,-0.36 -2.44,-1.01zM18,9h-5L13,7h-2v2L6,9c-1.66,0 -3,1.34 -3,3v1.54c0,1.08 0.88,1.96 1.96,1.96 0.52,0 1.02,-0.2 1.38,-0.57l2.14,-2.13 2.13,2.13c0.74,0.74 2.03,0.74 2.77,0l2.14,-2.13 2.13,2.13c0.37,0.37 0.86,0.57 1.38,0.57 1.08,0 1.96,-0.88 1.96,-1.96L20.99,12C21,10.34 19.66,9 18,9z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,19c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,1c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,5c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,1c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M8,10L5,10L5,7L3,7v3L0,10v2h3v3h2v-3h3v-2zM18,11c1.66,0 2.99,-1.34 2.99,-3S19.66,5 18,5c-0.32,0 -0.63,0.05 -0.91,0.14 0.57,0.81 0.9,1.79 0.9,2.86s-0.34,2.04 -0.9,2.86c0.28,0.09 0.59,0.14 0.91,0.14zM13,11c1.66,0 2.99,-1.34 2.99,-3S14.66,5 13,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM19.62,13.16c0.83,0.73 1.38,1.66 1.38,2.84v2h3v-2c0,-1.54 -2.37,-2.49 -4.38,-2.84zM13,13c-2,0 -6,1 -6,3v2h12v-2c0,-2 -4,-3 -6,-3z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M15,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM6,10L6,7L4,7v3L1,10v2h3v3h2v-3h3v-2L6,10zM15,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/shortcut_dialpad_background">
<shape android:shape="oval">
<solid android:color="@color/color_primary"/>
</shape>
</item>
<item
android:bottom="@dimen/medium_margin"
android:drawable="@drawable/ic_dialpad_vector"
android:left="@dimen/medium_margin"
android:right="@dimen/medium_margin"
android:top="@dimen/medium_margin"/>
</layer-list>

View file

@ -27,7 +27,7 @@
android:paddingStart="@dimen/normal_margin"
android:paddingLeft="@dimen/normal_margin"
app:layout_constraintBottom_toBottomOf="@+id/dialpad_list"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/dialpad_list">
<include layout="@layout/fastscroller_handle_vertical"/>
@ -45,7 +45,7 @@
android:id="@+id/dialpad_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:gravity="center"
android:inputType="phone"
android:textCursorDrawable="@null"
@ -58,11 +58,11 @@
android:id="@+id/dialpad_clear_char"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:src="@drawable/ic_clear_char"
android:paddingStart="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:src="@drawable/ic_backspace_vector"
app:layout_constraintBottom_toBottomOf="@+id/dialpad_input"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/dialpad_input"/>
@ -72,7 +72,7 @@
style="@style/DialpadNumberStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:text="1"
app:layout_constraintBottom_toTopOf="@+id/dialpad_4"
app:layout_constraintEnd_toStartOf="@+id/dialpad_2"
@ -130,7 +130,7 @@
style="@style/DialpadNumberStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:text="4"
app:layout_constraintBottom_toTopOf="@+id/dialpad_7"
app:layout_constraintEnd_toStartOf="@+id/dialpad_5"
@ -142,7 +142,7 @@
style="@style/DialpadLetterStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:text="GHI"
app:layout_constraintBottom_toTopOf="@+id/dialpad_7"
app:layout_constraintEnd_toStartOf="@+id/dialpad_5"
@ -200,7 +200,7 @@
style="@style/DialpadNumberStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:text="7"
app:layout_constraintBottom_toTopOf="@+id/dialpad_asterisk"
app:layout_constraintEnd_toStartOf="@+id/dialpad_8"
@ -212,7 +212,7 @@
style="@style/DialpadLetterStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:text="PQRS"
app:layout_constraintBottom_toTopOf="@+id/dialpad_asterisk"
app:layout_constraintEnd_toStartOf="@+id/dialpad_8"
@ -246,7 +246,7 @@
style="@style/DialpadNumberStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:text="9"
app:layout_constraintBottom_toTopOf="@+id/dialpad_hashtag"
app:layout_constraintEnd_toEndOf="parent"
@ -258,7 +258,7 @@
style="@style/DialpadLetterStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:text="WXYZ"
app:layout_constraintBottom_toTopOf="@+id/dialpad_hashtag"
app:layout_constraintEnd_toEndOf="parent"
@ -270,7 +270,7 @@
style="@style/DialpadNumberStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginStart="@dimen/activity_margin"
android:text="*"
app:layout_constraintBottom_toTopOf="@+id/dialpad_call_button"
app:layout_constraintEnd_toStartOf="@+id/dialpad_0_holder"
@ -302,9 +302,9 @@
android:layout_alignTop="@+id/dialpad_0"
android:layout_alignBottom="@+id/dialpad_0"
android:layout_centerHorizontal="true"
android:layout_toRightOf="@+id/dialpad_0"
android:layout_toEndOf="@+id/dialpad_0"
android:gravity="center"
android:paddingLeft="@dimen/small_margin"
android:paddingStart="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"
android:text="+"
android:textSize="@dimen/actionbar_text_size"/>
@ -316,7 +316,7 @@
style="@style/DialpadNumberStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:text="#"
app:layout_constraintBottom_toTopOf="@+id/dialpad_call_button"
app:layout_constraintEnd_toEndOf="parent"
@ -331,7 +331,7 @@
android:background="@drawable/circle_background"
android:elevation="@dimen/medium_margin"
android:padding="@dimen/normal_margin"
android:src="@drawable/ic_phone_huge"
android:src="@drawable/ic_phone_vector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>

View file

@ -11,9 +11,9 @@
android:id="@+id/contact_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/medium_margin">
<ImageView
@ -28,12 +28,12 @@
android:layout_height="@dimen/contact_actions_size"
android:layout_alignTop="@+id/contact_photo"
android:layout_alignBottom="@id/contact_photo"
android:layout_marginLeft="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_photo"
android:layout_marginStart="@dimen/medium_margin"
android:layout_toEndOf="@+id/contact_photo"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_star_off_big"/>
android:src="@drawable/ic_star_off_vector"/>
<LinearLayout
android:id="@+id/contact_actions_holder"
@ -41,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_alignTop="@+id/contact_photo"
android:layout_alignBottom="@id/contact_photo"
android:gravity="center_vertical|right">
android:gravity="center_vertical|end">
<ImageView
android:id="@+id/contact_send_email"
@ -49,34 +49,34 @@
android:layout_height="@dimen/contact_actions_size"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:scaleType="center"
android:src="@drawable/ic_email_big"/>
android:paddingLeft="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_email_vector"/>
<ImageView
android:id="@+id/contact_start_call"
android:layout_width="@dimen/contact_actions_size"
android:layout_height="@dimen/contact_actions_size"
android:layout_marginLeft="@dimen/normal_margin"
android:layout_marginStart="@dimen/normal_margin"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:scaleType="center"
android:src="@drawable/ic_phone_big"/>
android:paddingLeft="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_phone_vector"/>
<ImageView
android:id="@+id/contact_send_sms"
android:layout_width="@dimen/contact_actions_size"
android:layout_height="@dimen/contact_actions_size"
android:layout_marginLeft="@dimen/normal_margin"
android:layout_marginStart="@dimen/normal_margin"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:scaleType="center"
android:src="@drawable/ic_sms_big"/>
android:paddingLeft="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_sms_vector"/>
</LinearLayout>
@ -87,9 +87,8 @@
android:layout_below="@+id/contact_photo"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_person"/>
android:src="@drawable/ic_person_vector"/>
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/contact_prefix"
@ -98,7 +97,7 @@
android:layout_below="@+id/contact_photo"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:hint="@string/prefix"
android:inputType="textCapWords"
android:lines="1"
@ -114,7 +113,7 @@
android:layout_below="@+id/contact_prefix"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:hint="@string/first_name"
android:inputType="textCapWords"
android:lines="1"
@ -130,7 +129,7 @@
android:layout_below="@+id/contact_first_name"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:hint="@string/middle_name"
android:inputType="textCapWords"
android:lines="1"
@ -146,7 +145,7 @@
android:layout_below="@+id/contact_middle_name"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:hint="@string/surname"
android:inputType="textCapWords"
android:lines="1"
@ -162,7 +161,7 @@
android:layout_below="@+id/contact_surname"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:hint="@string/suffix"
android:inputType="textCapWords"
android:lines="1"
@ -178,7 +177,7 @@
android:layout_below="@+id/contact_suffix"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:hint="@string/nickname"
android:inputType="textCapWords"
android:lines="1"
@ -194,9 +193,8 @@
android:layout_alignTop="@+id/contact_numbers_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_phone_big"/>
android:src="@drawable/ic_phone_vector"/>
<LinearLayout
android:id="@+id/contact_numbers_holder"
@ -204,7 +202,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/contact_nickname"
android:layout_marginBottom="@dimen/small_margin"
android:layout_toRightOf="@+id/contact_numbers_image"
android:layout_toEndOf="@+id/contact_numbers_image"
android:orientation="vertical">
<include layout="@layout/item_edit_phone_number"/>
@ -219,11 +217,11 @@
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/medium_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_emails_image"
@ -232,16 +230,15 @@
android:layout_alignTop="@+id/contact_emails_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_email"/>
android:src="@drawable/ic_email_vector"/>
<LinearLayout
android:id="@+id/contact_emails_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/contact_numbers_add_new"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:orientation="vertical">
<include layout="@layout/item_edit_email"/>
@ -256,11 +253,11 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/small_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_addresses_image"
@ -269,9 +266,8 @@
android:layout_alignTop="@+id/contact_addresses_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_place"/>
android:src="@drawable/ic_place_vector"/>
<LinearLayout
android:id="@+id/contact_addresses_holder"
@ -279,7 +275,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/contact_emails_add_new"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:orientation="vertical">
<include layout="@layout/item_edit_address"/>
@ -294,11 +290,11 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/small_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_ims_image"
@ -307,7 +303,6 @@
android:layout_alignTop="@+id/contact_ims_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_im"/>
@ -317,7 +312,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/contact_addresses_add_new"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:orientation="vertical">
<include layout="@layout/item_edit_im"/>
@ -332,11 +327,11 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/small_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_events_image"
@ -345,9 +340,8 @@
android:layout_alignTop="@+id/contact_events_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_cake"/>
android:src="@drawable/ic_cake_vector"/>
<LinearLayout
android:id="@+id/contact_events_holder"
@ -355,7 +349,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/contact_ims_add_new"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:orientation="vertical">
<include layout="@layout/item_event"/>
@ -370,11 +364,11 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/small_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_notes_image"
@ -383,9 +377,8 @@
android:layout_alignTop="@+id/contact_notes"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_label"/>
android:src="@drawable/ic_label_vector"/>
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/contact_notes"
@ -394,7 +387,7 @@
android:layout_below="@+id/contact_events_add_new"
android:layout_centerVertical="true"
android:layout_marginTop="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_notes_image"
android:layout_toEndOf="@+id/contact_notes_image"
android:hint="@string/notes"
android:inputType="textCapSentences|textMultiLine"
android:textCursorDrawable="@null"
@ -407,9 +400,8 @@
android:layout_alignTop="@+id/contact_organization_company"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_business"/>
android:src="@drawable/ic_business_vector"/>
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/contact_organization_company"
@ -418,7 +410,7 @@
android:layout_below="@+id/contact_notes"
android:layout_centerVertical="true"
android:layout_marginTop="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_organization_image"
android:layout_toEndOf="@+id/contact_organization_image"
android:hint="@string/company"
android:inputType="textCapWords"
android:maxLines="1"
@ -433,7 +425,7 @@
android:layout_below="@+id/contact_organization_company"
android:layout_centerVertical="true"
android:layout_marginTop="@dimen/normal_margin"
android:layout_toRightOf="@+id/contact_organization_image"
android:layout_toEndOf="@+id/contact_organization_image"
android:hint="@string/job_position"
android:inputType="textCapWords"
android:maxLines="1"
@ -448,9 +440,8 @@
android:layout_alignTop="@+id/contact_websites_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_link"/>
android:src="@drawable/ic_link_vector"/>
<LinearLayout
android:id="@+id/contact_websites_holder"
@ -458,7 +449,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/contact_organization_job_position"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:orientation="vertical">
<include layout="@layout/item_edit_website"/>
@ -473,11 +464,11 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/small_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_groups_image"
@ -486,9 +477,8 @@
android:layout_alignTop="@+id/contact_groups_holder"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_group"/>
android:src="@drawable/ic_group_vector"/>
<LinearLayout
android:id="@+id/contact_groups_holder"
@ -496,7 +486,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/contact_websites_add_new"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:orientation="vertical">
<include layout="@layout/item_edit_group"/>
@ -511,11 +501,11 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/small_margin"
android:background="@drawable/button_background"
android:paddingLeft="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/medium_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/medium_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
<ImageView
android:id="@+id/contact_source_image"
@ -524,9 +514,8 @@
android:layout_alignTop="@+id/contact_source"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingRight="@dimen/small_margin"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_account_box"/>
android:src="@drawable/ic_account_box_vector"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/contact_source"
@ -535,11 +524,11 @@
android:layout_below="@+id/contact_groups_add_new"
android:layout_centerVertical="true"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:layout_toEndOf="@+id/contact_name_image"
android:background="?attr/selectableItemBackground"
android:lines="1"
android:maxLines="1"
android:paddingLeft="@dimen/small_margin"
android:paddingStart="@dimen/small_margin"
android:paddingTop="@dimen/normal_margin"
android:paddingBottom="@dimen/normal_margin"
android:singleLine="true"

View file

@ -18,8 +18,8 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/activity_margin"
android:gravity="center"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:text="@string/no_group_participants"
android:textSize="@dimen/bigger_text_size"
android:visibility="gone"/>
@ -51,8 +51,7 @@
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:paddingStart="@dimen/normal_margin"
android:paddingLeft="@dimen/normal_margin">
android:paddingStart="@dimen/normal_margin">
<include layout="@layout/fastscroller_handle_vertical"/>
@ -65,6 +64,6 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/activity_margin"
android:src="@drawable/ic_plus"/>
android:src="@drawable/ic_plus_vector"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:paddingRight="@dimen/activity_margin">
android:paddingEnd="@dimen/activity_margin">
<ImageView
android:id="@+id/new_contact_tmb"
@ -20,13 +20,13 @@
android:layout_alignTop="@+id/new_contact_name"
android:layout_alignBottom="@+id/new_contact_name"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_new_contact"/>
android:src="@drawable/ic_new_contact_vector"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/new_contact_name"
android:layout_width="match_parent"
android:layout_height="@dimen/create_new_contact_height"
android:layout_toRightOf="@+id/new_contact_tmb"
android:layout_toEndOf="@+id/new_contact_tmb"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"

View file

@ -32,6 +32,6 @@
android:background="@drawable/circle_background"
android:elevation="@dimen/medium_margin"
android:padding="@dimen/activity_margin"
android:src="@drawable/ic_dialpad"/>
android:src="@drawable/ic_dialpad_vector"/>
</RelativeLayout>

View file

@ -19,9 +19,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingLeft="@dimen/big_margin"
android:paddingStart="@dimen/big_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/big_margin"
android:paddingEnd="@dimen/big_margin"
android:text="@string/not_blocking_anyone"
android:textSize="@dimen/bigger_text_size"
android:visibility="gone"/>

View file

@ -13,8 +13,8 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/activity_margin"
android:gravity="center"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:paddingStart="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:text="@string/no_contacts_found"
android:textSize="@dimen/bigger_text_size"
android:visibility="gone"/>

View file

@ -18,9 +18,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
@ -40,9 +40,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
@ -62,9 +62,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
@ -84,9 +84,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
@ -106,9 +106,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -130,9 +130,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -154,9 +154,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -178,9 +178,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -202,9 +202,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -226,9 +226,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -250,9 +250,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -274,9 +274,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -298,9 +298,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -322,9 +322,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
@ -346,9 +346,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/bigger_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/bigger_margin">
<com.simplemobiletools.commons.views.MyTextView
@ -358,8 +358,8 @@
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/settings_on_contact_click"
android:layout_toLeftOf="@+id/settings_on_contact_click"
android:paddingLeft="@dimen/medium_margin"
android:paddingRight="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:paddingEnd="@dimen/medium_margin"
android:text="@string/on_contact_click"/>
<com.simplemobiletools.commons.views.MyTextView

Some files were not shown because too many files have changed in this diff Show more