commit
649928ebd2
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,6 +1,20 @@
|
|||
Changelog
|
||||
==========
|
||||
|
||||
Version 3.5.3 *(2018-04-18)*
|
||||
----------------------------
|
||||
|
||||
* Allow splitting the Address in multiple lines
|
||||
* Allow batch sending SMS or emails to selected contacts or whole group
|
||||
* Highlight the searched string at the result contacts
|
||||
|
||||
Version 3.5.2 *(2018-04-13)*
|
||||
----------------------------
|
||||
|
||||
* Added an optional website field
|
||||
* Parse more fields from Add Contact third party intents, like the one from WhatsApp
|
||||
* Fix exporting contacts on SD cards
|
||||
|
||||
Version 3.5.1 *(2018-04-10)*
|
||||
----------------------------
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ android {
|
|||
applicationId "com.simplemobiletools.contacts"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 17
|
||||
versionName "3.5.1"
|
||||
versionCode 19
|
||||
versionName "3.5.3"
|
||||
setProperty("archivesBaseName", "contacts")
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.18.23'
|
||||
implementation 'com.simplemobiletools:commons:3.19.21'
|
||||
implementation 'joda-time:joda-time:2.9.9'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.simplemobiletools.contacts.activities
|
|||
|
||||
import android.app.DatePickerDialog
|
||||
import android.content.ClipData
|
||||
import android.content.ContentValues
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.net.Uri
|
||||
|
@ -29,17 +30,13 @@ import kotlinx.android.synthetic.main.item_edit_address.view.*
|
|||
import kotlinx.android.synthetic.main.item_edit_email.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_group.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_phone_number.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_website.view.*
|
||||
import kotlinx.android.synthetic.main.item_event.view.*
|
||||
import org.joda.time.DateTime
|
||||
import org.joda.time.format.DateTimeFormat
|
||||
import java.util.*
|
||||
|
||||
class EditContactActivity : ContactActivity() {
|
||||
private val DEFAULT_EMAIL_TYPE = CommonDataKinds.Email.TYPE_HOME
|
||||
private val DEFAULT_PHONE_NUMBER_TYPE = CommonDataKinds.Phone.TYPE_MOBILE
|
||||
private val DEFAULT_ADDRESS_TYPE = CommonDataKinds.StructuredPostal.TYPE_HOME
|
||||
private val DEFAULT_EVENT_TYPE = CommonDataKinds.Event.TYPE_BIRTHDAY
|
||||
|
||||
private val INTENT_TAKE_PHOTO = 1
|
||||
private val INTENT_CHOOSE_PHOTO = 2
|
||||
private val INTENT_CROP_PHOTO = 3
|
||||
|
@ -148,12 +145,16 @@ class EditContactActivity : ContactActivity() {
|
|||
}
|
||||
|
||||
if (contact!!.id == 0 && intent.extras?.containsKey(KEY_PHONE) == true && (action == Intent.ACTION_INSERT_OR_EDIT || action == Intent.ACTION_INSERT)) {
|
||||
val phoneNumber = intent.extras.get(KEY_PHONE).toString() ?: ""
|
||||
val phoneNumber = intent.extras.get(KEY_PHONE)?.toString() ?: ""
|
||||
contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE))
|
||||
setupPhoneNumbers()
|
||||
|
||||
val contactFullName = intent.extras.get(KEY_NAME)?.toString() ?: ""
|
||||
contact_first_name.setText(contactFullName)
|
||||
contact!!.firstName = intent.extras.get(KEY_NAME)?.toString() ?: ""
|
||||
|
||||
val data = intent.extras.getParcelableArrayList<ContentValues>("data")
|
||||
if (data != null) {
|
||||
parseIntentData(data)
|
||||
}
|
||||
setupEditContact()
|
||||
}
|
||||
|
||||
setupTypePickers()
|
||||
|
@ -179,9 +180,10 @@ class EditContactActivity : ContactActivity() {
|
|||
contact_addresses_image.applyColorFilter(textColor)
|
||||
contact_events_image.applyColorFilter(textColor)
|
||||
contact_notes_image.applyColorFilter(textColor)
|
||||
contact_source_image.applyColorFilter(textColor)
|
||||
contact_groups_image.applyColorFilter(textColor)
|
||||
contact_organization_image.applyColorFilter(textColor)
|
||||
contact_websites_image.applyColorFilter(textColor)
|
||||
contact_groups_image.applyColorFilter(textColor)
|
||||
contact_source_image.applyColorFilter(textColor)
|
||||
|
||||
val adjustedPrimaryColor = getAdjustedPrimaryColor()
|
||||
contact_numbers_add_new.applyColorFilter(adjustedPrimaryColor)
|
||||
|
@ -192,6 +194,8 @@ class EditContactActivity : ContactActivity() {
|
|||
contact_addresses_add_new.background.applyColorFilter(textColor)
|
||||
contact_events_add_new.applyColorFilter(adjustedPrimaryColor)
|
||||
contact_events_add_new.background.applyColorFilter(textColor)
|
||||
contact_websites_add_new.applyColorFilter(adjustedPrimaryColor)
|
||||
contact_websites_add_new.background.applyColorFilter(textColor)
|
||||
contact_groups_add_new.applyColorFilter(adjustedPrimaryColor)
|
||||
contact_groups_add_new.background.applyColorFilter(textColor)
|
||||
|
||||
|
@ -204,6 +208,7 @@ class EditContactActivity : ContactActivity() {
|
|||
contact_emails_add_new.setOnClickListener { addNewEmailField() }
|
||||
contact_addresses_add_new.setOnClickListener { addNewAddressField() }
|
||||
contact_events_add_new.setOnClickListener { addNewEventField() }
|
||||
contact_websites_add_new.setOnClickListener { addNewWebsiteField() }
|
||||
contact_groups_add_new.setOnClickListener { showSelectGroupsDialog() }
|
||||
|
||||
setupFieldVisibility()
|
||||
|
@ -285,6 +290,11 @@ class EditContactActivity : ContactActivity() {
|
|||
contact_events_holder.beVisibleIf(areEventsVisible)
|
||||
contact_events_add_new.beVisibleIf(areEventsVisible)
|
||||
|
||||
val areWebsitesVisible = showFields and SHOW_WEBSITES_FIELD != 0
|
||||
contact_websites_image.beVisibleIf(areWebsitesVisible)
|
||||
contact_websites_holder.beVisibleIf(areWebsitesVisible)
|
||||
contact_websites_add_new.beVisibleIf(areWebsitesVisible)
|
||||
|
||||
val areGroupsVisible = showFields and SHOW_GROUPS_FIELD != 0
|
||||
contact_groups_image.beVisibleIf(areGroupsVisible)
|
||||
contact_groups_holder.beVisibleIf(areGroupsVisible)
|
||||
|
@ -298,21 +308,27 @@ class EditContactActivity : ContactActivity() {
|
|||
private fun setupEditContact() {
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||
supportActionBar?.title = resources.getString(R.string.edit_contact)
|
||||
contact_prefix.setText(contact!!.prefix)
|
||||
contact_first_name.setText(contact!!.firstName)
|
||||
contact_middle_name.setText(contact!!.middleName)
|
||||
contact_surname.setText(contact!!.surname)
|
||||
contact_suffix.setText(contact!!.suffix)
|
||||
|
||||
contact_source.text = getPublicContactSource(contact!!.source)
|
||||
|
||||
setupNames()
|
||||
setupPhoneNumbers()
|
||||
setupEmails()
|
||||
setupAddresses()
|
||||
setupNotes()
|
||||
setupOrganization()
|
||||
setupWebsites()
|
||||
setupEvents()
|
||||
setupGroups()
|
||||
setupContactSource()
|
||||
}
|
||||
|
||||
private fun setupNames() {
|
||||
contact!!.apply {
|
||||
contact_prefix.setText(prefix)
|
||||
contact_first_name.setText(firstName)
|
||||
contact_middle_name.setText(middleName)
|
||||
contact_surname.setText(surname)
|
||||
contact_suffix.setText(suffix)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupPhoneNumbers() {
|
||||
|
@ -379,6 +395,20 @@ class EditContactActivity : ContactActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupWebsites() {
|
||||
if (showFields and SHOW_WEBSITES_FIELD != 0) {
|
||||
contact!!.websites.forEachIndexed { index, website ->
|
||||
var websitesHolder = contact_websites_holder.getChildAt(index)
|
||||
if (websitesHolder == null) {
|
||||
websitesHolder = layoutInflater.inflate(R.layout.item_edit_website, contact_websites_holder, false)
|
||||
contact_websites_holder.addView(websitesHolder)
|
||||
}
|
||||
|
||||
websitesHolder!!.contact_website.setText(website)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupEvents() {
|
||||
if (showFields and SHOW_EVENTS_FIELD != 0) {
|
||||
contact!!.events.forEachIndexed { index, event ->
|
||||
|
@ -462,8 +492,11 @@ class EditContactActivity : ContactActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupContactSource() {
|
||||
contact_source.text = getPublicContactSource(contact!!.source)
|
||||
}
|
||||
|
||||
private fun setupNewContact() {
|
||||
//window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
|
||||
supportActionBar?.title = resources.getString(R.string.new_contact)
|
||||
val contactSource = if (hasContactPermissions()) config.lastUsedContactSource else SMT_PRIVATE
|
||||
val organization = Organization("", "")
|
||||
|
@ -686,6 +719,7 @@ class EditContactActivity : ContactActivity() {
|
|||
source = contact!!.source
|
||||
starred = if (isContactStarred()) 1 else 0
|
||||
notes = contact_notes.value
|
||||
websites = getFilledWebsites()
|
||||
|
||||
val company = contact_organization_company.value
|
||||
val jobPosition = contact_organization_job_position.value
|
||||
|
@ -764,6 +798,19 @@ class EditContactActivity : ContactActivity() {
|
|||
return events
|
||||
}
|
||||
|
||||
private fun getFilledWebsites(): ArrayList<String> {
|
||||
val websites = ArrayList<String>()
|
||||
val websitesCount = contact_websites_holder.childCount
|
||||
for (i in 0 until websitesCount) {
|
||||
val websiteHolder = contact_websites_holder.getChildAt(i)
|
||||
val website = websiteHolder.contact_website.value
|
||||
if (website.isNotEmpty()) {
|
||||
websites.add(website)
|
||||
}
|
||||
}
|
||||
return websites
|
||||
}
|
||||
|
||||
private fun insertNewContact() {
|
||||
isSaving = true
|
||||
toast(R.string.inserting)
|
||||
|
@ -844,6 +891,16 @@ class EditContactActivity : ContactActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun addNewWebsiteField() {
|
||||
val websitesHolder = layoutInflater.inflate(R.layout.item_edit_website, contact_websites_holder, false) as ViewGroup
|
||||
updateTextColors(websitesHolder)
|
||||
contact_websites_holder.addView(websitesHolder)
|
||||
contact_websites_holder.onGlobalLayout {
|
||||
websitesHolder.contact_website.requestFocus()
|
||||
showKeyboard(websitesHolder.contact_website)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -867,6 +924,57 @@ class EditContactActivity : ContactActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun parseIntentData(data: ArrayList<ContentValues>) {
|
||||
data.forEach {
|
||||
when (it.get(CommonDataKinds.StructuredName.MIMETYPE)) {
|
||||
CommonDataKinds.Email.CONTENT_ITEM_TYPE -> parseEmail(it)
|
||||
CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE -> parseAddress(it)
|
||||
CommonDataKinds.Organization.CONTENT_ITEM_TYPE -> parseOrganization(it)
|
||||
CommonDataKinds.Event.CONTENT_ITEM_TYPE -> parseEvent(it)
|
||||
CommonDataKinds.Website.CONTENT_ITEM_TYPE -> parseWebsite(it)
|
||||
CommonDataKinds.Note.CONTENT_ITEM_TYPE -> parseNote(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun parseEmail(contentValues: ContentValues) {
|
||||
val type = contentValues.getAsInteger(CommonDataKinds.Email.DATA2) ?: DEFAULT_EMAIL_TYPE
|
||||
val emailValue = contentValues.getAsString(CommonDataKinds.Email.DATA1) ?: return
|
||||
val email = Email(emailValue, type)
|
||||
contact!!.emails.add(email)
|
||||
}
|
||||
|
||||
private fun parseAddress(contentValues: ContentValues) {
|
||||
val type = contentValues.getAsInteger(CommonDataKinds.StructuredPostal.DATA2) ?: DEFAULT_ADDRESS_TYPE
|
||||
val addressValue = contentValues.getAsString(CommonDataKinds.StructuredPostal.DATA4)
|
||||
?: contentValues.getAsString(CommonDataKinds.StructuredPostal.DATA1) ?: return
|
||||
val address = Address(addressValue, type)
|
||||
contact!!.addresses.add(address)
|
||||
}
|
||||
|
||||
private fun parseOrganization(contentValues: ContentValues) {
|
||||
val company = contentValues.getAsString(CommonDataKinds.Organization.DATA1) ?: ""
|
||||
val jobPosition = contentValues.getAsString(CommonDataKinds.Organization.DATA4) ?: ""
|
||||
contact!!.organization = Organization(company, jobPosition)
|
||||
}
|
||||
|
||||
private fun parseEvent(contentValues: ContentValues) {
|
||||
val type = contentValues.getAsInteger(CommonDataKinds.Event.DATA2) ?: DEFAULT_EVENT_TYPE
|
||||
val eventValue = contentValues.getAsString(CommonDataKinds.Event.DATA1) ?: return
|
||||
val event = Event(eventValue, type)
|
||||
contact!!.events.add(event)
|
||||
}
|
||||
|
||||
private fun parseWebsite(contentValues: ContentValues) {
|
||||
val website = contentValues.getAsString(CommonDataKinds.Website.DATA1) ?: return
|
||||
contact!!.websites.add(website)
|
||||
}
|
||||
|
||||
private fun parseNote(contentValues: ContentValues) {
|
||||
val note = contentValues.getAsString(CommonDataKinds.Note.DATA1) ?: return
|
||||
contact!!.notes = note
|
||||
}
|
||||
|
||||
private fun startTakePhotoIntent() {
|
||||
val uri = getCachePhotoUri()
|
||||
lastPhotoIntentUri = uri
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.simplemobiletools.contacts.activities
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.contacts.R
|
||||
import com.simplemobiletools.contacts.adapters.ContactsAdapter
|
||||
|
@ -46,6 +48,20 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||
refreshContacts()
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_group, menu)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.send_sms_to_group -> sendSMSToGroup()
|
||||
R.id.send_email_to_group -> sendEmailToGroup()
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
private fun fabClicked() {
|
||||
SelectContactsDialog(this, allContacts, groupContacts) { addedContacts, removedContacts ->
|
||||
Thread {
|
||||
|
@ -74,6 +90,14 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||
}
|
||||
}
|
||||
|
||||
private fun sendSMSToGroup() {
|
||||
sendSMSToContacts(groupContacts)
|
||||
}
|
||||
|
||||
private fun sendEmailToGroup() {
|
||||
sendEmailToContacts(groupContacts)
|
||||
}
|
||||
|
||||
private fun updateContacts(contacts: ArrayList<Contact>) {
|
||||
val currAdapter = group_contacts_list.adapter
|
||||
if (currAdapter == null) {
|
||||
|
|
|
@ -374,8 +374,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||
if (contacts.isEmpty()) {
|
||||
toast(R.string.no_entries_for_exporting)
|
||||
} else {
|
||||
toast(R.string.exporting)
|
||||
VcfExporter().exportContacts(this, file, contacts as ArrayList<Contact>) {
|
||||
VcfExporter().exportContacts(this, file, contacts as ArrayList<Contact>, true) {
|
||||
toast(when (it) {
|
||||
VcfExporter.ExportResult.EXPORT_OK -> R.string.exporting_successful
|
||||
VcfExporter.ExportResult.EXPORT_PARTIAL -> R.string.exporting_some_entries_failed
|
||||
|
|
|
@ -157,6 +157,9 @@ class ViewContactActivity : ContactActivity() {
|
|||
setImageDrawable(getStarDrawable(contact!!.starred == 1))
|
||||
tag = contact!!.starred
|
||||
applyColorFilter(config.textColor)
|
||||
setOnClickListener {
|
||||
toast(R.string.must_be_at_edit)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,19 +12,14 @@ import com.bumptech.glide.signature.ObjectKey
|
|||
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
|
||||
import com.simplemobiletools.commons.extensions.isActivityDestroyed
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.commons.views.FastScroller
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
import com.simplemobiletools.contacts.R
|
||||
import com.simplemobiletools.contacts.activities.SimpleActivity
|
||||
import com.simplemobiletools.contacts.dialogs.CreateNewGroupDialog
|
||||
import com.simplemobiletools.contacts.extensions.addContactsToGroup
|
||||
import com.simplemobiletools.contacts.extensions.config
|
||||
import com.simplemobiletools.contacts.extensions.editContact
|
||||
import com.simplemobiletools.contacts.extensions.shareContacts
|
||||
import com.simplemobiletools.contacts.extensions.*
|
||||
import com.simplemobiletools.contacts.helpers.*
|
||||
import com.simplemobiletools.contacts.interfaces.RefreshContactsListener
|
||||
import com.simplemobiletools.contacts.interfaces.RemoveFromGroupListener
|
||||
|
@ -39,6 +34,9 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
|
||||
private lateinit var contactDrawable: Drawable
|
||||
private var config = activity.config
|
||||
private var textToHighlight = ""
|
||||
|
||||
var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||
var startNameWithSurname: Boolean
|
||||
var showContactThumbnails: Boolean
|
||||
var showPhoneNumbers: Boolean
|
||||
|
@ -62,6 +60,8 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
findItem(R.id.cab_remove).isVisible = location == LOCATION_FAVORITES_TAB || location == LOCATION_GROUP_CONTACTS
|
||||
findItem(R.id.cab_add_to_favorites).isVisible = location == LOCATION_CONTACTS_TAB
|
||||
findItem(R.id.cab_add_to_group).isVisible = location == LOCATION_CONTACTS_TAB || location == LOCATION_FAVORITES_TAB
|
||||
findItem(R.id.cab_send_sms_to_contacts).isVisible = location == LOCATION_CONTACTS_TAB || location == LOCATION_FAVORITES_TAB || location == LOCATION_GROUP_CONTACTS
|
||||
findItem(R.id.cab_send_email_to_contacts).isVisible = location == LOCATION_CONTACTS_TAB || location == LOCATION_FAVORITES_TAB || location == LOCATION_GROUP_CONTACTS
|
||||
findItem(R.id.cab_delete).isVisible = location == LOCATION_CONTACTS_TAB || location == LOCATION_GROUP_CONTACTS
|
||||
|
||||
if (location == LOCATION_GROUP_CONTACTS) {
|
||||
|
@ -87,6 +87,8 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
R.id.cab_add_to_favorites -> addToFavorites()
|
||||
R.id.cab_add_to_group -> addToGroup()
|
||||
R.id.cab_share -> shareContacts()
|
||||
R.id.cab_send_sms_to_contacts -> sendSMSToContacts()
|
||||
R.id.cab_send_email_to_contacts -> sendEmailToContacts()
|
||||
R.id.cab_remove -> removeContacts()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
}
|
||||
|
@ -113,11 +115,15 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
contactDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_person, textColor)
|
||||
}
|
||||
|
||||
fun updateItems(newItems: ArrayList<Contact>) {
|
||||
fun updateItems(newItems: ArrayList<Contact>, highlightText: String = "") {
|
||||
if (newItems.hashCode() != contactItems.hashCode()) {
|
||||
contactItems = newItems
|
||||
contactItems = newItems.clone() as ArrayList<Contact>
|
||||
textToHighlight = highlightText
|
||||
notifyDataSetChanged()
|
||||
finishActMode()
|
||||
} else if (textToHighlight != highlightText) {
|
||||
textToHighlight = highlightText
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,21 +180,13 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
}
|
||||
|
||||
private fun addToFavorites() {
|
||||
val newFavorites = ArrayList<Contact>()
|
||||
selectedPositions.forEach {
|
||||
newFavorites.add(contactItems[it])
|
||||
}
|
||||
ContactsHelper(activity).addFavorites(newFavorites)
|
||||
ContactsHelper(activity).addFavorites(getSelectedContacts())
|
||||
refreshListener?.refreshContacts(FAVORITES_TAB_MASK)
|
||||
finishActMode()
|
||||
}
|
||||
|
||||
private fun addToGroup() {
|
||||
val selectedContacts = ArrayList<Contact>()
|
||||
selectedPositions.forEach {
|
||||
selectedContacts.add(contactItems[it])
|
||||
}
|
||||
|
||||
val selectedContacts = getSelectedContacts()
|
||||
val NEW_GROUP_ID = -1
|
||||
val items = ArrayList<RadioItem>()
|
||||
ContactsHelper(activity).getStoredGroups().forEach {
|
||||
|
@ -225,6 +223,22 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
activity.shareContacts(filtered)
|
||||
}
|
||||
|
||||
private fun sendSMSToContacts() {
|
||||
activity.sendSMSToContacts(getSelectedContacts())
|
||||
}
|
||||
|
||||
private fun sendEmailToContacts() {
|
||||
activity.sendEmailToContacts(getSelectedContacts())
|
||||
}
|
||||
|
||||
private fun getSelectedContacts(): ArrayList<Contact> {
|
||||
val contacts = ArrayList<Contact>()
|
||||
selectedPositions.forEach {
|
||||
contacts.add(contactItems[it])
|
||||
}
|
||||
return contacts
|
||||
}
|
||||
|
||||
override fun onViewRecycled(holder: ViewHolder) {
|
||||
super.onViewRecycled(holder)
|
||||
if (!activity.isActivityDestroyed()) {
|
||||
|
@ -234,13 +248,18 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
|
||||
private fun setupView(view: View, contact: Contact) {
|
||||
view.apply {
|
||||
contact_name.text = contact.getFullName()
|
||||
val fullName = contact.getFullName()
|
||||
val nameText = if (textToHighlight.isEmpty()) fullName else fullName.highlightTextPart(textToHighlight, adjustedPrimaryColor)
|
||||
contact_name.text = nameText
|
||||
contact_name.setTextColor(textColor)
|
||||
contact_name.setPadding(if (showContactThumbnails) smallPadding else bigPadding, smallPadding, smallPadding, 0)
|
||||
|
||||
contact_number?.text = contact.phoneNumbers.firstOrNull()?.value ?: ""
|
||||
contact_number?.setTextColor(textColor)
|
||||
contact_number?.setPadding(if (showContactThumbnails) smallPadding else bigPadding, 0, smallPadding, 0)
|
||||
if (contact_number != null) {
|
||||
val numberText = contact.phoneNumbers.firstOrNull()?.value ?: ""
|
||||
contact_number.text = if (textToHighlight.isEmpty()) numberText else numberText.highlightTextPart(textToHighlight, adjustedPrimaryColor)
|
||||
contact_number.setTextColor(textColor)
|
||||
contact_number.setPadding(if (showContactThumbnails) smallPadding else bigPadding, 0, smallPadding, 0)
|
||||
}
|
||||
|
||||
contact_tmb.beVisibleIf(showContactThumbnails)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class SelectGroupsDialog(val activity: SimpleActivity, val selectedGroups: Array
|
|||
private val dialog: AlertDialog?
|
||||
|
||||
init {
|
||||
groups.forEach {
|
||||
groups.sortedBy { it.title }.forEach {
|
||||
addGroupCheckbox(it)
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ fun BaseSimpleActivity.shareContacts(contacts: ArrayList<Contact>) {
|
|||
return
|
||||
}
|
||||
|
||||
VcfExporter().exportContacts(this, file, contacts) {
|
||||
VcfExporter().exportContacts(this, file, contacts, false) {
|
||||
if (it == VcfExporter.ExportResult.EXPORT_OK) {
|
||||
sharePathIntent(file.absolutePath, BuildConfig.APPLICATION_ID)
|
||||
} else {
|
||||
|
@ -99,6 +99,47 @@ fun BaseSimpleActivity.shareContacts(contacts: ArrayList<Contact>) {
|
|||
}
|
||||
}
|
||||
|
||||
fun BaseSimpleActivity.sendSMSToContacts(contacts: ArrayList<Contact>) {
|
||||
val numbers = StringBuilder()
|
||||
contacts.forEach {
|
||||
it.phoneNumbers.forEach {
|
||||
if (it.value.isNotEmpty()) {
|
||||
numbers.append("${it.value};")
|
||||
}
|
||||
}
|
||||
|
||||
val uriString = "smsto:${numbers.toString().trimEnd(';')}"
|
||||
Intent(Intent.ACTION_SENDTO, Uri.parse(uriString)).apply {
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
startActivity(this)
|
||||
} else {
|
||||
toast(R.string.no_app_found)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun BaseSimpleActivity.sendEmailToContacts(contacts: ArrayList<Contact>) {
|
||||
val emails = ArrayList<String>()
|
||||
contacts.forEach {
|
||||
it.emails.forEach {
|
||||
if (it.value.isNotEmpty()) {
|
||||
emails.add(it.value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Intent(Intent.ACTION_SEND_MULTIPLE).apply {
|
||||
type = "message/rfc822"
|
||||
putExtra(Intent.EXTRA_EMAIL, emails.toTypedArray())
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
startActivity(this)
|
||||
} else {
|
||||
toast(R.string.no_app_found)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun BaseSimpleActivity.getTempFile(): File? {
|
||||
val folder = File(cacheDir, "contacts")
|
||||
if (!folder.exists()) {
|
||||
|
|
|
@ -74,6 +74,9 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
fun primaryColorChanged() {
|
||||
fragment_fastscroller.updatePrimaryColor()
|
||||
fragment_fastscroller.updateBubblePrimaryColor()
|
||||
(fragment_list.adapter as? ContactsAdapter)?.apply {
|
||||
adjustedPrimaryColor = context.getAdjustedPrimaryColor()
|
||||
}
|
||||
}
|
||||
|
||||
fun startNameWithSurnameChanged(startNameWithSurname: Boolean) {
|
||||
|
@ -254,7 +257,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
}
|
||||
|
||||
fragment_placeholder.beVisibleIf(filtered.isEmpty())
|
||||
updateItems(filtered)
|
||||
updateItems(filtered, text)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.simplemobiletools.contacts.helpers
|
||||
|
||||
import android.provider.ContactsContract.CommonDataKinds
|
||||
|
||||
// shared prefs
|
||||
const val SHOW_CONTACT_THUMBNAILS = "show_contact_thumbnails"
|
||||
const val SHOW_PHONE_NUMBERS = "show_phone_numbers"
|
||||
|
@ -46,6 +48,7 @@ const val ADR = "ADR"
|
|||
const val NOTE = "NOTE:"
|
||||
const val ORG = "ORG:"
|
||||
const val TITLE = "TITLE:"
|
||||
const val URL = "URL:"
|
||||
const val ENCODING = "ENCODING"
|
||||
const val BASE64 = "BASE64"
|
||||
const val JPEG = "JPEG"
|
||||
|
@ -83,3 +86,10 @@ const val SHOW_ORGANIZATION_FIELD = 1024
|
|||
const val SHOW_GROUPS_FIELD = 2048
|
||||
const val SHOW_CONTACT_SOURCE_FIELD = 4096
|
||||
const val SHOW_WEBSITES_FIELD = 8192
|
||||
|
||||
const val DEFAULT_EMAIL_TYPE = CommonDataKinds.Email.TYPE_HOME
|
||||
const val DEFAULT_PHONE_NUMBER_TYPE = CommonDataKinds.Phone.TYPE_MOBILE
|
||||
const val DEFAULT_ADDRESS_TYPE = CommonDataKinds.StructuredPostal.TYPE_HOME
|
||||
const val DEFAULT_EVENT_TYPE = CommonDataKinds.Event.TYPE_BIRTHDAY
|
||||
const val DEFAULT_ORGANIZATION_TYPE = CommonDataKinds.Organization.TYPE_WORK
|
||||
const val DEFAULT_WEBSITE_TYPE = CommonDataKinds.Website.TYPE_HOMEPAGE
|
||||
|
|
|
@ -839,12 +839,31 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||
val selectionArgs = arrayOf(contact.id.toString(), CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
|
||||
withSelection(selection, selectionArgs)
|
||||
withValue(CommonDataKinds.Organization.COMPANY, contact.organization.company)
|
||||
withValue(CommonDataKinds.Organization.TYPE, CommonDataKinds.Organization.TYPE_WORK)
|
||||
withValue(CommonDataKinds.Organization.TYPE, DEFAULT_ORGANIZATION_TYPE)
|
||||
withValue(CommonDataKinds.Organization.TITLE, contact.organization.jobPosition)
|
||||
withValue(CommonDataKinds.Organization.TYPE, CommonDataKinds.Organization.TYPE_WORK)
|
||||
withValue(CommonDataKinds.Organization.TYPE, DEFAULT_ORGANIZATION_TYPE)
|
||||
operations.add(build())
|
||||
}
|
||||
|
||||
// delete websites
|
||||
ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI).apply {
|
||||
val selection = "${ContactsContract.Data.RAW_CONTACT_ID} = ? AND ${ContactsContract.Data.MIMETYPE} = ? "
|
||||
val selectionArgs = arrayOf(contact.id.toString(), CommonDataKinds.Website.CONTENT_ITEM_TYPE)
|
||||
withSelection(selection, selectionArgs)
|
||||
operations.add(build())
|
||||
}
|
||||
|
||||
// add websites
|
||||
contact.websites.forEach {
|
||||
ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).apply {
|
||||
withValue(ContactsContract.Data.RAW_CONTACT_ID, contact.id)
|
||||
withValue(ContactsContract.Data.MIMETYPE, CommonDataKinds.Website.CONTENT_ITEM_TYPE)
|
||||
withValue(CommonDataKinds.Website.URL, it)
|
||||
withValue(CommonDataKinds.Website.TYPE, DEFAULT_WEBSITE_TYPE)
|
||||
operations.add(build())
|
||||
}
|
||||
}
|
||||
|
||||
// delete groups
|
||||
val relevantGroupIDs = getStoredGroups().map { it.id }
|
||||
if (relevantGroupIDs.isNotEmpty()) {
|
||||
|
@ -1045,12 +1064,23 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||
withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
|
||||
withValue(ContactsContract.Data.MIMETYPE, CommonDataKinds.Organization.CONTENT_ITEM_TYPE)
|
||||
withValue(CommonDataKinds.Organization.COMPANY, contact.organization.company)
|
||||
withValue(CommonDataKinds.Organization.TYPE, CommonDataKinds.Organization.TYPE_WORK)
|
||||
withValue(CommonDataKinds.Organization.TYPE, DEFAULT_ORGANIZATION_TYPE)
|
||||
withValue(CommonDataKinds.Organization.TITLE, contact.organization.jobPosition)
|
||||
withValue(CommonDataKinds.Organization.TYPE, CommonDataKinds.Organization.TYPE_WORK)
|
||||
withValue(CommonDataKinds.Organization.TYPE, DEFAULT_ORGANIZATION_TYPE)
|
||||
operations.add(build())
|
||||
}
|
||||
|
||||
// websites
|
||||
contact.websites.forEach {
|
||||
ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).apply {
|
||||
withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0)
|
||||
withValue(ContactsContract.Data.MIMETYPE, CommonDataKinds.Website.CONTENT_ITEM_TYPE)
|
||||
withValue(CommonDataKinds.Website.URL, it)
|
||||
withValue(CommonDataKinds.Website.TYPE, DEFAULT_WEBSITE_TYPE)
|
||||
operations.add(build())
|
||||
}
|
||||
}
|
||||
|
||||
// groups
|
||||
contact.groups.forEach {
|
||||
ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).apply {
|
||||
|
|
|
@ -38,6 +38,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
private val COL_COMPANY = "company"
|
||||
private val COL_JOB_POSITION = "job_position"
|
||||
private val COL_GROUPS = "groups"
|
||||
private val COL_WEBSITES = "websites"
|
||||
|
||||
private val GROUPS_TABLE_NAME = "groups"
|
||||
private val COL_TITLE = "title"
|
||||
|
@ -47,7 +48,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
private val mDb = writableDatabase
|
||||
|
||||
companion object {
|
||||
private const val DB_VERSION = 4
|
||||
private const val DB_VERSION = 5
|
||||
const val DB_NAME = "contacts.db"
|
||||
var dbInstance: DBHelper? = null
|
||||
var gson = Gson()
|
||||
|
@ -63,7 +64,8 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
override fun onCreate(db: SQLiteDatabase) {
|
||||
db.execSQL("CREATE TABLE $CONTACTS_TABLE_NAME ($COL_ID INTEGER PRIMARY KEY AUTOINCREMENT, $COL_FIRST_NAME TEXT, $COL_MIDDLE_NAME TEXT, " +
|
||||
"$COL_SURNAME TEXT, $COL_PHOTO BLOB, $COL_PHONE_NUMBERS TEXT, $COL_EMAILS TEXT, $COL_EVENTS TEXT, $COL_STARRED INTEGER, " +
|
||||
"$COL_ADDRESSES TEXT, $COL_NOTES TEXT, $COL_GROUPS TEXT, $COL_PREFIX TEXT, $COL_SUFFIX TEXT, $COL_COMPANY TEXT, $COL_JOB_POSITION TEXT)")
|
||||
"$COL_ADDRESSES TEXT, $COL_NOTES TEXT, $COL_GROUPS TEXT, $COL_PREFIX TEXT, $COL_SUFFIX TEXT, $COL_COMPANY TEXT, $COL_JOB_POSITION TEXT," +
|
||||
"$COL_WEBSITES TEXT)")
|
||||
|
||||
// start autoincrement ID from FIRST_CONTACT_ID to avoid conflicts
|
||||
db.execSQL("REPLACE INTO sqlite_sequence (name, seq) VALUES ('$CONTACTS_TABLE_NAME', $FIRST_CONTACT_ID)")
|
||||
|
@ -88,6 +90,10 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
db.execSQL("ALTER TABLE $CONTACTS_TABLE_NAME ADD COLUMN $COL_COMPANY TEXT DEFAULT ''")
|
||||
db.execSQL("ALTER TABLE $CONTACTS_TABLE_NAME ADD COLUMN $COL_JOB_POSITION TEXT DEFAULT ''")
|
||||
}
|
||||
|
||||
if (oldVersion < 5) {
|
||||
db.execSQL("ALTER TABLE $CONTACTS_TABLE_NAME ADD COLUMN $COL_WEBSITES TEXT DEFAULT ''")
|
||||
}
|
||||
}
|
||||
|
||||
private fun createGroupsTable(db: SQLiteDatabase) {
|
||||
|
@ -134,6 +140,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
put(COL_GROUPS, gson.toJson(contact.groups.map { it.id }))
|
||||
put(COL_COMPANY, contact.organization.company)
|
||||
put(COL_JOB_POSITION, contact.organization.jobPosition)
|
||||
put(COL_WEBSITES, gson.toJson(contact.websites))
|
||||
|
||||
if (contact.photoUri.isNotEmpty()) {
|
||||
put(COL_PHOTO, getPhotoByteArray(contact.photoUri))
|
||||
|
@ -242,13 +249,14 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
val storedGroups = ContactsHelper(activity).getStoredGroups()
|
||||
val contacts = ArrayList<Contact>()
|
||||
val projection = arrayOf(COL_ID, COL_PREFIX, COL_FIRST_NAME, COL_MIDDLE_NAME, COL_SURNAME, COL_SUFFIX, COL_PHONE_NUMBERS, COL_EMAILS,
|
||||
COL_EVENTS, COL_STARRED, COL_PHOTO, COL_ADDRESSES, COL_NOTES, COL_GROUPS, COL_COMPANY, COL_JOB_POSITION)
|
||||
COL_EVENTS, COL_STARRED, COL_PHOTO, COL_ADDRESSES, COL_NOTES, COL_GROUPS, COL_COMPANY, COL_JOB_POSITION, COL_WEBSITES)
|
||||
|
||||
val phoneNumbersToken = object : TypeToken<List<PhoneNumber>>() {}.type
|
||||
val emailsToken = object : TypeToken<List<Email>>() {}.type
|
||||
val addressesToken = object : TypeToken<List<Address>>() {}.type
|
||||
val eventsToken = object : TypeToken<List<Event>>() {}.type
|
||||
val groupIdsToken = object : TypeToken<List<Long>>() {}.type
|
||||
val websitesToken = object : TypeToken<List<String>>() {}.type
|
||||
|
||||
val cursor = mDb.query(CONTACTS_TABLE_NAME, projection, selection, selectionArgs, null, null, null)
|
||||
cursor.use {
|
||||
|
@ -295,7 +303,9 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
val jobPosition = cursor.getStringValue(COL_JOB_POSITION)
|
||||
val organization = Organization(company, jobPosition)
|
||||
|
||||
val websites = ArrayList<String>()
|
||||
val websitesJson = cursor.getStringValue(COL_WEBSITES)
|
||||
val websites = if (websitesJson == "[]") ArrayList() else gson.fromJson<ArrayList<String>>(websitesJson, websitesToken)
|
||||
?: ArrayList(1)
|
||||
|
||||
val contact = Contact(id, prefix, firstName, middleName, surname, suffix, "", phoneNumbers, emails, addresses, events,
|
||||
SMT_PRIVATE, starred, id, "", photo, notes, groups, organization, websites)
|
||||
|
|
|
@ -6,11 +6,9 @@ import android.provider.ContactsContract.CommonDataKinds
|
|||
import android.provider.MediaStore
|
||||
import android.util.Base64
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.getFileOutputStream
|
||||
import com.simplemobiletools.commons.extensions.showErrorToast
|
||||
import com.simplemobiletools.commons.extensions.toFileDirItem
|
||||
import com.simplemobiletools.commons.extensions.writeLn
|
||||
import com.simplemobiletools.contacts.helpers.VcfExporter.ExportResult.*
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.contacts.R
|
||||
import com.simplemobiletools.contacts.helpers.VcfExporter.ExportResult.EXPORT_FAIL
|
||||
import com.simplemobiletools.contacts.models.Contact
|
||||
import java.io.BufferedWriter
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
@ -26,14 +24,18 @@ class VcfExporter {
|
|||
private var contactsExported = 0
|
||||
private var contactsFailed = 0
|
||||
|
||||
fun exportContacts(activity: BaseSimpleActivity, file: File, contacts: ArrayList<Contact>, callback: (result: ExportResult) -> Unit) {
|
||||
try {
|
||||
activity.getFileOutputStream(file.toFileDirItem(activity)) {
|
||||
fun exportContacts(activity: BaseSimpleActivity, file: File, contacts: ArrayList<Contact>, showExportingToast: Boolean, callback: (result: ExportResult) -> Unit) {
|
||||
activity.getFileOutputStream(file.toFileDirItem(activity), true) {
|
||||
try {
|
||||
if (it == null) {
|
||||
callback(EXPORT_FAIL)
|
||||
return@getFileOutputStream
|
||||
}
|
||||
|
||||
if (showExportingToast) {
|
||||
activity.toast(R.string.exporting)
|
||||
}
|
||||
|
||||
it.bufferedWriter().use { out ->
|
||||
for (contact in contacts) {
|
||||
out.writeLn(BEGIN_VCARD)
|
||||
|
@ -53,7 +55,7 @@ class VcfExporter {
|
|||
contact.addresses.forEach {
|
||||
val type = getAddressTypeLabel(it.type)
|
||||
val delimiterType = if (type.isEmpty()) "" else ";$type"
|
||||
out.writeLn("$ADR$delimiterType:;;${it.value};;;;")
|
||||
out.writeLn("$ADR$delimiterType:;;${it.value.replace("\n", "\\n")};;;;")
|
||||
}
|
||||
|
||||
contact.events.forEach {
|
||||
|
@ -71,6 +73,10 @@ class VcfExporter {
|
|||
out.writeLn("$TITLE${contact.organization.jobPosition.replace("\n", "\\n")}")
|
||||
}
|
||||
|
||||
contact.websites.forEach {
|
||||
out.writeLn("$URL$it")
|
||||
}
|
||||
|
||||
if (contact.thumbnailUri.isNotEmpty()) {
|
||||
val bitmap = MediaStore.Images.Media.getBitmap(activity.contentResolver, Uri.parse(contact.thumbnailUri))
|
||||
addBitmap(bitmap, out)
|
||||
|
@ -84,16 +90,17 @@ class VcfExporter {
|
|||
contactsExported++
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
activity.showErrorToast(e)
|
||||
}
|
||||
|
||||
callback(when {
|
||||
contactsExported == 0 -> EXPORT_FAIL
|
||||
contactsFailed > 0 -> EXPORT_PARTIAL
|
||||
else -> EXPORT_OK
|
||||
})
|
||||
} catch (e: Exception) {
|
||||
activity.showErrorToast(e)
|
||||
}
|
||||
|
||||
callback(when {
|
||||
contactsExported == 0 -> EXPORT_FAIL
|
||||
contactsFailed > 0 -> ExportResult.EXPORT_PARTIAL
|
||||
else -> ExportResult.EXPORT_OK
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun addBitmap(bitmap: Bitmap, out: BufferedWriter) {
|
||||
|
|
|
@ -91,6 +91,7 @@ class VcfImporter(val activity: SimpleActivity) {
|
|||
line.toUpperCase().startsWith(PHOTO) -> addPhoto(line.substring(PHOTO.length))
|
||||
line.toUpperCase().startsWith(ORG) -> addCompany(line.substring(ORG.length))
|
||||
line.toUpperCase().startsWith(TITLE) -> addJobPosition(line.substring(TITLE.length))
|
||||
line.toUpperCase().startsWith(URL) -> addWebsite(line.substring(URL.length))
|
||||
line.toUpperCase() == END_VCARD -> saveContact(targetContactSource)
|
||||
isGettingPhoto -> currentPhotoString.append(line.trim())
|
||||
}
|
||||
|
@ -186,7 +187,7 @@ class VcfImporter(val activity: SimpleActivity) {
|
|||
val type = getAddressTypeId(rawType.toUpperCase())
|
||||
val addresses = addressParts[1].split(";")
|
||||
if (addresses.size == 7) {
|
||||
curAddresses.add(Address(addresses[2], type))
|
||||
curAddresses.add(Address(addresses[2].replace("\\n", "\n"), type))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,6 +252,10 @@ class VcfImporter(val activity: SimpleActivity) {
|
|||
curJobPosition = jobPosition
|
||||
}
|
||||
|
||||
private fun addWebsite(website: String) {
|
||||
curWebsites.add(website)
|
||||
}
|
||||
|
||||
private fun saveContact(source: String) {
|
||||
val organization = Organization(curCompany, curJobPosition)
|
||||
val contact = Contact(0, curPrefix, curFirstName, curMiddleName, curSurname, curSuffix, curPhotoUri, curPhoneNumbers, curEmails, curAddresses, curEvents,
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_email"/>
|
||||
android:src="@drawable/ic_email_big"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_start_call"
|
||||
|
@ -75,7 +75,7 @@
|
|||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_sms"/>
|
||||
android:src="@drawable/ic_sms_big"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -200,9 +200,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/contact_numbers_holder"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:background="@drawable/button_background"
|
||||
android:paddingBottom="@dimen/medium_margin"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/medium_margin"
|
||||
|
@ -386,6 +386,44 @@
|
|||
android:textCursorDrawable="@null"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_websites_image"
|
||||
android:layout_width="@dimen/contact_icons_size"
|
||||
android:layout_height="@dimen/contact_icons_size"
|
||||
android:layout_alignTop="@+id/contact_websites_holder"
|
||||
android:paddingBottom="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_link"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/contact_websites_holder"
|
||||
android:layout_width="match_parent"
|
||||
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:orientation="vertical">
|
||||
|
||||
<include layout="@layout/item_edit_website"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_websites_add_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/contact_websites_holder"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/small_margin"
|
||||
android:background="@drawable/button_background"
|
||||
android:paddingBottom="@dimen/medium_margin"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_plus"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_groups_image"
|
||||
android:layout_width="@dimen/contact_icons_size"
|
||||
|
@ -401,7 +439,7 @@
|
|||
android:id="@+id/contact_groups_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/contact_organization_job_position"
|
||||
android:layout_below="@+id/contact_websites_add_new"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:layout_toRightOf="@+id/contact_name_image"
|
||||
android:orientation="vertical">
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_email"/>
|
||||
android:src="@drawable/ic_email_big"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_start_call"
|
||||
|
@ -76,7 +76,7 @@
|
|||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_sms"/>
|
||||
android:src="@drawable/ic_sms_big"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -13,10 +13,7 @@
|
|||
android:layout_toLeftOf="@+id/contact_address_type"
|
||||
android:layout_toStartOf="@+id/contact_address_type"
|
||||
android:hint="@string/address"
|
||||
android:inputType="textCapWords"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:inputType="textCapWords|textMultiLine"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/contact_website_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyEditText
|
||||
android:id="@+id/contact_website"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="@string/website"
|
||||
android:inputType="textWebEditText"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -15,9 +15,6 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@+id/contact_address_type"
|
||||
android:layout_toStartOf="@+id/contact_address_type"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
android:icon="@drawable/ic_share"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_send_sms_to_contacts"
|
||||
android:icon="@drawable/ic_sms"
|
||||
android:title="@string/send_sms_to_contacts"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_send_email_to_contacts"
|
||||
android:icon="@drawable/ic_email"
|
||||
android:title="@string/send_email_to_contacts"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_delete"
|
||||
android:icon="@drawable/ic_delete"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/send_sms_to_group"
|
||||
android:icon="@drawable/ic_sms"
|
||||
android:title="@string/send_sms_to_group"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/send_email_to_group"
|
||||
android:icon="@drawable/ic_email"
|
||||
android:title="@string/send_email_to_group"
|
||||
app:showAsAction="ifRoom"/>
|
||||
</menu>
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">Neuer Kontakt</string>
|
||||
<string name="edit_contact">Kontakt bearbeiten</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Favoriten hinzufügen</string>
|
||||
<string name="add_to_favorites">Zu Favoriten hinzufügen</string>
|
||||
<string name="remove_from_favorites">Aus Favoriten entfernen</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Kontakte durchsuchen</string>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">Νέα επαφή</string>
|
||||
<string name="edit_contact">Επεξεργασία επαφής</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Προσθήκη αγαπημένων</string>
|
||||
<string name="add_to_favorites">Προσθήκη στα αγαπημένα</string>
|
||||
<string name="remove_from_favorites">Αφαίρεση από τα αγαπημένα</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Αναζήτηση επαφών</string>
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
<string name="phone_storage_hidden">Stockage du téléphone (non visible par d\'autres applis)</string>
|
||||
<string name="company">Société</string>
|
||||
<string name="job_position">Poste</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="website">Site web</string>
|
||||
<string name="send_sms_to_contacts">Envoyer un SMS aux contacts</string>
|
||||
<string name="send_email_to_contacts">Envoyer un e-mail aux contacts</string>
|
||||
<string name="send_sms_to_group">Envoyer un SMS au groupe</string>
|
||||
<string name="send_email_to_group">Envoyer un e-mail au groupe</string>
|
||||
|
||||
<string name="new_contact">Nouveau contact</string>
|
||||
<string name="edit_contact">Modifier contact</string>
|
||||
|
@ -35,15 +39,15 @@
|
|||
<string name="remove_photo">Supprimer la photo</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="start_name_with_surname">Commencer le nom par le nom de famille</string>
|
||||
<string name="show_phone_numbers">Afficher les numéros de téléphone sur l\'écran principal</string>
|
||||
<string name="start_name_with_surname">Trier les contacts par nom de famille</string>
|
||||
<string name="show_phone_numbers">Afficher les numéros de téléphone</string>
|
||||
<string name="show_contact_thumbnails">Afficher les vignettes des contacts</string>
|
||||
<string name="on_contact_click">Sur appui du contact</string>
|
||||
<string name="call_contact">Appeler le contact</string>
|
||||
<string name="view_contact">Voir les détails du contact</string>
|
||||
<string name="show_favorites_tab">Afficher l\'onglet favoris</string>
|
||||
<string name="show_groups_tab">Afficher l\'onglet groupes</string>
|
||||
<string name="manage_shown_contact_fields">Configurer l\'affichage des champs de contact</string>
|
||||
<string name="manage_shown_contact_fields">Configurer l\'affichage des champs des contacts</string>
|
||||
|
||||
<!-- Emails -->
|
||||
<string name="email">E-mail</string>
|
||||
|
@ -65,10 +69,11 @@
|
|||
<string name="anniversary">Anniversaire</string>
|
||||
|
||||
<!-- Favorites -->
|
||||
<string name="no_favorites">Il semble que vous n\'ayez pas encore ajouté de contact favori.</string>
|
||||
<string name="no_favorites">Vous n\'ayez pas encore ajouté de contact favori.</string>
|
||||
<string name="add_favorites">Ajouter des favoris</string>
|
||||
<string name="add_to_favorites">Ajouter aux favoris</string>
|
||||
<string name="remove_from_favorites">Retirer des favoris</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Rechercher des contacts</string>
|
||||
|
@ -93,7 +98,7 @@
|
|||
<string name="events">Évènements (naissances, anniversaires)</string>
|
||||
<string name="notes">Notes</string>
|
||||
<string name="organization">Organisation</string>
|
||||
<string name="websites">Websites</string>
|
||||
<string name="websites">Sites web</string>
|
||||
<string name="groups">Groupe</string>
|
||||
<string name="contact_source">Source du contact</string>
|
||||
|
||||
|
|
|
@ -6,9 +6,13 @@
|
|||
<string name="updating">Ažuriranje…</string>
|
||||
<string name="phone_storage">Pohrana na telefonu</string>
|
||||
<string name="phone_storage_hidden">Pohrana na telefonu (nije vidljiva drugim aplikacijama))</string>
|
||||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="company">Tvrtka</string>
|
||||
<string name="job_position">Radno mjesto</string>
|
||||
<string name="website">Web stranica</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">Novi kontakt</string>
|
||||
<string name="edit_contact">Uredi kontakt</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Dodaj favorite</string>
|
||||
<string name="add_to_favorites">Dodaj u favorite</string>
|
||||
<string name="remove_from_favorites">Ukloni iz favorita</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Pretraži kontakte</string>
|
||||
|
@ -84,22 +89,22 @@
|
|||
<string name="filename_without_vcf">Naziv datoteke (bez .vcf)</string>
|
||||
|
||||
<!-- Visible fields -->
|
||||
<string name="select_fields_to_show">Select fields to show</string>
|
||||
<string name="prefix">Prefix</string>
|
||||
<string name="suffix">Suffix</string>
|
||||
<string name="phone_numbers">Phone numbers</string>
|
||||
<string name="emails">Emails</string>
|
||||
<string name="addresses">Addresses</string>
|
||||
<string name="events">Events (birthdays, anniversaries)</string>
|
||||
<string name="notes">Notes</string>
|
||||
<string name="organization">Organization</string>
|
||||
<string name="websites">Websites</string>
|
||||
<string name="groups">Groups</string>
|
||||
<string name="contact_source">Contact source</string>
|
||||
<string name="select_fields_to_show">Odaberi polja za prikaz</string>
|
||||
<string name="prefix">Prefiks</string>
|
||||
<string name="suffix">Sufiks</string>
|
||||
<string name="phone_numbers">Brojevi telefona</string>
|
||||
<string name="emails">E-pošte</string>
|
||||
<string name="addresses">Adrese</string>
|
||||
<string name="events">Događaji (rođendani, godišnjice)</string>
|
||||
<string name="notes">Bilješke</string>
|
||||
<string name="organization">Organizacije</string>
|
||||
<string name="websites">Web stranice</string>
|
||||
<string name="groups">Grupe</string>
|
||||
<string name="contact_source">Izvori kontakata</string>
|
||||
|
||||
<!-- FAQ -->
|
||||
<string name="faq_1_title">I want to change what fields are visible at contacts. Can I do it?</string>
|
||||
<string name="faq_1_text">Yes, all you have to do is go in Settings -> Manage shown contact fields. There you can select what fields should be visible. Some of them are even disabled by default, so you might find some new ones there.</string>
|
||||
<string name="faq_1_title">Želim promijeniti polja koja su vidljiva na kontaktima. Mogu li to napraviti?</string>
|
||||
<string name="faq_1_text">Da, sve što morate učiniti je otići u Postavke -> Upravljanje poljima za prikaz. Tamo možete odabrati polja koja bi trebala biti vidljiva. Neka od njih su čak i onemogućena prema zadanim postavkama, tako da možete pronaći neke nove.</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">새로운 연락처</string>
|
||||
<string name="edit_contact">연락처 수정</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">자주쓰는 연락처 등록</string>
|
||||
<string name="add_to_favorites">자주쓰는 연락처에 추가</string>
|
||||
<string name="remove_from_favorites">자주쓰는 연락처에서 제거</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">연락처 검색</string>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">Naujas kontaktas</string>
|
||||
<string name="edit_contact">Redaguoti kontaktą</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Pridėti mėgiamiausiuosius</string>
|
||||
<string name="add_to_favorites">Pridėti į mėgiamiausiuosius</string>
|
||||
<string name="remove_from_favorites">Pašalinti iš mėgiamiausiųjų</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Ieškoti kontaktų</string>
|
||||
|
@ -84,22 +89,22 @@
|
|||
<string name="filename_without_vcf">Bylos vardas (be .vcf)</string>
|
||||
|
||||
<!-- Visible fields -->
|
||||
<string name="select_fields_to_show">Select fields to show</string>
|
||||
<string name="prefix">Prefix</string>
|
||||
<string name="suffix">Suffix</string>
|
||||
<string name="phone_numbers">Phone numbers</string>
|
||||
<string name="emails">Emails</string>
|
||||
<string name="addresses">Addresses</string>
|
||||
<string name="events">Events (birthdays, anniversaries)</string>
|
||||
<string name="notes">Notes</string>
|
||||
<string name="organization">Organization</string>
|
||||
<string name="websites">Websites</string>
|
||||
<string name="groups">Groups</string>
|
||||
<string name="contact_source">Contact source</string>
|
||||
<string name="select_fields_to_show">Pasirinkti rodomus laukelius</string>
|
||||
<string name="prefix">Priešdėlis</string>
|
||||
<string name="suffix">Priesaga</string>
|
||||
<string name="phone_numbers">Telefonų numeriai</string>
|
||||
<string name="emails">Elektroniniaipaštai</string>
|
||||
<string name="addresses">Adresai</string>
|
||||
<string name="events">Įvykiai (gimtadieniai, sukaktys)</string>
|
||||
<string name="notes">Užrašai</string>
|
||||
<string name="organization">Organizacija</string>
|
||||
<string name="websites">Interneto puslapiai</string>
|
||||
<string name="groups">Grupės</string>
|
||||
<string name="contact_source">Kontakto šaltinis</string>
|
||||
|
||||
<!-- FAQ -->
|
||||
<string name="faq_1_title">I want to change what fields are visible at contacts. Can I do it?</string>
|
||||
<string name="faq_1_text">Yes, all you have to do is go in Settings -> Manage shown contact fields. There you can select what fields should be visible. Some of them are even disabled by default, so you might find some new ones there.</string>
|
||||
<string name="faq_1_title">Noriu pakeisti, kokie laukai yra matomi kontaktuose. Ar galiu tai padaryti?</string>
|
||||
<string name="faq_1_text">Taip, viskas, ką jums reikia padaryti, tai eiti į Nustatymai -> Tvarkyti rodomus kontaktų laukus. Čia galite pasirinkti, kurie laukai turėtų būti matomi. Kai kurie iš jų netgi yra išjungiami pagal numatytuosius nustatymus, todėl ten galite rasti naujų.</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
<string name="phone_storage_hidden">Armazenamento do telefone (não visível por outras alicações)</string>
|
||||
<string name="company">Organização</string>
|
||||
<string name="job_position">Cargo</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="website">Site</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">Novo contacto</string>
|
||||
<string name="edit_contact">Editar contacto</string>
|
||||
|
@ -38,7 +42,7 @@
|
|||
<string name="start_name_with_surname">Ordenar por apelido</string>
|
||||
<string name="show_phone_numbers">Mostrar número de telefone no ecrã principal</string>
|
||||
<string name="show_contact_thumbnails">Mostrar miniatura do contacto</string>
|
||||
<string name="on_contact_click">Ao clicar no contacto</string>
|
||||
<string name="on_contact_click">Ao tocar no contacto</string>
|
||||
<string name="call_contact">Ligar</string>
|
||||
<string name="view_contact">Ver detalhes</string>
|
||||
<string name="show_favorites_tab">Mostrar favoritos</string>
|
||||
|
@ -65,10 +69,11 @@
|
|||
<string name="anniversary">Aniversário</string>
|
||||
|
||||
<!-- Favorites -->
|
||||
<string name="no_favorites">Parece que ainda não adicionou contactos como favoritos.</string>
|
||||
<string name="no_favorites">Parece que ainda não adicionou contactos como favoritos</string>
|
||||
<string name="add_favorites">Adicionar favoritos</string>
|
||||
<string name="add_to_favorites">Adicionar aos favoritos</string>
|
||||
<string name="remove_from_favorites">Remover dos favoritos</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Pesquisar contactos</string>
|
||||
|
@ -79,7 +84,7 @@
|
|||
<string name="export_contacts">Exportar contactos</string>
|
||||
<string name="import_contacts_from_vcf">Importar contactos de um ficheiro .vcf</string>
|
||||
<string name="export_contacts_to_vcf">Exportar contactos para um ficheiro .vcf</string>
|
||||
<string name="target_contact_source">Destino da fonte do contacto</string>
|
||||
<string name="target_contact_source">Destino da origem do contacto</string>
|
||||
<string name="include_contact_sources">Incluir fontes dos contactos</string>
|
||||
<string name="filename_without_vcf">Nome do ficheiro (sem .vcf)</string>
|
||||
|
||||
|
@ -93,9 +98,9 @@
|
|||
<string name="events">Eventos (data de nascimento, aniversário)</string>
|
||||
<string name="notes">Notas</string>
|
||||
<string name="organization">Organização</string>
|
||||
<string name="websites">Websites</string>
|
||||
<string name="websites">Site</string>
|
||||
<string name="groups">Grupos</string>
|
||||
<string name="contact_source">Fonte do contacto</string>
|
||||
<string name="contact_source">Origem do contacto</string>
|
||||
|
||||
<!-- FAQ -->
|
||||
<string name="faq_1_title">I want to change what fields are visible at contacts. Can I do it?</string>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Организация</string>
|
||||
<string name="job_position">Должность</string>
|
||||
<string name="website">Сайт</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">Новый контакт</string>
|
||||
<string name="edit_contact">Редактировать контакт</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Добавить избранные</string>
|
||||
<string name="add_to_favorites">Добавить в избранные</string>
|
||||
<string name="remove_from_favorites">Удалить из избранных</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Поиск контактов</string>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Firma</string>
|
||||
<string name="job_position">Pracovná pozícia</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Poslať kontaktom SMS</string>
|
||||
<string name="send_email_to_contacts">Poslať kontaktom email</string>
|
||||
<string name="send_sms_to_group">Poslať skupine SMS</string>
|
||||
<string name="send_email_to_group">Poslať skupine email</string>
|
||||
|
||||
<string name="new_contact">Nový kontakt</string>
|
||||
<string name="edit_contact">Upraviť kontakt</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Pridať obľúbené</string>
|
||||
<string name="add_to_favorites">Pridať medzi obľúbené</string>
|
||||
<string name="remove_from_favorites">Odstrániť z obľúbených</string>
|
||||
<string name="must_be_at_edit">Pre úpravu kontaktu musíte byť v Editore kontaktu</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Hľadať v kontaktoch</string>
|
||||
|
|
|
@ -6,9 +6,13 @@
|
|||
<string name="updating">Uppdaterar…</string>
|
||||
<string name="phone_storage">Telefonens lagringsutrymme</string>
|
||||
<string name="phone_storage_hidden">Telefonens lagringsutrymme (inte synligt för andra appar)</string>
|
||||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="company">Företag</string>
|
||||
<string name="job_position">Befattning</string>
|
||||
<string name="website">Webbplats</string>
|
||||
<string name="send_sms_to_contacts">Skicka sms till kontakter</string>
|
||||
<string name="send_email_to_contacts">Skicka e-post till kontakter</string>
|
||||
<string name="send_sms_to_group">Skicka sms till grupp</string>
|
||||
<string name="send_email_to_group">Skicka e-post till grupp</string>
|
||||
|
||||
<string name="new_contact">Ny kontakt</string>
|
||||
<string name="edit_contact">Redigera kontakt</string>
|
||||
|
@ -43,7 +47,7 @@
|
|||
<string name="view_contact">Visa kontaktuppgifter</string>
|
||||
<string name="show_favorites_tab">Visa fliken Favoriter</string>
|
||||
<string name="show_groups_tab">Visa fliken Grupper</string>
|
||||
<string name="manage_shown_contact_fields">Manage shown contact fields</string>
|
||||
<string name="manage_shown_contact_fields">Hantera visade kontaktfält</string>
|
||||
|
||||
<!-- Emails -->
|
||||
<string name="email">E-post</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Lägg till favoriter</string>
|
||||
<string name="add_to_favorites">Lägg till i favoriter</string>
|
||||
<string name="remove_from_favorites">Ta bort från favoriter</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Sök efter kontakter</string>
|
||||
|
@ -84,18 +89,18 @@
|
|||
<string name="filename_without_vcf">Filnamn (utan .vcf)</string>
|
||||
|
||||
<!-- Visible fields -->
|
||||
<string name="select_fields_to_show">Select fields to show</string>
|
||||
<string name="select_fields_to_show">Välj vilka fält som ska visas</string>
|
||||
<string name="prefix">Prefix</string>
|
||||
<string name="suffix">Suffix</string>
|
||||
<string name="phone_numbers">Phone numbers</string>
|
||||
<string name="emails">Emails</string>
|
||||
<string name="addresses">Addresses</string>
|
||||
<string name="events">Events (birthdays, anniversaries)</string>
|
||||
<string name="notes">Notes</string>
|
||||
<string name="organization">Organization</string>
|
||||
<string name="websites">Websites</string>
|
||||
<string name="groups">Groups</string>
|
||||
<string name="contact_source">Contact source</string>
|
||||
<string name="phone_numbers">Telefonnummer</string>
|
||||
<string name="emails">E-postadresser</string>
|
||||
<string name="addresses">Adresser</string>
|
||||
<string name="events">Händelser (födelsedagar, årsdagar)</string>
|
||||
<string name="notes">Anteckningar</string>
|
||||
<string name="organization">Organisation</string>
|
||||
<string name="websites">Webbplatser</string>
|
||||
<string name="groups">Grupper</string>
|
||||
<string name="contact_source">Kontaktkälla</string>
|
||||
|
||||
<!-- FAQ -->
|
||||
<string name="faq_1_title">I want to change what fields are visible at contacts. Can I do it?</string>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">公司</string>
|
||||
<string name="job_position">職位</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">新聯絡人</string>
|
||||
<string name="edit_contact">編輯聯絡人</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">添加我的最愛</string>
|
||||
<string name="add_to_favorites">加入我的最愛</string>
|
||||
<string name="remove_from_favorites">從我的最愛移除</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">搜尋聯絡人</string>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<string name="company">Company</string>
|
||||
<string name="job_position">Job position</string>
|
||||
<string name="website">Website</string>
|
||||
<string name="send_sms_to_contacts">Send SMS to contacts</string>
|
||||
<string name="send_email_to_contacts">Send email to contacts</string>
|
||||
<string name="send_sms_to_group">Send SMS to group</string>
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
|
||||
<string name="new_contact">New contact</string>
|
||||
<string name="edit_contact">Edit contact</string>
|
||||
|
@ -69,6 +73,7 @@
|
|||
<string name="add_favorites">Add favorites</string>
|
||||
<string name="add_to_favorites">Add to favorites</string>
|
||||
<string name="remove_from_favorites">Remove from favorites</string>
|
||||
<string name="must_be_at_edit">You must be at the Edit screen to modify a contact</string>
|
||||
|
||||
<!-- Search -->
|
||||
<string name="search_contacts">Search contacts</string>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.31'
|
||||
ext.kotlin_version = '1.2.40'
|
||||
|
||||
repositories {
|
||||
google()
|
||||
|
@ -9,7 +9,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in New Issue