Skip to content

Commit 68e840d

Browse files
committed
replace some views with my custom ones
1 parent 73ce78d commit 68e840d

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import android.view.View
55
import android.widget.AdapterView
66
import android.widget.ArrayAdapter
77
import com.simplemobiletools.notes.R
8-
import com.simplemobiletools.notes.helpers.DBHelper
98
import com.simplemobiletools.notes.extensions.updateWidget
9+
import com.simplemobiletools.notes.helpers.DBHelper
1010
import com.simplemobiletools.notes.models.Note
1111
import kotlinx.android.synthetic.main.activity_settings.*
1212

@@ -79,7 +79,7 @@ class SettingsActivity : SimpleActivity() {
7979
}
8080

8181
private fun getSpinnerAdapter(notes: List<Note>): ArrayAdapter<String> {
82-
val titles = notes.map { it.title }
82+
val titles = notes.map(Note::title)
8383
val adapter = ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, titles)
8484
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
8585
return adapter

app/src/main/kotlin/com/simplemobiletools/notes/adapters/NotesPagerAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import android.support.v4.app.Fragment
55
import android.support.v4.app.FragmentManager
66
import android.support.v4.app.FragmentStatePagerAdapter
77
import android.util.SparseArray
8-
import com.simplemobiletools.notes.helpers.NOTE_ID
98
import com.simplemobiletools.notes.fragments.NoteFragment
9+
import com.simplemobiletools.notes.helpers.NOTE_ID
1010
import com.simplemobiletools.notes.models.Note
1111

1212
class NotesPagerAdapter(fm: FragmentManager, private val notes: List<Note>) : FragmentStatePagerAdapter(fm) {

app/src/main/res/layout/fragment_note.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:layout_height="match_parent"
1212
android:fillViewport="true">
1313

14-
<EditText
14+
<com.simplemobiletools.commons.views.MyEditText
1515
android:id="@+id/notes_view"
1616
android:layout_width="match_parent"
1717
android:layout_height="wrap_content"

app/src/main/res/layout/new_note.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
android:paddingRight="@dimen/activity_margin"
1010
android:paddingTop="@dimen/activity_margin">
1111

12-
<EditText
12+
<com.simplemobiletools.commons.views.MyEditText
1313
android:id="@+id/note_name"
1414
android:layout_width="match_parent"
1515
android:layout_height="wrap_content"
1616
android:layout_marginBottom="@dimen/activity_margin"
17-
android:inputType="textCapSentences" />
18-
17+
android:inputType="textCapSentences"/>
1918
</LinearLayout>

app/src/main/res/layout/rename_note.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
android:orientation="vertical"
88
android:padding="@dimen/activity_margin">
99

10-
<EditText
10+
<com.simplemobiletools.commons.views.MyEditText
1111
android:id="@+id/note_name"
1212
android:layout_width="match_parent"
1313
android:layout_height="wrap_content"
1414
android:layout_marginBottom="@dimen/activity_margin"
1515
android:inputType="textCapSentences"
1616
android:singleLine="true"/>
17-
1817
</LinearLayout>

0 commit comments

Comments
 (0)