lawloretienne / ImageGallery

A gallery used to host an array of images
Apache License 2.0
645 stars 116 forks source link

Toolbar hiding fragment #35

Open DerkSchooltink opened 6 years ago

DerkSchooltink commented 6 years ago

I was wondering if it's at all possible to hide the toolbar of the fragment activity in code. I could write my own implementation of the xml layout of the fragment, but that requires a lot of work.

This is how I'm currently starting the fragment:

private fun imageGalleryInitializer(): ImageGalleryFragment {
            val fragment = ImageGalleryFragment()
            val images = 

            val bundle = Bundle().apply {
                putStringArrayList(ImageGalleryFragment.KEY_IMAGES, ArrayList(images))
                putString(ImageGalleryFragment.KEY_TITLE, "Unsplash Images")
            }

            fragment.arguments = bundle

            return fragment
}

If I could give as parameter in putString() some sort of value to hide the toolbar, that would be the ideal situation. Let me know if this is at all possible!

DerkSchooltink commented 6 years ago

I've written my own implementation from a fork of your repository. I've also submitted the pullrequest.

You can find the PQ here: https://github.com/lawloretienne/ImageGallery/pull/36