title: How to change parent's custom toolbar Title when refresh its child Fragment
body: <p>I have a <code>viewPager</code> inside a fragment and the <code>vievPager</code> contains 2 child fragments.</p>
  
  <p>I setup a custom toolbar in parent fragment with custom layout. when I swipe any child fragment I refresh child fragment. when I refresh each time, I want to change parent fragments title with different values available in child fragment.</p>
  
  <p>Parent Fragment</p>
  
  <pre><code>public class FragmentDiscoverBase extends Fragment {
  
      public FragmentDiscoverBase() {
          // Required empty public constructor
      }
  
      //ViewPager viewPager;
      CustomViewPager viewPager;
      TabLayout tabLayout;
  
      String title1 = "";
  
      @Override
      public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          View view = inflater.inflate(R.layout.fragment_fragment_discover_base, container, false);
  
          //Find custom view pager
          viewPager = view.findViewById(R.id.customViewPager);
          //Disable horizontal swipe on view pager
          viewPager.setPagingEnabled(false);
  
  
                  title1 = "   Location   ";
  
  
          //Custom action bar with
          showActionBar(title1);
          ((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false);
          setHasOptionsMenu(true);
  
          setupViewPager(viewPager, title1, title2);
  
          tabLayout = (TabLayout) view.findViewById(R.id.tabs);
          tabLayout.setupWithViewPager(viewPager);
  
  
          return view;
      }
  
  
      private void setupViewPager(ViewPager viewPager, String title1, String title2) {
          ViewPagerAdapter adapter = new ViewPagerAdapter(getChildFragmentManager());
          adapter.addFragment(new FragmentDiscover(), title1);
          adapter.addFragment(new FragmentDiscoverUpcoming(), title2);
          viewPager.setAdapter(adapter);
      }
  
      class ViewPagerAdapter extends FragmentPagerAdapter {
          private final List&lt;Fragment&gt; mFragmentList = new ArrayList&lt;&gt;();
          private final List&lt;String&gt; mFragmentTitleList = new ArrayList&lt;&gt;();
  
          public ViewPagerAdapter(FragmentManager manager) {
              super(manager);
          }
  
          @Override
          public Fragment getItem(int position) {
              return mFragmentList.get(position);
          }
  
          @Override
          public int getCount() {
              return mFragmentList.size();
          }
  
          public void addFragment(Fragment fragment, String title) {
              mFragmentList.add(fragment);
              mFragmentTitleList.add(title);
          }
  
          @Override
          public CharSequence getPageTitle(int position) {
              return mFragmentTitleList.get(position);
          }
      }
  
      //Set action bar title with custom font
      private void showActionBar(String mLocation) {
  
          LayoutInflater inflator = (LayoutInflater) getActivity().getSystemService(LAYOUT_INFLATER_SERVICE);
          View v = inflator.inflate(R.layout.custom_toolbar, null);
          android.support.v7.app.ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
  
          actionBar.setDisplayHomeAsUpEnabled(false);
          actionBar.setDisplayShowHomeEnabled(false);
          actionBar.setDisplayShowCustomEnabled(true);
          actionBar.setDisplayShowTitleEnabled(false);
  
          final TextView titleDiscover = v.findViewById(R.id.titleDiscover);
  
  
          if (isAdded()) {
                  titleDiscover.setText(mLocation);
          }
  
          actionBar.setCustomView(v);
      }
  }
  </code></pre>
  
  <p>Child Fragment</p>
  
  <pre><code>public class FragmentDiscover extends Fragment {
  
      private SwipeRefreshLayout swipeRefreshLayout;
      EditText etLocation;
  
      public static FragmentDiscover newInstance() {
          FragmentDiscover fragment = new FragmentDiscover();
          return fragment;
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
      }
  
      //Auto call offer when Internet available
      @Override
      public void onResume() {
          super.onResume();
      }
  
      @Override
      public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          View view = inflater.inflate(R.layout.fragment_fragment_discover, container, false);
  
          etLocation = view.findViewById(R.id.etLocation);
          swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_layout);
  
          //How can I set toolbar title on FragmentDiscoverBase, from etLocation input view
  
          //Swipe to refresh function
          swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
              @Override
              public void onRefresh() {
  
                  //I Want to chnage 'FragmentDiscoverBase' title to default from here
  
              }
          });
  
          return view;
      }
  }
  </code></pre>
  
  <p>Please can anyone help me? Thanks in advance. </p>