i have been following this tutorial for the pagerAdapter.
http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/
My problem is that i dont want only to have a different layout for every page but i would like to create a new activity in order to have some java code connected with every layout.Is it possible?
You can’t assign different Activities to the pages of a ViewPager. You can, however, assign different Fragments, which should be enough. Check out the docs about the FragmentPagerAdapter class.