Hide/Show floating action button during FragmentTransection
<p>I have this code for open some Message Fragment.</p>

<pre><code>private void openMessage(int position) {
    MessageRecord item = data.get(position);
    item.setIsRead(true);
    item.save();
    List&lt;MessageRecord&gt; tmp = new ArrayList&lt;&gt;(data);
    updateScreen(tmp);

    MessagesActivity2 parentActivity = ((MessagesActivity2) context);
    parentActivity.fab.hide();
    FragmentTransaction ft = parentActivity.getSupportFragmentManager().beginTransaction();

    ft.addToBackStack(null);
    MessageFragment fragment1 = MessageFragment.newInstance(item);
    ft.add(R.id.frame, fragment1);

    ft.commit();

}
</code></pre>

<p>And this line hides my fab.
    parentActivity.fab.hide();</p>

<p>But I can't figure out how to reopen my FAB after I press Back button and return to the view of the activity.</p>