fix #294, add an option to hide the dialpad on the main screen
This commit is contained in:
parent
e976c72cd9
commit
e8c2f1db91
|
@ -159,11 +159,15 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||
}
|
||||
}
|
||||
}
|
||||
isFirstResume = false
|
||||
|
||||
val dialpadIcon = resources.getColoredDrawableWithColor(R.drawable.ic_dialpad, if (isBlackAndWhiteTheme()) Color.BLACK else Color.WHITE)
|
||||
main_dialpad_button.setImageDrawable(dialpadIcon)
|
||||
main_dialpad_button.background.applyColorFilter(getAdjustedPrimaryColor())
|
||||
main_dialpad_button.apply {
|
||||
setImageDrawable(dialpadIcon)
|
||||
background.applyColorFilter(getAdjustedPrimaryColor())
|
||||
beVisibleIf(config.showDialpadButton)
|
||||
}
|
||||
|
||||
isFirstResume = false
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
@ -2,7 +2,8 @@ package com.simplemobiletools.contacts.pro.activities
|
|||
|
||||
import android.os.Bundle
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.contacts.pro.R
|
||||
import com.simplemobiletools.contacts.pro.dialogs.ManageVisibleFieldsDialog
|
||||
|
@ -35,6 +36,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupUse24HourTimeFormat()
|
||||
setupFilterDuplicates()
|
||||
setupShowCallConfirmation()
|
||||
setupShowDialpadButton()
|
||||
setupOnContactClick()
|
||||
updateTextColors(settings_holder)
|
||||
}
|
||||
|
@ -123,6 +125,14 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupShowDialpadButton() {
|
||||
settings_show_dialpad_button.isChecked = config.showDialpadButton
|
||||
settings_show_dialpad_button_holder.setOnClickListener {
|
||||
settings_show_dialpad_button.toggle()
|
||||
config.showDialpadButton = settings_show_dialpad_button.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupOnContactClick() {
|
||||
settings_on_contact_click.text = getOnContactClickText()
|
||||
settings_on_contact_click_holder.setOnClickListener {
|
||||
|
|
|
@ -60,4 +60,8 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
var showCallConfirmation: Boolean
|
||||
get() = prefs.getBoolean(SHOW_CALL_CONFIRMATION, false)
|
||||
set(showCallConfirmation) = prefs.edit().putBoolean(SHOW_CALL_CONFIRMATION, showCallConfirmation).apply()
|
||||
|
||||
var showDialpadButton: Boolean
|
||||
get() = prefs.getBoolean(SHOW_DIALPAD_BUTTON, true)
|
||||
set(showDialpadButton) = prefs.edit().putBoolean(SHOW_DIALPAD_BUTTON, showDialpadButton).apply()
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ const val SHOW_CONTACT_FIELDS = "show_contact_fields"
|
|||
const val SHOW_TABS = "show_tabs"
|
||||
const val FILTER_DUPLICATES = "filter_duplicates"
|
||||
const val SHOW_CALL_CONFIRMATION = "show_call_confirmation"
|
||||
const val SHOW_DIALPAD_BUTTON = "show_dialpad_button"
|
||||
|
||||
const val CONTACT_ID = "contact_id"
|
||||
const val SMT_PRIVATE = "smt_private" // used at the contact source of local contacts hidden from other apps
|
||||
|
|
|
@ -294,6 +294,30 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_show_dialpad_button_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_show_dialpad_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:text="@string/show_dialpad_button"
|
||||
app:switchPadding="@dimen/medium_margin"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_on_contact_click_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Ada soyaddan başla</string>
|
||||
<string name="show_phone_numbers">Telefon nömrələrini əsas ekranda göstər</string>
|
||||
<string name="show_contact_thumbnails">Kontakt görüntülərini göstər</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Kontakta toxunduqda</string>
|
||||
<string name="call_contact">Kontakta zəng et</string>
|
||||
<string name="view_contact">Kontakt detallarına bax</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Namen mit Nachnamen beginnen</string>
|
||||
<string name="show_phone_numbers">Telefonnummern im Hauptmenü zeigen</string>
|
||||
<string name="show_contact_thumbnails">Vorschaubilder der Kontakte zeigen</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Beim Klicken auf den Kontakt</string>
|
||||
<string name="call_contact">Kontakt anrufen</string>
|
||||
<string name="view_contact">Kontaktdetails anzeigen</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Εμφάνιση πρώτα το επώνυμο</string>
|
||||
<string name="show_phone_numbers">Εμφάνιση τηλεφωνικών αριθμών στην κύρια οθόνη</string>
|
||||
<string name="show_contact_thumbnails">Εμφάνιση μικρογραφιών επαφής</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Στην επιλογή επαφής</string>
|
||||
<string name="call_contact">Κλήση επαφής</string>
|
||||
<string name="view_contact">Εμφάνιση λεπτομερειών επαφής</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Abizenaren arabera sailkatu</string>
|
||||
<string name="show_phone_numbers">Erakutsi telefono zenbakiak pantaila nagusian</string>
|
||||
<string name="show_contact_thumbnails">Show contact thumbnails</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Kontaktu sakatzean</string>
|
||||
<string name="call_contact">Kontaktua deitu</string>
|
||||
<string name="view_contact">Ikusi kontaktu detaileak</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<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="show_dialpad_button">Show a dialpad button on the main screen</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>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Započnite imena s prezimenima</string>
|
||||
<string name="show_phone_numbers">Prikaži telefonske brojeve na glavnom zaslonu</string>
|
||||
<string name="show_contact_thumbnails">Prikaži sličice kontakata</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Prilikom dodira kontakta</string>
|
||||
<string name="call_contact">Nazovi kontakt</string>
|
||||
<string name="view_contact">Prikaži pojedinosti o kontaktu</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Prima il nome poi il cognome</string>
|
||||
<string name="show_phone_numbers">Mostra i numeri di telefono nella schermata principale</string>
|
||||
<string name="show_contact_thumbnails">Mostra le anteprime dei contatti</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Al click sul contatto</string>
|
||||
<string name="call_contact">Chiama contatto</string>
|
||||
<string name="view_contact">Visualizza i dettagli del contatto</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">姓を先に表示</string>
|
||||
<string name="show_phone_numbers">メイン画面に電話番号を表示</string>
|
||||
<string name="show_contact_thumbnails">連絡先のサムネイルを表示</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">連絡先をタップ</string>
|
||||
<string name="call_contact">連絡先に発信</string>
|
||||
<string name="view_contact">連絡先の詳細を表示</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">성을 먼저 표시</string>
|
||||
<string name="show_phone_numbers">메인 스크린에 전화번호 표시</string>
|
||||
<string name="show_contact_thumbnails">Show contact thumbnails</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">On contact click</string>
|
||||
<string name="call_contact">Call contact</string>
|
||||
<string name="view_contact">View contact details</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Pavardė rodoma pirma</string>
|
||||
<string name="show_phone_numbers">Rodyti telefono numerius pagrindiniame programos ekrane</string>
|
||||
<string name="show_contact_thumbnails">Rodyti kontaktų miniatiūras</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Ant kontakto paspaudimo</string>
|
||||
<string name="call_contact">Skambinti kontaktui</string>
|
||||
<string name="view_contact">Žiūrėti kontakto detales</string>
|
||||
|
|
|
@ -52,6 +52,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="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Ao tocar no contacto</string>
|
||||
<string name="call_contact">Ligar</string>
|
||||
<string name="view_contact">Ver detalhes</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Показывать сначала фамилию</string>
|
||||
<string name="show_phone_numbers">Показывать номера телефонов на главном экране</string>
|
||||
<string name="show_contact_thumbnails">Показывать фото контакта</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">При нажатии на контакт</string>
|
||||
<string name="call_contact">Позвонить контакту</string>
|
||||
<string name="view_contact">Просмотреть подробности о контакте</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Začať meno priezviskom</string>
|
||||
<string name="show_phone_numbers">Zobraziť telefónne čísla na hlavnej obrazovke</string>
|
||||
<string name="show_contact_thumbnails">Zobraziť obrázky kontaktov</string>
|
||||
<string name="show_dialpad_button">Zobraziť tlačidlo pre číselník na hlavnej obrazovke</string>
|
||||
<string name="on_contact_click">Po kliknutí na kontakt</string>
|
||||
<string name="call_contact">Zavolať kontakt</string>
|
||||
<string name="view_contact">Zobraziť údaje kontaktu</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Visa efternamn först</string>
|
||||
<string name="show_phone_numbers">Visa telefonnummer i huvudvyn</string>
|
||||
<string name="show_contact_thumbnails">Visa kontaktminiatyrer</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Vid kontakttryckning</string>
|
||||
<string name="call_contact">Ring kontakt</string>
|
||||
<string name="view_contact">Visa kontaktuppgifter</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Soyadı ile başla</string>
|
||||
<string name="show_phone_numbers">Ana ekranda telefon numaralarını göster</string>
|
||||
<string name="show_contact_thumbnails">Kişi küçük resimlerini göster</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">Kişi tıklandığında</string>
|
||||
<string name="call_contact">Kişiyi ara</string>
|
||||
<string name="view_contact">Kişi bilgilerini göster</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">姓氏在前</string>
|
||||
<string name="show_phone_numbers">主畫面顯示電話號碼</string>
|
||||
<string name="show_contact_thumbnails">顯示聯絡人縮圖</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">點擊聯絡人</string>
|
||||
<string name="call_contact">打電話給聯絡人</string>
|
||||
<string name="view_contact">顯示聯絡人資料</string>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<string name="start_name_with_surname">Start name with surname</string>
|
||||
<string name="show_phone_numbers">Show phone numbers on the main screen</string>
|
||||
<string name="show_contact_thumbnails">Show contact thumbnails</string>
|
||||
<string name="show_dialpad_button">Show a dialpad button on the main screen</string>
|
||||
<string name="on_contact_click">On contact click</string>
|
||||
<string name="call_contact">Call contact</string>
|
||||
<string name="view_contact">View contact details</string>
|
||||
|
|
Loading…
Reference in New Issue