title: Android: ViewPager with ImageView
body: <p>I´m new in working with <code>ViewPager</code>. So i took a tutorial and it all works now. After the tutorial, I have a <code>ViewPager</code> with a TextView on it. 
  Now, I want to add an <code>ImageView</code> to this <code>TextView</code>. Where do I have to start? </p>
  
  <p>Here´s my code:</p>
  
  <pre><code>public static final MyFragment newInstance(String message){
      MyFragment f  = new MyFragment();
      Bundle bdl = new Bundle(1);
      bdl.putString(EXTRA_MESSAGE, message);
      f.setArguments(bdl);
      return f;
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
  Bundle savedInstanceState) {
      String message = getArguments().getString(EXTRA_MESSAGE);
      View v = inflater.inflate(R.layout.activity_my_fragment, container, false);
      TextView messageTextView = (TextView)v.findViewById(R.id.tvTest);
      messageTextView.setText(message);
  
  return v;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code> public class Bilderbuch extends FragmentActivity {
          MyPageAdapter pageAdapter;
          int id;
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_bilderbuch);
              id = getIntent().getIntExtra("kinderid", 0);
              List&lt;Fragment&gt; fragments = getFragments();
  
              pageAdapter = new MyPageAdapter(getSupportFragmentManager(), fragments);
  
              ViewPager pager = (ViewPager)findViewById(R.id.viewpager);
              pager.setAdapter(pageAdapter);
  
          }
  
          private List&lt;Fragment&gt; getFragments(){
              List&lt;Fragment&gt; fList = new ArrayList&lt;Fragment&gt;();
  
              DBHelper dbh = new DBHelper(this);
              Cursor c = dbh.selectEreignis(id);
              int i = 0;
               while(c.moveToNext())
               { 
                   fList.add(MyFragment.newInstance(c.getString(c.getColumnIndex("ereignisname"))));
                   i++;
               }
              fList.add(MyFragment.newInstance("Fragment 1"));
              fList.add(MyFragment.newInstance("Fragment 2"));
              fList.add(MyFragment.newInstance("Fragment 3"));
  
              return fList;
          }
  
          private class MyPageAdapter extends FragmentPagerAdapter {
              private List&lt;Fragment&gt; fragments;
  
              public MyPageAdapter(FragmentManager fm, List&lt;Fragment&gt; fragments) {
                  super(fm);
                  this.fragments = fragments;
              }
              @Override
              public Fragment getItem(int position) {
                  return this.fragments.get(position);
              }
  
              @Override
              public int getCount() {
                  return this.fragments.size();
              }
          }
  </code></pre>