Three fragments with views that have the same id causing odd behavior
<p>I've created a viewpager which shows 3 similar fragments. These fragments have identical layout and the views in those layouts have the same id(eg: The RatingBar in DetailedPowerFragment has the id detailedRatingBar and so does the RatingBar in the DetailedWaterFragment)</p>

<p>However, when I attempt to set the value of the RatingBar with findViewById individually in each of the fragments it seems that a different RatingBar is found.</p>

<p>So </p>

<pre><code>        final RatingBar ratingBar = (RatingBar)getSherlockActivity().findViewById(R.id.ratingBar);
    ratingBar.setEnabled(false);
</code></pre>

<p>in DetailedWaterFragment, would set the RatingBar in DetailedPowerFragment. Below you will see the code creating the viewpager if that is relevant - But what is causing this issue? Do I need to give a new id to all of my views to ensure that this doesnt happen?</p>

<pre><code>    detailedFragments = new ArrayList&lt;SherlockFragment&gt;();

    detailedFragments.add(new DetailedPowerFragment());
    detailedFragments.add(new DetailedHeatFragment());
    detailedFragments.add(new DetailedWaterFragment());

    mMyFragmentPagerAdapter = new MyFragmentPagerAdapter(getSupportFragmentManager(), detailedFragments);
    mViewPager.setAdapter(mMyFragmentPagerAdapter);
</code></pre>
