Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

How do I create a Tutorial overlay over an google map fragment ?

Hi i have an google maps fragment on my main activity.

fragment android:name="com.google.android.gms.maps.SupportMapFragment" android:id="@+id/map_fragment" android:layout_width="fill_parent" android:layout_height="fill_parent"

this is within a RelativeLayout activity.

now I want to set an overlay the firsttime the user starts the app. i found this to use:

FrameLayout mFrame; mFrame = new FrameLayout(this); mFrame.addView(LayoutInflater.from(getBaseContext()).inflate(R.layout.activity_maps, null)); setContentView(mFrame);

final View tutView = LayoutInflater.from(getBaseContext()).inflate(R.layout.activity_help, null); mFrame.addView(tutView);

this is working on a "normal" relativelayout activity but when I add the google fragment I get an error. "android.view.InflateException: Binary XML file line #16: Error inflating class fragment"

I just want to have some sort of help in my app maybe I should do this differently ?

thanks in advantage for any input !