keikha / YAndroid

0 stars 1 forks source link

Project 1: Instagram Client #3

Open keikha opened 9 years ago

keikha commented 9 years ago

My first application is ready to review. /cc @codepathreview @codepath It can be found in this folder: YAndroid/simpleInstgClient

Sorry for delay, but I don't get any response from instagram API and I get timeout exception. I'll capture the GIF screenshot as soon as I'm able to get data from the API.

Best, Mostafa Keikha

nesquena commented 9 years ago

Were you able to get a response and now you don't or did you never get one? Did you try restarting your emulator and/or your computer? It's possible you just lost internet connection.

keikha commented 9 years ago

I was able to test the app until 2 hours ago, but then it stopped responding ( although even at that time I was getting weird responses that I couldn't figure out why, e.g. same image repeated multiple times in my list).

Yes, I restarted my emulator and my android studio. I'm also testing it from my second laptop. I can't even get the json object in the browser. Any idea?

nesquena commented 9 years ago

Your key must have been rate limited. Can you try registering for another api key?

Nathan Esquenazi

On Monday, January 26, 2015 at 11:03 PM, Mostafa Keikha wrote:

I was able to test the app until 2 hours ago, but then it stopped responding ( although even at that time I was getting weird responses that I couldn't figure out why, e.g. same image repeated multiple times in my list). Yes, I restarted my emulator and my android studio. I'm also testing it from my second laptop. I can't even get the json object in the browser. Any idea?

— Reply to this email directly or view it on GitHub (https://github.com/keikha/YAndroid/issues/3#issuecomment-71598646).

keikha commented 9 years ago

That's a good idea, but I can't even open the https://instagram.com/ I'm trying two notebooks and three browsers in each. I'm rebooting the notebooks now and see what happens.

keikha commented 9 years ago

Ok, the service is back. I'll generate the GIF asap. Although still I see same images repetitively.

keikha commented 9 years ago

I added also the GIF file. The current project only has the required parts. I'm working on the optional parts now and update the repository frequently. I hope to get some optional parts done before you review it.

nesquena commented 9 years ago

:+1: Looks good overall. As you mentioned it's just the required and the UI looks plain and needs a lot of work. Hope you are able to get some optionals in but also that you learned a lot going through the process of building this out.

I have provided a detailed Project 1 Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you could improve your submission. You should consider going back and implementing applicable feedback as well. Keep in mind that one of the most important parts of Android development is learning the correct patterns and conventions.

Hopefully this has given you a first sense of the RelativeLayout which is a very powerful layout system, probably one of the best responsive-first layout systems available across web and mobile platforms. This project also incorporates first introductions to basic networking, image loading and more complex feeds.

I would encourage you to also spend more time in future assignments improving the UI / UX as well by reviewing examples of good UI design.

The next assignment will build on top of the first concepts introduced here and will introduce several new topics.

If you have any particular questions about the assignment in general or on any of the feedback, feel free to reply here or email me directly.

keikha commented 9 years ago

Thank you for your response. What I'm struggling with right now it the repetitive images. I printed out the URLs of each photo in the log, and there are correct URLs. But they are not properly loaded into imageview. I thought it might be the emulator problem. But I get same behavior in my Galaxy Not 4 cell phone.

I hope to get this fixed before moving to the optional parts.

nesquena commented 9 years ago

Your issue is here https://github.com/keikha/YAndroid/blob/master/simpleInstgClient/app/src/main/java/com/myinc/keikha/simpleinstgclient/InstagramPhotoAdapter.java#L36

nesquena commented 9 years ago

You can't do nothing if convert view is not null...otherwise you will never get new posts after the initial views are inflated. You need to populate the data either way, just don't inflate if the view is already inflated (and recycled). Refer back to the adapter guide, you'll notice you have to insert data into the view no matter what in order for the posts to be loaded properly. Try fixing that and it will remove your duplicate problem. I suspect you may need to review what convertView is and get a better understanding of how view recycling works.

keikha commented 9 years ago

Wow, you are the best :)

Thanks

keikha commented 9 years ago

Tried to spend some more time on it. I added the user photo and likes count. I also used the ViewHolder to improve the performance.

This was fun, thank you :)

nesquena commented 9 years ago

Great, good to see you got in a few extensions this week.