I have an issue with activity_main.xml, where in the preview, the labels appear, but when I run it on the emulator, the labels don't show up. Only the data like the name, location, etc., is visible, but not their respective labels. I've written the code as you've instructed so far. What could be happening here?
Hmm, well the preview text you set in XML will not show up at runtime. That is just a helper feature to see your design in action before it runs. Are you properly setting the data to the views at runtime?
I am trying to do these steps with viewbinding but I can't seem to send the data from viewmodel, which is where I have my getCharacter() function to the layout through Fragment. Any idea how I could make it work? I saw that you had already developed the project in later videos but those are too advanced for me...
Hey not entirely sure of the problem, but do you need to use LiveData or Flow to propagate the info out to the Fragment? Maybe watch a few more episodes to see how it unfolds and all the code is available on GitHub if you need it!
@@TheAndroidFactory I have been working with Live Data so far. I implemented an API and an adapter to display all characters but I want to display character details for each character when I click on them like you do in the video
Ah! Well I'd encourage you to keep watching some videos here. I build out and discuss some ways to accomplish this -- but basically you either need to send a full Character object into the details Fragment, or some unique ID to then fetch the character by their ID in the detail Fragment.
Found a gold mine, this channel is on par with Phillip Lackner if not better.
😍 that actually means a lot! New Compose series coming soon 👀
Plenty of other videos on the channel - would love to hear your thoughts! Please share with anyone you think would benefit 🙏
i agree man totaly
Thank you guys 🥹
Thank you!
Hope it helped :)
Great one❤
Appreciate the feedback :) this season is a good one!
I have an issue with activity_main.xml, where in the preview, the labels appear, but when I run it on the emulator, the labels don't show up. Only the data like the name, location, etc., is visible, but not their respective labels. I've written the code as you've instructed so far. What could be happening here?
Hmm, well the preview text you set in XML will not show up at runtime. That is just a helper feature to see your design in action before it runs. Are you properly setting the data to the views at runtime?
Thanks a lot.
You got it!! More coming
I am trying to do these steps with viewbinding but I can't seem to send the data from viewmodel, which is where I have my getCharacter() function to the layout through Fragment.
Any idea how I could make it work?
I saw that you had already developed the project in later videos but those are too advanced for me...
Hey not entirely sure of the problem, but do you need to use LiveData or Flow to propagate the info out to the Fragment? Maybe watch a few more episodes to see how it unfolds and all the code is available on GitHub if you need it!
@@TheAndroidFactory I have been working with Live Data so far. I implemented an API and an adapter to display all characters but I want to display character details for each character when I click on them like you do in the video
Ah! Well I'd encourage you to keep watching some videos here. I build out and discuss some ways to accomplish this -- but basically you either need to send a full Character object into the details Fragment, or some unique ID to then fetch the character by their ID in the detail Fragment.