You should keep following in mind (in regard to your original SO code snippet);

1. Once you add the fragment containing map, and call commit(), the fragment IS 
NOT added right away. See FragmentManager.executePendingTransactions() for 
executing the commit() asap.

2. If you still cannot get the proper non null Map reference, try doing it on 
Fragment.onResume() instead. I believe this is the final chance to get the map 
object without using a handler..

—
H

On 11 Dec 2013, at 12:24, surabhi jain <surabhi17.j...@gmail.com> wrote:

> Hi,
> Thanks for the reply,I have do that but still I am getting same issue.
> 
> I have use Handler for getting google map value, code as on below link
> http://stackoverflow.com/questions/19219255/supportmapfragment-getmap-returns-null
> 
> Scenario is as follows:
> I am displaying map in fragment inside view pager,with detail fragment,for 
> map I have created fragment dynamically. I am using single activity so each 
> screen is represented by a Fragment. NewsDetailsFragment includes a ViewPager 
> (map).
> 
> When I navigate to the NewsDetailsFragment initially, the map is loaded, now 
> if I load a new instance of the NewsDetailsFragment like on scrolling pager I 
> am displaying my next record. The ViewPager in the 2nd NewsDetailsFragment 
> wont display the map. In LogCat,Log shows that everything works fine, map is 
> displaying and markers get set. But on place of map showing black screen.
> 
> Is there any way to get google map value without using Handler in Fragment?
> 
> 
> On Wed, Dec 11, 2013 at 4:34 PM, VenomVendor™ <yoganandh2...@gmail.com> wrote:
> Have you solved it, if not.
> 1. Null the Map.
> 2. Destroy the fragment overriding in onDestroy method.
> 
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- 
> Thanks & Regards
> Surabhi Jain
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to