smacgregor / instagramclient Goto Github PK
View Code? Open in Web Editor NEWAndroid Instagram application that shows a list of popular images on instagram
Android Instagram application that shows a list of popular images on instagram
My app is complete, please review. /cc @codepathreview @codepath
Looking for feedback in particular on the layout for my listview cell: item_photo.xml
I used three layouts:
I'd like to learn if I could have been more efficient.
I wanted to use XML includes in item_photo.xml to break that UI down into smaller re-usable components. But butterknife crashes if I try to include a layout and give that layout an id like:
<include layout="@layout/item_comment"
android:id="@+id/tvFirstComment"
android:layout_below="@+id/tvCaption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="5dp"/>
It can't find a field with the id tvFirstComment
I grabbed an image off the web that was too large. I had to resort to using Picasso to resize the image down to what I wanted. This is inefficient.
Picasso.with(getContext()).load(R.drawable.small_like_heart)
.resize(20, 0)
.into(viewHolder.likeHeartImageView);
Should I have been able to do that in the xml without involving Picasso? I struggled to get the right scaleType that would scale it to 20px without distortion or adding white space around the image.
The GSON library was great - I was easily able to construct all of my models without parsing the JSON response directly. One downside is the model hierarchy has to exactly match the JSON hierarchy for everything to work.
I overrode the default theme with custom colors that matched instgram's color palette and that worked well. But I was trying to figure out where to put generic padding constants. For instance, many of the elements in a list view cell for an instagram post have the same left and right padding (20dp) values. I wanted to put that value in one place and then refer to it by name in the layout.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.