Created
          April 29, 2019 23:34 
        
      - 
      
 - 
        
Save alexsullivan114/3779601bc12c02ad1cd58b203a574fa5 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
    
  
  
    
  | class AddNoteActivity : BaseActivity<AddNoteViewModel>() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_add_note) | |
| add_note_button.setOnClickListener { viewModel.addNoteClicked(note_text.text.toString()) } | |
| observeTrigger(viewModel.setResultAndFinishStream, this::setResultAndFinish) | |
| observeTrigger(viewModel.showAddNoteFailedErrorStream, this::showErrorMessage) | |
| observe(viewModel.shouldEnableAddNoteButtonStream, add_note_button::setEnabled) | |
| observe(viewModel.shouldShowLoadingIndicatorStream, swipe_refresh::setRefreshing) | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment