title: Different items on the listview of the viewpager - Android
body: <p>I am Working on the <code>quiz application</code>. Here I am using <code>Viewpager indicator</code>.In this I have implemented <code>listview with radio button</code>.</p>
  
  <p>My question is,How can I got the <code>diffent values</code> for listviews on every page of the <code>viewpager</code>.</p>
  
  <p>I tried Google,But I don't find solution. Please help me. Thank You</p>
  
  <p>see below Images:</p>
  
  <p><img src="https://i.stack.imgur.com/kGKJE.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/tydSx.png" alt="enter image description here"></p>
  
  <p>Check My code :</p>
  
  <pre><code> class PagerAdapter extends FragmentPagerAdapter implements SwipeyTabsAdapter{
  
      public final String[] list = new String[]
          {"Operating System", "Product Of Google", "Both Above", "None of above"}
  ; 
  
      private final Context mContext;
  
      public PagerAdapter(Context context, FragmentManager fm) {
          super(fm);
  
          this.mContext = context;
      }
  
  
      @Override
      public Fragment getItem(int pos) {
  
          return ItemFragment.newInstance(QUES[pos]);
          //return ItemFragment.newInstance(QUES[pos % TITLES.length]);
  
      }
  
      @Override
      public int getCount() {
          return TITLES.length;
      }
  
      public TextView getTab(final int position, SwipeyTabs root) {
          TextView view = (TextView) LayoutInflater.from(mContext).inflate(
                  R.layout.swipey_tab_indicator, root, false);
          view.setText(TITLES[position]);
          view.setOnClickListener(new OnClickListener() {
              public void onClick(View v) {
                  mViewPager.setCurrentItem(position);
  
              }
          });
          return view;
      }
  
  
  }
  
  public static class ItemFragment extends  Fragment{
  
      static ItemFragment newInstance(String title) {
          ItemFragment f = new ItemFragment();
  
          // Supply num input as an argument.
          Bundle args = new Bundle();
  
          args.putString("title",title);
          f.setArguments(args);
  
          System.out.println("value of the title : ================&gt;"+title);
          return f;
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View v = inflater.inflate(R.layout.view_question, container, false);
          View tv = v.findViewById(R.id.text);
          final View listvw = v.findViewById(R.id.listview);
  
           final String title = getArguments().getString("title");
           ((TextView)tv).setText(title);
  
          ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(getActivity(),android.R.layout.simple_list_item_single_choice, list);
          ((ListView) listvw).setAdapter(adapter);
          ((ListView) listvw).setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  
          return v;
      }
  
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
          super.onActivityCreated(savedInstanceState);
  
  
      }
  
      public void onListItemClick(ListView l, View v, int position, long id) {
  
          Log.i("FragmentList", "Item clicked: " + id);
  
      }
  }
  </code></pre>