@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_favorites);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    ActionBar ab = getSupportActionBar();
    ab.setDisplayShowTitleEnabled(false);
    ab.setIcon(R.mipmap.ab_icon);
    ab.setDisplayHomeAsUpEnabled(true);
    ab.setHomeAsUpIndicator(null);

    model = new FavoritesModelDBImpl(this);
    lv = (ListView) findViewById(R.id.favorites_lv);
    lv.setEmptyView(findViewById(R.id.empty_view));

    api = new BikeClient(this);
    api.setResponseHandler(this);
    api.fetch();
  }
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   int id = item.getItemId();
   Intent intent;
   switch (id) {
     case R.id.action_refresh:
       findViewById(R.id.toolbar_progress_bar).setVisibility(View.VISIBLE);
       api.fetch();
       return true;
     case R.id.action_attribution:
       intent = new Intent(this, AttributionActivity.class);
       startActivity(intent);
       break;
   }
   return super.onOptionsItemSelected(item);
 }