title: How to close BottomSheetDialogFragment OnClick a button
body: <p>I made a fragment name <code>OrderYourFoodFragment</code> and inside of the fragment i place a <code>BottomDialogFragment</code> but issue is I placed a button on the <code>BottomDialogFragment</code> and I want when the button is press the condition is execute and the bottomfragment has to be close and fall back to <code>OrderYourFoodFragment</code> how can i achieve that</p>
  <p>I write this code in <strong>OrderYourFoodFragment</strong></p>
  <pre><code> red.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  DatabaseReference reference = FirebaseDatabase.getInstance().getReference(&quot;Users&quot;).child(mobile).child(&quot;predict&quot;);
                  reference.addValueEventListener(new ValueEventListener() {
                      @Override
                      public void onDataChange(@NonNull DataSnapshot snapshot) {
                          String order = snapshot.getValue(String.class);
                          int iorder = Integer.parseInt(order);
                          
                          if (iorder == 0){
                              BottomRedFragment bottomRedFragment = new BottomRedFragment();
                              bottomRedFragment.show(getChildFragmentManager(), bottomRedFragment.getTag());
                              
                          } else {
                              Toast.makeText(getActivity(), &quot;You are already Ordered your Food&quot;, Toast.LENGTH_SHORT).show();
                          }
                          
                      }
  
                      @Override
                      public void onCancelled(@NonNull DatabaseError error) {
  
                      }
                  });
  
  
              }
          });
  
  </code></pre>