fix #18, adding a toggle for starting names with surname
This commit is contained in:
parent
38e7ae863b
commit
ece538e9c2
|
@ -56,6 +56,6 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.28.25'
|
||||
implementation 'com.simplemobiletools:commons:5.28.27'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupFontSize()
|
||||
setupDefaultTab()
|
||||
setupGroupSubsequentCalls()
|
||||
setupStartNameWithSurname()
|
||||
updateTextColors(settings_holder)
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
@ -132,4 +133,12 @@ class SettingsActivity : SimpleActivity() {
|
|||
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" />
|
||||
|
||||
</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>
|
||||
</ScrollView>
|
||||
|
|
Loading…
Reference in New Issue