How to call a function of fragment from custom adapter
<p>I have created a function in fragment. And I want to call that function when a button clicks which is in custom adapter but I am not able to call function of fragment from custom adapter.</p>

<p><b>My code for adapter is to click on a button and call fragment's function </b></p>

<pre><code>                 viewHolder.accept.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                removeListItem(viewHolder.order_card_layout, position);

                android.support.v4.app.Fragment newFragment = new NewPageActivity();
                android.support.v4.app.FragmentTransaction ft = ((FragmentActivity)mContext).getSupportFragmentManager().beginTransaction();

                 ft.sendorder(data.getorder_id());
                ft.add(R.id.framelay, newFragment).commit();


            }
        });
</code></pre>

<p><b>My function that is in fragment</b></p>

<pre><code>    public class NewPageActivity extends Fragment{
        public void SendOrder( String OrderId)
{

    final String serverid = sp.getString("serverid", "null");
    Log.e("TAG", "SendOrder: "+serverid +OrderId );
    new SendOrder().execute(new Config().addNewOrder, serverid, OrderId);
}
      }
</code></pre>