Created
May 13, 2018 04:39
-
-
Save adrianhall/868c1cd95c25270ee61496b080dd076b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
val rootView = inflater.inflate(R.layout.fragment_note_detail, container, false) | |
viewModel.currentNote.observe(this, Observer { | |
it?.let { | |
rootView.detail_id_field.text = it.noteId | |
rootView.detail_title_editor.text.set(it.title) | |
rootView.detail_content_editor.text.set(it.content) | |
} | |
}) | |
rootView.detail_title_editor.afterTextChanged { saveNote() } | |
rootView.detail_content_editor.afterTextChanged { saveNote() } | |
return rootView | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment