private boolean setAltText() { // If the user selected the menu item for the first time, show the toast if (PrefHelper.showAltTip()) { Toast toast = Toast.makeText(getActivity(), R.string.action_alt_tip, Toast.LENGTH_LONG); toast.show(); /*SharedPreferences.Editor mEditor = mSharedPreferences.edit(); mEditor.putBoolean("alt_tip", false); mEditor.apply();*/ PrefHelper.setAltTip(false); } TextView tvAlt = (TextView) mPager.getChildAt(sFavoriteIndex).findViewById(R.id.tvAlt); tvAlt.setText(PrefHelper.getAlt(sFavorites[sFavoriteIndex])); toggleVisibility(tvAlt); return true; }