With TapTargetView, you can tell your users ‘the specific function for each buttons and widgets in your Application’ in a way you or them will find ‘unique’.
Now, you might be thinking “What is TapTargetView?“, “How can I use it in my App?“, “I can’t use it in my App, I don’t know Java“. But not to worry, I will cover everything concerning TapTargetView in this article.
- What is Tap Target view in Android?
- What is the importance of Tap Target ?
- How to Add TapTarget to your Sketchware project
- How to display multiple TapTargets (one after the other) in your Sketchware-made Application
-
Frequently Asked Questions
- Why did you use a SharedPreferences component in every if block?
- More than one TapTargetView are displaying at once, how I can stop this?
- Can I use this codes to display TapTargetView in an Android Studio or AIDE project? If possible, how can I do it?
- What should be the proper implementation method in other avoid bugs in my project ?
- Conclusion
What is Tap Target view in Android?
What is the importance of Tap Target ?
- It helps in giving your users full knowledge about your Application features.
- It help increases your users’ first impressions.
- It is a more unique way of welcoming new Users.
- It helps draw the user’s attention so you can quickly display the Terms of Use/Terms and Conditions of your Application.
How to Add TapTarget to your Sketchware project
Open your Sketchware project (preferably a new one for testing) and go to Logic > Moreblock > Shared Moreblocks
Search for “TapTarget” (without Quotes) and scroll down till you see the moreblock for TapTarget added by ‘Usman’ ( check the Image below to understand )
- Go to Moreblock and create a new Moreblock and name it “startTapTargetView”.
Define “startTapTargetView” Moreblock by adding this blocks.
Set your Target view (ex. button), set the Title of TapTargetView, set the message, set the background color you wish (ex. #ffffff) and lastly set the Time (milliseconds) which will delay the TapTargetView.
How to display multiple TapTargets (one after the other) in your Sketchware-made Application
Go to Moreblock area and open the “NewTapTarget” moreblock then you replace the codes in the first ASD (add source directly) block with the one below
//change "MainActivity" to your specific Activity TapTargetView.showFor(MainActivity.this, TapTarget.forView(_view, _title, _msg) .outerCircleColorInt(Color.parseColor(_bgcolor)) .outerCircleAlpha(0.96f) .targetCircleColorInt(Color.parseColor("#FFFFFF")) .titleTextSize(25) .titleTextColorInt(Color.parseColor("#FFFFFF")) .descriptionTextSize(18) .descriptionTextColor(android.R.color.white) .textColorInt(Color.parseColor("#FFFFFF")) .textTypeface(Typeface.SANS_SERIF) .dimColor(android.R.color.black) .drawShadow(true) .cancelable(false) .tintTarget(true) .transparentTarget(true) //.icon(Drawable) .targetRadius(60), //LISTENER// new TapTargetView.Listener() { @Override public void onTargetClick(TapTargetView view) { //ON CLICKED// super.onTargetClick(view); _startTapTargetView(); } });
Go back and open the “startTapTargetView” moreblock and insert this additional blocks. Do this for as many views you want to display, but just make sure it goes in this format.
NOTE: Always put “Tap it to continue” at the end of your message because the TapTargetView won’t dismiss until the Target is clicked.
When done with done with that, change the data of the SharedPreferences (use the data of the previous TapTargetView as an “if” condition, then you change it). For a clear understanding, take a look at this images
Go back to your onCreate event and make this blocks are still there.
Run your project and see the good result you have achieved.
Frequently Asked Questions
More than one TapTargetView are displaying at once, how I can stop this?
Can I use this codes to display TapTargetView in an Android Studio or AIDE project? If possible, how can I do it?
- Finish the whole process and run the Application.
- Open XML EDITOR PRO.
- Open the project in XML Editor Pro and go to the activity which you implemented the codes and easily copy it from there ( if you don’t know how, read this article)
Paste the codes in the specific events which you need TapTargetView.
What should be the proper implementation method in other avoid bugs in my project ?
- You start the TapTargetView display in the onCreate event in your Application.
- You use new components and variables.
Wow
Thank you so much.
This lightened up my day in so many ways
I'm glad to see you understood everything 🙂
I wish to you around, thank you once again.
Hey HelpGurus ,
Great post with effective tips to add Tap-Target-view on android apps in sketch-ware. It is my first time commenting on your blog post and i must say
that you have done a fantastic work and suggested great tips to add Tap-Target-view.
It is absolutely true that Tap-Target-View helps user in providing full knowledge about application features and is really a unique way for welcoming new users.
Your each of the suggested steps to add Tap-Target to sketch-ware project and steps to display multiple Tap-Targets are so clear, easy to understand and
follow, whereas following these steps will helps a lot.
Truly helpful post and thanks for sharing.