Go to Project->Clean in Eclipse, let it finish then run your application again, everything will work.
Eclipse caches your resource IDs based on the order of your views in the layout. If you change that around it is possible to get a classcastexception. Cleaning your project forces Eclipse to re-cache all your IDs properly.