moving some things in Commons

This commit is contained in:
tibbi 2020-05-12 12:07:09 +02:00
parent 18d9fde9d0
commit 2c4b1fc4e4
39 changed files with 30 additions and 247 deletions

View File

@ -57,7 +57,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.27.20'
implementation 'com.simplemobiletools:commons:5.27.25'
implementation 'joda-time:joda-time:2.10.1'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'

View File

@ -317,7 +317,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
.load(itemToLoad)
.apply(options)
.apply(RequestOptions.circleCropTransform())
.into(findViewById<ImageView>(R.id.item_contact_image))
.into(findViewById(R.id.item_contact_image))
}
}
}

View File

@ -19,7 +19,7 @@ class SpeedDialAdapter(activity: SimpleActivity, var speedDialValues: ArrayList<
setupDragListener(true)
}
override fun getActionMenuId() = R.menu.cab_speed_dial
override fun getActionMenuId() = R.menu.cab_delete_only
override fun prepareActionMode(menu: Menu) {}

View File

@ -1,10 +0,0 @@
package com.simplemobiletools.contacts.pro.fragments
import android.content.Context
import android.util.AttributeSet
class InsertOrEditContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet) {
override fun fabClicked() {}
override fun placeholderClicked() {}
}

View File

@ -14,13 +14,13 @@ import android.text.TextUtils
import android.util.SparseArray
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.overloads.times
import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.extensions.*
import com.simplemobiletools.contacts.pro.models.*
import com.simplemobiletools.contacts.pro.models.Email
import com.simplemobiletools.contacts.pro.models.Event
import com.simplemobiletools.contacts.pro.models.Organization
import com.simplemobiletools.contacts.pro.overloads.times
import java.util.*
import kotlin.collections.ArrayList
@ -516,7 +516,7 @@ class ContactsHelper(val context: Context) {
return groups
}
private fun getQuestionMarks() = "?,".times(displayContactSources.filter { it.isNotEmpty() }.size).trimEnd(',')
private fun getQuestionMarks() = ("?," * displayContactSources.filter { it.isNotEmpty() }.size).trimEnd(',')
private fun getSourcesSelection(addMimeType: Boolean = false, addContactId: Boolean = false, useRawContactId: Boolean = true): String {
val strings = ArrayList<String>()

View File

@ -1,9 +0,0 @@
package com.simplemobiletools.contacts.pro.overloads
operator fun String.times(x: Int): String {
val stringBuilder = StringBuilder()
for (i in 1..x) {
stringBuilder.append(this)
}
return stringBuilder.toString()
}

View File

@ -33,6 +33,29 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_use_english_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_use_english"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_english_language"
app:switchPadding="@dimen/medium_margin"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_contact_fields_holder"
android:layout_width="match_parent"
@ -149,29 +172,6 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_use_english_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_use_english"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingStart="@dimen/medium_margin"
android:text="@string/use_english_language"
app:switchPadding="@dimen/medium_margin"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_show_contact_thumbnails_holder"
android:layout_width="match_parent"

View File

@ -1,9 +0,0 @@
<?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/cab_delete"
android:icon="@drawable/ic_delete_vector"
android:title="@string/delete"
app:showAsAction="ifRoom" />
</menu>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,13 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Kontakt bude vymazán ze všech zdrojů kontaktů.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d kontakt</item>
<item quantity="few">%d kontakty</item>
<item quantity="other">%d kontaktů</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d skupinu</item>
<item quantity="few">%d skupiny</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Der Kontakt wird von allen Kontaktquellen entfernt.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d Kontakt</item>
<item quantity="other">%d Kontakte</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d Gruppe</item>
<item quantity="other">%d Gruppen</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Η επαφή θα καταργηθεί από όλες τις πηγές επαφών.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d επαφή</item>
<item quantity="other">%d επαφές</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d ομάδα</item>
<item quantity="other">%d ομάδες</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">El contacto será eliminado de todos los orígenes de contactos.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contacto</item>
<item quantity="other">%d contactos</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d groupo</item>
<item quantity="other">%d groupos</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Kontak akan dihapus dari semua sumber kontak.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d kontak</item>
<item quantity="other">%d kontak</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d grup</item>
<item quantity="other">%d grup</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Kontak akan dihapus dari semua sumber kontak.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d kontak</item>
<item quantity="other">%d kontak</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d grup</item>
<item quantity="other">%d grup</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">De contactpersoon zal worden verwijderd uit alle accounts.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacten</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d groep</item>
<item quantity="other">%d groepen</item>
@ -166,9 +160,9 @@
De app is ook te gebruiken voor het beheren van e-mailadressen en gebeurtenissen gekoppeld aan contacten. Sorteren en filteren is mogelijk op basis van verschillende parameters en zowel voor- als achternaam kan als eerste worden getoond.
Favoriete contacten kunnen in een aparte lijst worden getoond. E-mails of sms'jes kunnen naar hele groepen worden gestuurd om tijd te besparen.
Favoriete contacten kunnen in een aparte lijst worden getoond. E-mails of sms\'jes kunnen naar hele groepen worden gestuurd om tijd te besparen.
Er zijn knoppen om direct een contacpersoon te bellen of te sms'en. De zichtbaarheid van de gegevensvelden zijn naar voorkeur aan te passen, zodat ongebruikte velden geen ruimte in beslag nemen. De zoekfunctie zal in alle zichtbare velden speuren naar de opgegeven tekst.
Er zijn knoppen om direct een contacpersoon te bellen of te sms\'en. De zichtbaarheid van de gegevensvelden zijn naar voorkeur aan te passen, zodat ongebruikte velden geen ruimte in beslag nemen. De zoekfunctie zal in alle zichtbare velden speuren naar de opgegeven tekst.
De app bevat ook een lichtgewicht telefoonkiezer met snelle contactsuggesties tijdens het invoeren.

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">O contato será removido de todas removido de todas as fontes de contato.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contato</item>
<item quantity="other">%d contatos</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d grupo</item>
<item quantity="other">%d grupos</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">O contacto será apagado de todas as origens.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contacto</item>
<item quantity="other">%d contactos</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d grupo</item>
<item quantity="other">%d grupos</item>

View File

@ -141,13 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Контакт будет удалён из всех источников контактов.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d контакт</item>
<item quantity="few">%d контакта</item>
<item quantity="many">%d контактов</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d группу</item>
<item quantity="few">%d группы</item>

View File

@ -141,13 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Kontakt bude vymazaný zo všetkých zdrojov kontaktov.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d kontakt</item>
<item quantity="few">%d kontakty</item>
<item quantity="other">%d kontaktov</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d skupinu</item>
<item quantity="few">%d skupiny</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Kontakten kommer att tas bort från alla kontaktkällor.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d kontakt</item>
<item quantity="other">%d kontakter</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d grupp</item>
<item quantity="other">%d grupper</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">Kişi tüm kişi kaynaklarından kaldırılacak.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d kişi</item>
<item quantity="other">%d kişi</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d grup</item>
<item quantity="other">%d grup</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">這聯絡人將從全部通訊錄來源移除。</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d個聯絡人</item>
<item quantity="other">%d個聯絡人</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d個群組</item>
<item quantity="other">%d個群組</item>

View File

@ -141,12 +141,6 @@
<!-- Confirmation dialog -->
<string name="delete_from_all_sources">The contact will be removed from all contact sources.</string>
<!-- Are you sure you want to delete 5 contacts? -->
<plurals name="delete_contacts">
<item quantity="one">%d contact</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="delete_groups">
<item quantity="one">%d group</item>
<item quantity="other">%d groups</item>