From 68e840daf649e8e1159c629e3d23de0a250a7535 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 6 Jan 2017 20:46:20 +0100 Subject: [PATCH] replace some views with my custom ones --- .../simplemobiletools/notes/activities/SettingsActivity.kt | 4 ++-- .../simplemobiletools/notes/adapters/NotesPagerAdapter.kt | 2 +- app/src/main/res/layout/fragment_note.xml | 2 +- app/src/main/res/layout/new_note.xml | 5 ++--- app/src/main/res/layout/rename_note.xml | 3 +-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt index 4309d16a..6b276e24 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt @@ -5,8 +5,8 @@ import android.view.View import android.widget.AdapterView import android.widget.ArrayAdapter import com.simplemobiletools.notes.R -import com.simplemobiletools.notes.helpers.DBHelper import com.simplemobiletools.notes.extensions.updateWidget +import com.simplemobiletools.notes.helpers.DBHelper import com.simplemobiletools.notes.models.Note import kotlinx.android.synthetic.main.activity_settings.* @@ -79,7 +79,7 @@ class SettingsActivity : SimpleActivity() { } private fun getSpinnerAdapter(notes: List): ArrayAdapter { - val titles = notes.map { it.title } + val titles = notes.map(Note::title) val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, titles) adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) return adapter diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/adapters/NotesPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/notes/adapters/NotesPagerAdapter.kt index 421c58a8..65f73154 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/adapters/NotesPagerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/adapters/NotesPagerAdapter.kt @@ -5,8 +5,8 @@ import android.support.v4.app.Fragment import android.support.v4.app.FragmentManager import android.support.v4.app.FragmentStatePagerAdapter import android.util.SparseArray -import com.simplemobiletools.notes.helpers.NOTE_ID import com.simplemobiletools.notes.fragments.NoteFragment +import com.simplemobiletools.notes.helpers.NOTE_ID import com.simplemobiletools.notes.models.Note class NotesPagerAdapter(fm: FragmentManager, private val notes: List) : FragmentStatePagerAdapter(fm) { diff --git a/app/src/main/res/layout/fragment_note.xml b/app/src/main/res/layout/fragment_note.xml index 2517053e..3c6c6164 100644 --- a/app/src/main/res/layout/fragment_note.xml +++ b/app/src/main/res/layout/fragment_note.xml @@ -11,7 +11,7 @@ android:layout_height="match_parent" android:fillViewport="true"> - - - + android:inputType="textCapSentences"/> diff --git a/app/src/main/res/layout/rename_note.xml b/app/src/main/res/layout/rename_note.xml index fcddaf46..141c6b91 100644 --- a/app/src/main/res/layout/rename_note.xml +++ b/app/src/main/res/layout/rename_note.xml @@ -7,12 +7,11 @@ android:orientation="vertical" android:padding="@dimen/activity_margin"> - -