I’m trying to use SafeViewFlipper (http://pastie.org/1086467) Crash when rotating Activity using ViewFlipper
but I don’t know how to do it..
When I try this the application crashes (ClassCastException)
SafeViewFlipper controlsFlipper;
controlsFlipper = (SafeViewFlipper) findViewById(R.id.controlsFlipper);
in the layout.xml..
<ViewFlipper android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/controlsFlipper">
Reference the SafeViewFlipper in xml with the full package name. E.g.
<com.example.view.SafeViewFlipper android:layout_width="fill_parent" ..... />