public static void showTipIfNotShownYet(BaseFragment fragment, String tipText) { init(fragment.getActivity()); PrefsHelper pHelper = new PrefsHelper(fragment.getActivity()); if (!pHelper.isPrefExists(fragment.getClass().getName())) { pHelper.savePref(fragment.getClass().getName(), true); showTip(fragment.getActivity(), tipText, null, null); } }
public static void showTipWithButtonsIfNotShownYet( BaseFragment fragment, String tipText, View.OnClickListener listener) { if (isJustLogined) { isJustLogined = false; return; } init(fragment.getActivity()); PrefsHelper pHelper = new PrefsHelper(fragment.getActivity()); if (pHelper.isPrefExists(fragment.getClass().getName())) { return; } pHelper.savePref(fragment.getClass().getName(), true); String title = fragment.getActivity().getString(R.string.tip_friend_list_button); showTip(fragment.getActivity(), tipText, listener, title); }