Hi I want to emulate snapchat. Where the camera fragment have no title bar using:
onCreate
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main)
But when I swipe to the left fragment or right fragment I want the title bar to appear.
How do I do this?
Thank you for your time.
Clarify:
When the pager switch, to another item, or the main activity switch fragment I want to show the title bar.
I'm currently using FragmentPagerAdapter to emulate snapchat. Where you start at the camera fragment and if you swipe/fling left or right, you get another fragment. The transition between fragments is carousel like, unlike calling activity with another activity where the transition between the activity is more of a popup.
Unfortunately, switching between fragment, doesn't invoke different onCreate hookmethod so I cannot hide or show the window title depending on the fragment (I can do this with activity). So I want to know how would I do this with fragment.
I'm using compat v4.