title: How to refresh fragment on spinner on item selected
body: <p>I am setting a language in spinner on item selected. The change is not reflected on the next line. So, I want to refresh my fragment.</p>
  
  <pre><code>public class TodayChapter extends Fragment {
      String chapter_verse = "";
      TextView textView;
      ListView todayChapterListView;
      ArrayAdapter&lt;String&gt; adapter;
      DailyQuranMethods dailyQuranMethods = new DailyQuranMethods();
      private final String[] translateLanguage={"Translate To","English","Urdu","Hindi"};
  
      public TodayChapter() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          View view = inflater.inflate(R.layout.fragment_today_chapter, container, false);
  
          todayChapterListView = (ListView)view.findViewById(R.id.today_chapter_list_view);
          Spinner spinner = (Spinner)view.findViewById(R.id.selectLanguage);
          ArrayAdapter&lt;String&gt; spinnerArrayAdapter = new ArrayAdapter&lt;String&gt;(getActivity().getBaseContext(),   android.R.layout.simple_spinner_item, translateLanguage );
          spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view
          spinner.setAdapter(spinnerArrayAdapter);
          spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  switch (position)
                  {
                      case 0:
                          dailyQuranMethods.setTranslationLanguage(getActivity().getBaseContext(), "english");
                          break;
                      case 1:
                          dailyQuranMethods.setTranslationLanguage(getActivity().getBaseContext(),"english");
                          break;
                      case 2:
                          dailyQuranMethods.setTranslationLanguage(getActivity().getBaseContext(),"urdu");
                          break;
                      default:
                          dailyQuranMethods.setTranslationLanguage(getActivity().getBaseContext(),"hindi");
                          break;
  
                  }
  
              }
  
              @Override
              public void onNothingSelected(AdapterView&lt;?&gt; parent) {
  
              }
          });
          String[] chapter = dailyQuranMethods.getChapter(dailyQuranMethods.getChapterNoToday(getActivity().getBaseContext()), dailyQuranMethods.getTranslationLanguage(getActivity().getBaseContext()), getActivity());
  
          String chapterName = getActivity().getResources().getStringArray(R.array.chapters_name_arabic)[dailyQuranMethods.getChapterNoToday(getActivity().getBaseContext()) - 1 ];
  
          TextView textView = (TextView)view.findViewById(R.id.chapterName);
          textView.setText(chapterName);
          adapter =  new ArrayAdapter&lt;String&gt;(getActivity(),android.R.layout.simple_list_item_1,chapter);
  
          todayChapterListView.setAdapter(adapter);
  
          return view;
      }
  
  }
  </code></pre>
  
  <p>I can also call a method on each on item selected change. But, I want it by refreshing the fragment. In each switch case, I want to refresh the fragment. Please help me to solve this.</p>
  
  <p>Edit 1:</p>
  
  <p>There are three fragments, which are attached with the main activity:</p>
  
  <pre><code>mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
  
          mTabHost.addTab(mTabHost.newTabSpec("tab1").setIndicator("Today's Verse"),
                  TodayVerse.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("tab2").setIndicator("Today's Chapter"),
                  TodayChapter.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("tab3").setIndicator("Complete Qur'an"),
                  completeQuran.class, null);
  </code></pre>