title: DialogFragment From RecyclerView
body: <p>now i have new problem ..... i don't know how initialize dialogfragment in recyclerview and recyclerview in fragment , so who know haw to make it ?</p>
  
  <p>Fragment code:</p>
  
  <pre><code>public View onCreateView( LayoutInflater inflater,  ViewGroup container3,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      View v =inflater.inflate(R.layout.fragment_one_day_tasks,container3,false);
      final View vd =inflater.inflate(R.layout.dialogod,null);
      TextView textView= (TextView) v.findViewById(R.id.ActiveMenu);
      TextView textView1= (TextView) v.findViewById(R.id.Alert);
      database = new Database(v.getContext());
      mId = database.getLastIdOD();
      if(mId&gt;=1) {
          oneDayList = database.getOneDayList(1);
      }
      database.close();
  
      //dlg1 = new DialogFragment();
      //GridView gridView = (GridView) v.findViewById(R.id.gridViewActiveOd);
      RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.gridResc);
  
      if(0&lt;mId){
          recyclerView.setLayoutManager(new GridAutofitLayoutManager(v.getContext(),350));
          recyclerView.setAdapter(new adapterRecylcerViewGridODN(v.getContext(),oneDayList,inflater));
       /*   gridView.setAdapter(new GridOdAdapter(v.getContext(),oneDayList));
          gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                                      final int position, long id) {
                  tapOnAlert(vd,position);
              }
          });*/
      }else{
          textView1.setText("You Haven't got any Active Tasks !");
      }
  
      FloatingActionButton fab = (FloatingActionButton) v.findViewById(R.id.fabCreateOd);
      fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              getActivity().finish();
              Intent intent = new Intent(getActivity().getApplicationContext(),CreateOneDayNotif.class);
              intent.putExtra("mId",1 + database.getLastIdOD());
              startActivity(intent);
              Snackbar.make(view, "New Task", Snackbar.LENGTH_LONG)
                      .setAction("Action", null).show();
          }
      });
      return v;
  }
  </code></pre>
  
  <p>RecyclerView Adapter code:</p>
  
  <pre><code>public void onBindViewHolder(SimpleViewHolder holder, final int position) {
      holder.title.setText(mItems.get(position).getTitle());
      datecount = new Datecount(mItems.get(position).getDateAndTime());
      long minute = datecount.getMinuteInt();
      long hour=datecount.getHourInt();
      long day=datecount.getDayInt();
      long year=datecount.getYearInt();
      long month=datecount.getMonthInt();
      holder.dataAtime.setText("On date: " + day+"/"+month+"/"+year+ " On time: "+hour+":"+minute);
      int iconResId = mContext.getResources().getIdentifier(mItems.get(position).getIcon(), "drawable", mContext.getPackageName());
      holder.image.setImageResource(iconResId);
      GradientDrawable bgShape = (GradientDrawable) holder.circle.getDrawable();
      bgShape.setColor(Color.parseColor(mItems.get(position).getColour()));
      holder.mView.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              //I want to put here dialog.show
            //I want to put here dialog.show
  
      }
         });
  </code></pre>
  
  <p>And DialogFragment code:</p>
  
  <pre><code>   public class DialogFragmentOd extends DialogFragment {
  
       boolean isFabOpen;
       Animation fab_open,fab_close,rotate_forward,rotate_backward;
     List&lt;OneDayTD&gt; oneDayList;
     int  position;
     Database database;
  
  
  public static DialogFragmentOd getInstance() {
      DialogFragmentOd dialog = new DialogFragmentOd();
      //Bundle arguments = new Bundle();
  
      //arguments.putParcelable(Person.class.getName(), person);
      //dialog.setArguments(arguments);
      return dialog;
  }
  
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View vd = inflater.inflate(R.layout.dialogod, null);
      .........
   getDialog().setContentView(layout);
     return vd;
   }
  }
  </code></pre>
  
  <p>So what i need to do ???</p>