johnlaw1973
New Coder
I started learning to code back in april. Started with a udemy course. It became immediately apparent that the greatest difficulty in learning to code is that courses and tutorials become obsolete quickly. My first course taught me all about intents and activities which had already been replaced with fragments and the navigation component.
I have fought through building an app which has a fragment which adds a user. The users are then displayed in a recyclerview. Each view in the recyclerview has onClickListener which takes you to another fragment with a recyclerview fulll of songs that the individual user likes.
The issue is sending the userName from the first recyclerview to the repository so that it can be sent to the Data access object, so that the sqlite database can be queried to select all rows WHERE name is equal to the name provided.
In the end I want to return a list of songs which are favorites of only one user. the user who was clicked in the first recyclerview. The only piece I'm missing is sharing the data from the recyclerview press. I think I just need to figure out how to share data between fragments and the host activity, but I can't find any tutorials that are in Kotlin. I found a great one in java, but i have learned not to waste my time trying to convert as the two languages often offer completely different methods to solving problems.
Can anyone direct me to a tutorial in kotlin which teaches data sharing from a fragment to the data access object. I am pulling my hair out. I'm very close and can't get this last piece.
thanks in advance.
I have fought through building an app which has a fragment which adds a user. The users are then displayed in a recyclerview. Each view in the recyclerview has onClickListener which takes you to another fragment with a recyclerview fulll of songs that the individual user likes.
The issue is sending the userName from the first recyclerview to the repository so that it can be sent to the Data access object, so that the sqlite database can be queried to select all rows WHERE name is equal to the name provided.
In the end I want to return a list of songs which are favorites of only one user. the user who was clicked in the first recyclerview. The only piece I'm missing is sharing the data from the recyclerview press. I think I just need to figure out how to share data between fragments and the host activity, but I can't find any tutorials that are in Kotlin. I found a great one in java, but i have learned not to waste my time trying to convert as the two languages often offer completely different methods to solving problems.
Can anyone direct me to a tutorial in kotlin which teaches data sharing from a fragment to the data access object. I am pulling my hair out. I'm very close and can't get this last piece.
thanks in advance.