in my main view i have
public class PlayersActivity extends Activity {
ViewFlipper flipper;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.playercontainer);
flipper = (ViewFlipper) findViewById(R.id.flipper);
}
}
with this view
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<include android:id="@+id/first" layout="@layout/first" />
<include android:id="@+id/second" layout="@layout/playerdetailsview" />
</ViewFlipper>
It displays the first view correctly but i want it to be connected to a java class so i created an FirstActivity class where i can control all my components in the first view but how do i attach the first.xml layout with the FirstActivity java class ?