diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/SettingsActivity.kt
index eb41f275..da1f8720 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/SettingsActivity.kt
@@ -23,6 +23,7 @@ class SettingsActivity : SimpleActivity() {
super.onResume()
setupCustomizeColors()
+ setupManageShownContactFields()
setupUseEnglish()
setupAvoidWhatsNew()
setupShowInfoBubble()
@@ -39,6 +40,12 @@ class SettingsActivity : SimpleActivity() {
}
}
+ private fun setupManageShownContactFields() {
+ settings_manage_contact_fields_holder.setOnClickListener {
+
+ }
+ }
+
private fun setupUseEnglish() {
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
settings_use_english.isChecked = config.useEnglish
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Config.kt
index 81c3bf65..ec516108 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Config.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Config.kt
@@ -41,4 +41,9 @@ class Config(context: Context) : BaseConfig(context) {
var onContactClick: Int
get() = prefs.getInt(ON_CONTACT_CLICK, ON_CLICK_VIEW_CONTACT)
set(onContactClick) = prefs.edit().putInt(ON_CONTACT_CLICK, onContactClick).apply()
+
+ var showContactFields: Int
+ get() = prefs.getInt(SHOW_CONTACT_FIELDS, SHOW_FIRST_NAME_FIELD or SHOW_SURNAME_FIELD or SHOW_PHONE_NUMBERS_FIELD or SHOW_EMAILS_FIELD or
+ SHOW_ADDRESSES_FIELD or SHOW_EVENTS_FIELD or SHOW_NOTES_FIELD or SHOW_GROUPS_FIELD or SHOW_CONTACT_SOURCE_FIELD)
+ set(showContactFields) = prefs.edit().putInt(SHOW_CONTACT_FIELDS, showContactFields).apply()
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Constants.kt
index 38f51d63..11084ef4 100644
--- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/Constants.kt
@@ -9,6 +9,7 @@ const val LAST_USED_CONTACT_SOURCE = "last_used_contact_source"
const val LOCAL_ACCOUNT_NAME = "local_account_name"
const val LOCAL_ACCOUNT_TYPE = "local_account_type"
const val ON_CONTACT_CLICK = "on_contact_click"
+const val SHOW_CONTACT_FIELDS = "show_contact_fields"
const val CONTACT_ID = "contact_id"
const val SMT_PRIVATE = "smt_private" // used at the contact source of local contacts hidden from other apps
@@ -66,3 +67,18 @@ const val VOICE = "VOICE"
const val ON_CLICK_CALL_CONTACT = 1
const val ON_CLICK_VIEW_CONTACT = 2
const val ON_CLICK_EDIT_CONTACT = 3
+
+// visible fields filtering
+const val SHOW_PREFIX_FIELD = 1
+const val SHOW_FIRST_NAME_FIELD = 2
+const val SHOW_MIDDLE_NAME_FIELD = 4
+const val SHOW_SURNAME_FIELD = 8
+const val SHOW_SUFFIX_FIELD = 16
+const val SHOW_PHONE_NUMBERS_FIELD = 32
+const val SHOW_EMAILS_FIELD = 64
+const val SHOW_ADDRESSES_FIELD = 128
+const val SHOW_EVENTS_FIELD = 256
+const val SHOW_NOTES_FIELD = 512
+const val SHOW_ORGANIZATION_FIELD = 1024
+const val SHOW_GROUPS_FIELD = 2048
+const val SHOW_CONTACT_SOURCE_FIELD = 4096
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 35f4ccf3..d1fedd67 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -33,6 +33,28 @@
+
+
+
+
+
+