Code Monkey home page Code Monkey logo

spacenotes's Issues

Just saying THANK YOU!!!

Hey there! I watched your 3-hour tutorial for Kotlin programming on YouTube and I am very pleased to say I found it very productive. Thank you for making this video and also thank you for this repository! That is all. There is no issue. Thank you so much for existing! <3

Question About MVVM Blah Blah Pattern

Hello. I am a Korean fan who is studying hard through your Android Kotlin tutorial. First of all, I want to say thank you so much. Your lessons are very unique compared to other Android tutorials. So I also became very interested in the MVVM blah blah pattern you suggested. I'm trying to create a note app using your pattern, but I'm running into a problem. It wasn't much different from SpaceNote, so I thought it would be easy to implement, but I got stuck in this process and couldn't get any help. So I decided to leave a direct message like this. I'm really sorry for bothering you.

Activity:
https://github.com/ShinJaehun/WinterNotes/blob/master/app/src/main/java/com/shinjaehun/winternotes/note/notedetail/NoteDetailActivity.kt

ViewModel:
https://github.com/ShinJaehun/WinterNotes/blob/master/app/src/main/java/com/shinjaehun/winternotes/note/notedetail/NoteDetailViewModel.kt

viewmodel handle event and viewmodel observe also work properly. Please pay attention to the NoteDetailEvent.OnDoneClick() process when the save button is pressed in line 74 of Activity.

The text of the EditText can be easily passed, but the problem is passing the colorCode of the view or the file path of the image.
At least I figured out how to get the colorCode from the View and passed it like that, but I don't know how to get the file path from ImageView. The file path is temporarily placed in a global variable and the value is changed each time an event occurs. It works fine, but I'm worried that if I do this, something is going against the pattern you suggested. (Of course, I know that I should never access it directly like viewmodel.changedNoteImage!! ;-) )

And I have one more question. How about passing the note object directly to Note Detail Event.OnNodeClick? I think it looks much better with the reduced arguments of ViewModel updateNote(), but I don't know how to write updateNote(). Unlike Note and RoomNote in the SpaceNote example, I am using noteId with @PrimaryKey(autoGenerate=true) instead of creationDate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.