Giter VIP home page Giter VIP logo

newyorktimessearch's People

Contributors

smacgregor avatar smacgregorz avatar

Watchers

 avatar

newyorktimessearch's Issues

Week 2 Project: News Reader Powered by the New York Times

My app is complete, please review. /cc @codepathreview @codepath

This was a fun project. I particularly enjoyed working with RecyclerViews / staggered grid layouts.

Interesting Notes

  • Leveraged the fact that enums are classes in Java to data drive processing of search filter criteria. This made it easy to add an extra sort order (relevance) and an additional news desk (like Foreign)
  • I like Picasso more than Glide - maybe I'm just biased by the smaller library size.
  • Instead of picking a random thumbnail for the staggered grid layout - I first filtered out small thumbnail images as they are too small to look good on a high res mobile device. Thought this looked better overall.
  • The RecyclerView Animators library is really sweet. I had fun trying out different adapter animations.

Open Questions

  1. Use of anonymous functions. I tend to keep methods in classes flat instead of using anonymous methods inside of other methods.

Instead of doing this:

searchResultsView.addOnScrollListener(new EndlessRecyclerViewScrollListener(linearLayoutManager) {
          @Override

public void onLoadMore(int page, int totalItemsCount) {
        
       loadMoreSearchResults(page);
    
}
});

I tend to have:

    @Override
    public void onItemClick(View view, int position) {
        *snip*
    }

    @Override
    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
        *snip*
    }

    @Override
    public boolean onQueryTextSubmit(String query) {
       *snip*
    }

Is one style preferred over the other in Android? I find the flat list of methods easier to read.

  1. Can we bind elements in onCreateOptionsMenu? Butterknife crashed for me here:
@Bind(R.id.menu_item_search) MenuItem mSearchMenuItem;

I understand why it crashed and I don't think there's a way to make it word but wanted to ask.

  1. It was a little frustrating that in order to use the Parceler library I had to make my model's member variables public.
  2. Using Glide I found I still needed to use a DynamicHeighImageView element to get the resizing to work right. One of the advantages of Glide is how it handles resizing. Should I have been able to optimize away my use of DynamicHeighImageView with Glide?

From the if I had more time department

  • Wish I had time to investigate how to use https://github.com/afollestad/material-dialogs to improve styling of the search filter fragment
  • Progress spinners inside the RecyclerView when loading more results
  • Progress spinner when searching for results

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.