mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
allow changing text gravity
This commit is contained in:
@ -19,6 +19,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
setupDarkTheme()
|
||||
setupFontSize()
|
||||
setupWidgetNote()
|
||||
setupGravity()
|
||||
}
|
||||
|
||||
private fun setupDarkTheme() {
|
||||
@ -66,6 +67,18 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupGravity() {
|
||||
settings_gravity.setSelection(config.gravity)
|
||||
settings_gravity.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
config.gravity = settings_gravity.selectedItemPosition
|
||||
}
|
||||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getNoteIndexWithId(id: Int, notes: List<Note>): Int {
|
||||
for (i in 0..notes.count() - 1) {
|
||||
if (notes[i].id == id) {
|
||||
|
Reference in New Issue
Block a user