graphics working but nullpointer in xml