public static NewsTeeInstructionsDialogFragment newInstance(
     int icon_id, String title, String message, boolean isWelcome) {
   Bundle args = new Bundle();
   args.putInt(EXTRA_ICON_ID, icon_id);
   args.putString(EXTRA_TITLE, title);
   args.putString(EXTRA_MSG, message);
   args.putBoolean(EXTRA_IS_WELCOME, isWelcome);
   NewsTeeInstructionsDialogFragment fragment = new NewsTeeInstructionsDialogFragment();
   fragment.setArguments(args);
   return fragment;
 }
Ejemplo n.º 2
0
  public void showDialog() {
    if (!isFirstTime()) {
      return;
    }

    FragmentManager fm = getActivity().getSupportFragmentManager();
    NewsTeeInstructionsDialogFragment dialog =
        NewsTeeInstructionsDialogFragment.newInstance(
            R.drawable.play,
            getResources().getString(R.string.tab_play_list),
            getResources().getString(R.string.instructions_lenta),
            true);
    dialog.show(fm, NewsTeeInstructionsDialogFragment.DIALOG_INSTRUCTIONS);
  }