Adding Help overlay to your android app
For a developer developing android app, it is often a problem to explain features and functionalists of app. Users who downloads this apps often find them self clueless about what they can do with app and how to do certain actions. There are many ways in which this problems were address, to make user understand the functionality and working of apps developers have find out many ways, mainly
Putting a introduction screen where a new user flips through different functionality and features about the app like magazine (ANY.DO, Clear)
Putting up Help overlays or Coach marks on different screens explaining first time users what they do when they are at specif screen in the app (Pulse, ES file explorer )
First one got popular with TODO apps like Any.Do, Clear etc using it, it is not the best practice to use this approach
Second approach is more usable compare to first. Lets see how we can create Coach marks/Overlays on the top of android apps and helps user to discover app functionality.
Overlay can be simply achieved by putting up 2 layouts on the top of each other, In android this can be done by using Framelayout. Lets follow steps mention by Mark Murphy on this post at stackoverflow
http://stackoverflow.com/questions/10216937/how-do-i-create-a-help-overlay-like-you-see-in-a-few-android-apps-and-ics.
By the end of this tutorial, we will have a example Alarm application with Coach marks like this
Step #1:
// Create a new framelayout so that we can associate child layouts with it
final FrameLayout overlayFramelayout = new FrameLayout(getApplicationContext());
//Set the framelayout as root layout in your activity
setContentView(overlayFramelayout);
Step #2:
//Get the reference of your main layout and inflate it to frame layout
View view = getLayoutInflater().inflate(R.layout.activity_help_overlay, overlayFramelayout,false);
overlayFramelayout.addView(view);
Step #3:
// inflate overlay layout and add it to frame layout
View overlay_view = getLayoutInflater().inflate(R.layout.overlay_view, overlayFramelayout,false);
overlayFramelayout.addView(overlay_view);
This will give us the Coach marks/Overlay on the main layout. Now we want to have functionality to remove this Help Overlay when users tap or perform some action, this can be done by removing overlay view from framelayout
Step #4
overlayFramelayout.removeView(overlay_view);
Complete working example along with source code of this tutorial is available on Github https://github.com/pranayairan/AndroidExamples/tree/master/AndroidHelpOverlay
Let me know if this helps in comments, suggest for topics on future android tutorials









