@Override
    public boolean onPrepareOptionsMenu(Menu menu) {
        MenuItem logToggle = menu.findItem(R.id.menu_toggle_log);
        logToggle.setVisible(findViewById(R.id.sample_output) instanceof ViewAnimator);
        logToggle.setTitle(mLogShown ? R.string.sample_hide_log : R.string.sample_show_log);

        return super.onPrepareOptionsMenu(menu);
    }
A simple launcher activity containing a summary sample description, sample log and a custom
{@link android.support.v4.app.Fragment} which can display a view.
<p>
For devices with displays with a width of 720dp or greater, the sample log is always visible,
on other devices it's visibility is controlled by an item on the Action Bar.
SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/swiperefreshlayoutbasic/MainActivity.java