title: fragment does not refresh when back button is pressed
body: <p>how can i refresh the view of a fragment, when the back button is pressed?</p>
  
  <p>I've tried this in the onResume method of the fragment but it doesn't work.</p>
  
  <p>Ok, here is the code</p>
  
  <p>the layout look like: </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="horizontal"
  android:background="@color/mainscreen_bg"&gt;
  
  &lt;fragment
      android:id="@+id/topbar"
      android:name="de.app.applib.TopbarFragment"
      android:layout_width="match_parent"
      android:layout_height="@dimen/topbar_height"
      android:layout_alignParentTop="true"
      tools:layout="@layout/fragment_topbar" /&gt;
  
   &lt;fragment
      android:id="@+id/position_list"
      android:name="de.app.applib.CriteriaListFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:layout_below="@id/topbar"
      android:tag="CriteriaList"
      tools:layout="@layout/fragment_criterialist" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>The TopbarFragment has the following layout:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/topbar_bg" &gt;
  
  &lt;ImageView android:id="@+id/topbar_home"
      android:layout_height="match_parent"
      android:layout_width="wrap_content"
      android:layout_alignParentLeft="true"
      android:gravity="center_vertical"
      android:src="@drawable/ic_ab_back_holo_light"
      android:visibility="invisible"
      android:padding="0dp"
      android:contentDescription="@string/none"
      android:layout_margin="0dp"/&gt;
  &lt;ImageView  android:id="@+id/topbar_logo"
      android:src="@drawable/actionbar_logo"
      android:layout_height="30dp"
      android:layout_width="120dp"
      android:layout_centerVertical="true"
      android:padding="0dp"
      android:layout_margin="0dp"
      android:contentDescription="@string/none"
      android:layout_toRightOf="@id/topbar_home"/&gt;
  
  
  &lt;ToggleButton
      android:id="@+id/topbar_btn_push_abo"
      android:layout_width="40dp"
      android:layout_height="match_parent"
      android:layout_alignBottom="@+id/topbar_btn_info"
      android:layout_toLeftOf="@id/topbar_btn_info"
      android:background="@drawable/topbar_btn_push_bg"
      android:paddingTop="@dimen/padding_topbar_btn_push"
      android:textOff=""
      android:textOn=""
      android:textSize="12sp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>In the onCreateView() of the Fragment i set the textOn and textOff values of the toggleButton.</p>
  
  <p>This Fragment is included in all activities.</p>
  
  <p>Now, i want to update the text of the toggleButton when the user pressed the back button.
  I set the new text in the onResume() Method of the Fragment. This Method is called but the old text appears in the activity and not the new updated text.</p>
  
  <pre><code> @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
      Log.d(TAG,"onCreateView called");
      View v = inflater.inflate(ResourceUtils.getCustomizableLayoutID(getActivity(), "fragment_topbar"), container, false);
      subscrButton = (ToggleButton) v.findViewById(R.id.topbar_btn_push_abo);
      setCountOfNewAdds();
  
  
  
      private void setCountOfNewAdds() {
      int countOfNewAds = ((App)getActivity().getApplication()).getCountOfNewAds();
      subscrButton.setTextOff(countOfNewAds&gt;0?""+countOfNewAds:"");
      subscrButton.setTextOn(countOfNewAds&gt;0?""+countOfNewAds:"");
      subscrButton.invalidate();
  }
  
      @Override
  public void onResume() {
      super.onResume();
      setCountOfNewAdds();
  }
  </code></pre>