2

I noticed that when you first time run clock app in android you get small info bubble below the "plus" icon with the information what that button is for. I am wondering how can i achieve something similar to let the users know in the first run what apps' buttons are for.

Any idea how i can achieve something like that?

pit_ns
  • 75
  • 1
  • 8
  • possible duplicate of [How to create a transparent demo on Android?](http://stackoverflow.com/questions/16616864/how-to-create-a-transparent-demo-on-android) – Simon Sep 29 '14 at 13:09

4 Answers4

2

you mean to say ToolTip text to show..for what the button is to be used..or what its purpose.. if so this link can help you out

Android PopupWindow with Tooltip Arrow

Community
  • 1
  • 1
Meenal
  • 2,879
  • 5
  • 19
  • 43
  • Android PopupWindow with Tooltip Arrow seems to be it, however since core "clock" application uses that i would say it should be part of android api libraries but I guess it is not..and i need to use external one. Toast looks differently plus if I put it in 0,0 how that would work with different screen sizes. – pit_ns Sep 29 '14 at 13:46
  • if you are using tootlip..then they use nine patch images..which will adjust acc to screen sizes and text – Meenal Sep 29 '14 at 14:43
  • 1
    I decided to try out showcaseview https://github.com/amlcurran/ShowcaseView but I will accept your answer because it helped me to get there :) - Thanks for help. – pit_ns Oct 15 '14 at 15:52
2

I created a library based on PopupWindow.

https://github.com/douglasjunior/android-simple-tooltip

demo

0

You can display an info bubble with a simple line of code :

Toast.makeText(getActivity(), "Your message.", Toast.LENGTH_SHORT).show();

You'll need to import: android.widget.Toast;

dekajoo
  • 2,024
  • 1
  • 25
  • 36
0

You could use a toast for this. In order to set the position of the toast you can use the setGravity method as well.

Toast : http://developer.android.com/guide/topics/ui/notifiers/toasts.html

For example:

Toast.makeText(getActivity, "Some text", TOAST.LENTH_SHORT).show(); toast.setGravity(Gravity.TOP|Gravity.LEFT, 0, 0);

AndroidEnthusiast
  • 6,557
  • 10
  • 42
  • 56