mirror of
				https://github.com/SimpleMobileTools/Simple-Notes.git
				synced 2025-06-05 17:00:23 +02:00 
			
		
		
		
	replace some views with my custom ones
This commit is contained in:
		| @@ -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<Note>): ArrayAdapter<String> { | ||||
|         val titles = notes.map { it.title } | ||||
|         val titles = notes.map(Note::title) | ||||
|         val adapter = ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, titles) | ||||
|         adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item) | ||||
|         return adapter | ||||
|   | ||||
| @@ -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<Note>) : FragmentStatePagerAdapter(fm) { | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
|         android:layout_height="match_parent" | ||||
|         android:fillViewport="true"> | ||||
|  | ||||
|         <EditText | ||||
|         <com.simplemobiletools.commons.views.MyEditText | ||||
|             android:id="@+id/notes_view" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|   | ||||
| @@ -9,11 +9,10 @@ | ||||
|     android:paddingRight="@dimen/activity_margin" | ||||
|     android:paddingTop="@dimen/activity_margin"> | ||||
|  | ||||
|     <EditText | ||||
|     <com.simplemobiletools.commons.views.MyEditText | ||||
|         android:id="@+id/note_name" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginBottom="@dimen/activity_margin" | ||||
|         android:inputType="textCapSentences"/> | ||||
|  | ||||
| </LinearLayout> | ||||
|   | ||||
| @@ -7,12 +7,11 @@ | ||||
|     android:orientation="vertical" | ||||
|     android:padding="@dimen/activity_margin"> | ||||
|  | ||||
|     <EditText | ||||
|     <com.simplemobiletools.commons.views.MyEditText | ||||
|         android:id="@+id/note_name" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginBottom="@dimen/activity_margin" | ||||
|         android:inputType="textCapSentences" | ||||
|         android:singleLine="true"/> | ||||
|  | ||||
| </LinearLayout> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user