adding a Speed Dial related activity

This commit is contained in:
tibbi 2020-01-17 11:43:24 +01:00
parent 32a7bfdba9
commit 516976413d
5 changed files with 39 additions and 1 deletions

View File

@ -57,7 +57,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.21.19'
implementation 'com.simplemobiletools:commons:5.21.24'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'

View File

@ -219,6 +219,11 @@
android:label="@string/blocked_numbers"
android:parentActivityName=".activities.SettingsActivity"/>
<activity
android:name=".activities.ManageSpeedDialActivity"
android:label="@string/speed_dial"
android:parentActivityName=".activities.SettingsActivity"/>
<activity
android:name=".activities.DialpadActivity"
android:label="@string/dialpad"

View File

@ -0,0 +1,5 @@
package com.simplemobiletools.contacts.pro.activities
class ManageSpeedDialActivity : SimpleActivity() {
}

View File

@ -33,6 +33,7 @@ class SettingsActivity : SimpleActivity() {
setupManageShownContactFields()
setupManageShownTabs()
setupManageBlockedNumbers()
setupManageSpeedDial()
setupUseEnglish()
setupShowInfoBubble()
setupShowContactThumbnails()
@ -79,6 +80,12 @@ class SettingsActivity : SimpleActivity() {
}
}
private fun setupManageSpeedDial() {
settings_manage_speed_dial_holder.setOnClickListener {
startActivity(Intent(this, ManageSpeedDialActivity::class.java))
}
}
private fun setupUseEnglish() {
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
settings_use_english.isChecked = config.useEnglish

View File

@ -96,6 +96,27 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_manage_speed_dial_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.MyTextView
android:id="@+id/settings_manage_speed_dial"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingStart="@dimen/medium_margin"
android:text="@string/manage_speed_dial"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_use_english_holder"
android:layout_width="match_parent"