{"action":"opened","issue":{"url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/121","labels_url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/121/comments","events_url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/121/events","html_url":"https://github.com/florent37/MaterialViewPager/issues/121","id":97649318,"number":121,"title":"OnRotation toolbar losses properties","user":{"login":"Ashok-Varma","id":9069318,"avatar_url":"https://avatars.githubusercontent.com/u/9069318?v=3","gravatar_id":"","url":"https://api.github.com/users/Ashok-Varma","html_url":"https://github.com/Ashok-Varma","followers_url":"https://api.github.com/users/Ashok-Varma/followers","following_url":"https://api.github.com/users/Ashok-Varma/following{/other_user}","gists_url":"https://api.github.com/users/Ashok-Varma/gists{/gist_id}","starred_url":"https://api.github.com/users/Ashok-Varma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ashok-Varma/subscriptions","organizations_url":"https://api.github.com/users/Ashok-Varma/orgs","repos_url":"https://api.github.com/users/Ashok-Varma/repos","events_url":"https://api.github.com/users/Ashok-Varma/events{/privacy}","received_events_url":"https://api.github.com/users/Ashok-Varma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-28T08:48:40Z","updated_at":"2015-07-28T08:48:40Z","closed_at":null,"body":"My Activity code:\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_movie_details_news_stand);\r\n        setTitle(\"\");\r\n\r\n        mViewPager = (MaterialViewPager) findViewById(R.id.materialViewPager);\r\n\r\n        toolbar = mViewPager.getToolbar();\r\n        mDrawer = (DrawerLayout) findViewById(R.id.drawerLayout);\r\n\r\n        if (toolbar != null) {\r\n            setSupportActionBar(toolbar);\r\n\r\n            final ActionBar actionBar = getSupportActionBar();\r\n            if (actionBar != null) {\r\n                actionBar.setDisplayHomeAsUpEnabled(true);\r\n                actionBar.setDisplayShowHomeEnabled(true);\r\n                actionBar.setDisplayShowTitleEnabled(true);\r\n                actionBar.setDisplayUseLogoEnabled(false);\r\n                actionBar.setHomeButtonEnabled(true);\r\n            }\r\n        }\r\n\r\n        DrawerFragment drawerFragment = (DrawerFragment) getSupportFragmentManager().findFragmentById(R.id.drawerFragment);\r\n        drawerFragment.setUp(mDrawer, toolbar);\r\n\r\n        volleySingleton = VolleySingleton.getInstance();\r\n        requestQueue = volleySingleton.getRequestQueue();\r\n\r\n        long movieID = getIntent().getLongExtra(INTENT_EXTRA_MOVIE_ID, 1);\r\n        String title = getIntent().getStringExtra(INTENT_EXTRA_MOVIE_TITLE);\r\n\r\n        generateFragments();\r\n\r\n        mViewPager.getViewPager().setAdapter(new movieDetailsPagerAdapter(getSupportFragmentManager()));\r\n\r\n        if (savedInstanceState != null) {\r\n            movieDetails = savedInstanceState.getParcelable(STATE_MOVIE_DETAILS);\r\n\r\n            if (movieDetails.server_timezone != null && !movieDetails.server_timezone.equals(\"N/A\")) {\r\n               mViewPager.setMaterialViewPagerListener(new MovieMaterialViewPagerListener());\r\n            } else {\r\n                sendJsonRequest(URLModifierclass.getMovieDetailsByIDURL(movieID, true, true));\r\n                mViewPager.setMaterialViewPagerListener(new DefaultMaterialViewPagerListener());\r\n            }\r\n        } else {\r\n            sendJsonRequest(URLModifierclass.getMovieDetailsByIDURL(movieID, true, true));\r\n            mViewPager.setMaterialViewPagerListener(new DefaultMaterialViewPagerListener());\r\n        }\r\n\r\n        mViewPager.getViewPager().setOffscreenPageLimit(mViewPager.getViewPager().getAdapter().getCount());\r\n        mViewPager.getPagerTitleStrip().setViewPager(mViewPager.getViewPager());\r\n\r\n        View view = mViewPager.getRootView();\r\n        TextView headerLogo = (TextView) view.findViewById(R.id.logo_white);\r\n        headerLogo.setText(title);\r\n\r\n        mViewPager.getViewPager().setCurrentItem(1);\r\n\r\n\r\n    }\r\n\r\n\r\n\r\nIs works well, if i open normally. But if i rotate the screen once. From then it shows all the below problems, even if i come to portriat. so when saveninstancestate!=null it fails.\r\n\r\nThe Problems\r\n1) it doesn't set title.\r\n2) I made viewpager_transparentToolbar=\"false\" but that is transparent.\r\n3) It doesn't set currentItem as 1\r\n\r\ni tried moving if block top the end of oncreate but still all problems exist\r\nAny Idea?\r\n"}}