title: Intent and startactivity don't work on onclick() in recyclerview Adapter
body: <p>Just toast works on <code>onClick()</code>, nothing else and I have made all entries in <code>AndroidManifest</code> too</p>
  
  <p><code>Intent</code> and <code>startActivity</code> don't work on <code>onClick()</code> in <code>RecyclerView</code> adapter whereas <code>Toast</code> works fine</p>
  
  <p>Here's my code</p>
  
  <pre><code>public class ForecastAdapter extends RecyclerView.Adapter&lt;ForecastAdapter.MyForecastViewHolder&gt; {
  public Context context;
  
  private LayoutInflater inflator;
  
  List&lt;Information&gt; data = Collections.emptyList();
  
  public ForecastAdapter(Context context, List&lt;Information&gt; data) {
      inflator = LayoutInflater.from(context);
      this.data = data;
      this.context = context;
  }
  
  @Override
  public MyForecastViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = inflator.inflate(R.layout.custom_row_forecast, parent, false);
      MyForecastViewHolder holder = new MyForecastViewHolder(view);
      return holder;
  }
  
  @Override
  public void onBindViewHolder(MyForecastViewHolder holder, final int position) {
      Information current = data.get(position);
      holder.title.setText(current.title);
      holder.icon.setImageResource(current.iconId);
  }
  
  
  @Override
  public int getItemCount() {
      return data.size();
  }
  
  class MyForecastViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
      TextView title;
      ImageView icon;
  
      public MyForecastViewHolder(View itemView) {
          super(itemView);
          itemView.setOnClickListener(this);
          title = (TextView) itemView.findViewById(R.id.temp);
          icon = (ImageView) itemView.findViewById(R.id.listIcon3);
      }
  
      @Override
      public void onClick(View v) {
          context.startActivity(new Intent(context,SubActivity.class));
      }
  }
  }
  </code></pre>