The Reason
I need to do this because I want to get the drawable cache of the fragment's view and then create a Bitmap from that view. This Bitmap will then be used to publish on Facebook.
The Problem
When I create my Fragment's the views are not being created because they haven't been added via a Fragment Transaction and because the view's they contain aren't visible to the user.
I also do not want to have to draw these views manually as I will not get an exact replica of the screen.
My Question
Is there a way to have full functionality (the same functionality as if you were to add it via a FragmentTransaction) of the Fragment without the fragment actually being shown?
I need to be able to access the fragment's view when it isn't visible.
Thanks In Advance
Another question addresses how to render activities into offscreen buffers. You can use this technique to render a fragment into an offscreen buffer.
The technique involves:
Does the answer I gave here also apply to your situation too? Basically it uses different methods of FragmentTransaction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With