mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
fix #18, adding a toggle for starting names with surname
This commit is contained in:
@ -56,6 +56,6 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.28.25'
|
implementation 'com.simplemobiletools:commons:5.28.27'
|
||||||
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupFontSize()
|
setupFontSize()
|
||||||
setupDefaultTab()
|
setupDefaultTab()
|
||||||
setupGroupSubsequentCalls()
|
setupGroupSubsequentCalls()
|
||||||
|
setupStartNameWithSurname()
|
||||||
updateTextColors(settings_holder)
|
updateTextColors(settings_holder)
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
}
|
}
|
||||||
@ -132,4 +133,12 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
config.groupSubsequentCalls = settings_group_subsequent_calls.isChecked
|
config.groupSubsequentCalls = settings_group_subsequent_calls.isChecked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupStartNameWithSurname() {
|
||||||
|
settings_start_with_surname.isChecked = config.startNameWithSurname
|
||||||
|
settings_start_with_surname_holder.setOnClickListener {
|
||||||
|
settings_start_with_surname.toggle()
|
||||||
|
config.startNameWithSurname = settings_start_with_surname.isChecked
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,5 +204,28 @@
|
|||||||
app:switchPadding="@dimen/medium_margin" />
|
app:switchPadding="@dimen/medium_margin" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_start_with_surname_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_start_with_surname"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:text="@string/start_name_with_surname"
|
||||||
|
app:switchPadding="@dimen/medium_margin" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
Reference in New Issue
Block a user