title: Java Generic from Activity to fragment to adapter
body: <p>I am working in android app, have designed a generic adapter and parameterized adapter will inherit this.</p>
  <pre><code>public abstract class CarAdapter&lt;T&gt; extends RecyclerView.Adapter&lt;CarAdapter&lt;T&gt;.BaseCarViewHolder&gt; {
      protected DialogMakerCar&lt;T&gt; dialogMaker;
      protected Context context;
  ......
  </code></pre>
  <p>child class</p>
  <pre><code>public class CarItemAdapter extends CarDialogAdapter&lt;Item&gt; {
  
      public CarItemAdapter(Context context, DialogMakerCar&lt;Item&gt; dialogMaker) {
          super(dialogMaker, context);
      }
  </code></pre>
  <p>I am calling this adapter in a fragment and that fragment is also need to be generic so that i can call this fragment and adapter for custom objects from activity.</p>
  <pre><code>//Fragment to call adapter but its not letting me to use &lt;T&gt; generic 
   adapter = new CarItemAdapter(getContext(),dialogMaker);
          gridRecycler.setHasFixedSize(true);
          gridRecycler.setLayoutManager(adapter.getLayoutManager());
  </code></pre>
  <p>Please let me know if you need more details, Thanks</p>