support orientation changes

I complete the work of orientation changes