Views with same ids getting the same attrs when restored
<p>I have a custom component with one RadioGroup that has two RadioButton, ids <code>@+id/radioButton1</code> and <code>@+id/radioButton2</code>. On the other hand, there is a TabActivity with five tabs. On each tab, this component is used more than one time.</p>

<p>Here's the problem, when orientation changes and the activity is recreated, all of the RadioButton is loaded with the same attrs, this includes <code>android:text</code>, <code>android:margin</code> and even the styled attrs that i've created. It also happens with all the CheckBox that has the same ids. </p>

<p>I spent some time trying to discover why this was happening and concluded that android is doing that in onRestoreInstanceState. If I comment the line that calls the super method it works fine. </p>

<pre><code>@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    // super.onRestoreInstanceState(savedInstanceState);

}
</code></pre>

<p>Is this how it's supposed to be? Or what could one do to cause this?</p>

<p>I'm guessing that it's not a normal behaviour because when a custom view is created, it inflates the same layout with the same views that has the same ids. So it's not possible to instantiate a new custom view generating different ids for its child every time. Using the code above or <code>android:configChanges</code> on the manifest seems to be a bad workaround to me. So, any help is appreciated.</p>
