{"id":13645510,"url":"https://github.com/tomergoldst/tooltips","last_synced_at":"2026-01-12T08:21:48.346Z","repository":{"id":57729106,"uuid":"62435927","full_name":"tomergoldst/tooltips","owner":"tomergoldst","description":"Simple to use library for android, enabling to add a tooltip near any view with ease","archived":false,"fork":false,"pushed_at":"2023-10-21T07:54:17.000Z","size":299,"stargazers_count":834,"open_issues_count":5,"forks_count":97,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-11-27T14:51:54.246Z","etag":null,"topics":["android","java","tooltip","tooltip-library","tooltips"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomergoldst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-02T05:42:49.000Z","updated_at":"2025-11-20T10:56:59.000Z","dependencies_parsed_at":"2022-09-10T23:41:32.209Z","dependency_job_id":"883a8381-c9f4-4d10-8674-eca7a9229725","html_url":"https://github.com/tomergoldst/tooltips","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tomergoldst/tooltips","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomergoldst%2Ftooltips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomergoldst%2Ftooltips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomergoldst%2Ftooltips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomergoldst%2Ftooltips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomergoldst","download_url":"https://codeload.github.com/tomergoldst/tooltips/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomergoldst%2Ftooltips/sbom","scorecard":{"id":892490,"data":{"date":"2025-08-18","repo":{"name":"github.com/tomergoldst/tooltips","commit":"8e2b65ce51f26fee17a142b8fd5078c5b89946a2"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T12:24:13.656Z","repository_id":57729106,"created_at":"2025-08-24T12:24:13.656Z","updated_at":"2025-08-24T12:24:13.656Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","java","tooltip","tooltip-library","tooltips"],"created_at":"2024-08-02T01:02:36.212Z","updated_at":"2026-01-12T08:21:48.332Z","avatar_url":"https://github.com/tomergoldst.png","language":"Java","readme":"# Tooltips\nSimple to use library for android, Enabling to add a tooltip near any view with ease\n\n\u003cimg src=\"https://user-images.githubusercontent.com/99822/38155597-a5e9f4bc-3446-11e8-8db1-4dbd670584f5.gif\" width=\"180\" height=\"320\"/\u003e \u003cimg src=\"https://user-images.githubusercontent.com/99822/38155596-a5d9990a-3446-11e8-9b88-5b6ba2f45ac4.gif\" width=\"180\" height=\"320\"/\u003e\n\n## Instructions\nAdd a dependency to your app build.gradle\n```groovy\ndependencies {\n    implementation 'com.tomergoldst.android:tooltips:1.1.1'\n}\n```\n\nCreate a `ToolTipsManager` object\n```java\npublic class MainActivity extends Activity {\n    \n    ToolTipsManager mToolTipsManager;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        \n        mToolTipsManager = new ToolTipsManager();\n        \n    }\n\n}\n```\n  \nUse the `ToolTip.Builder` to construct your tip\n```java\npublic class MainActivity extends Activity {\n    \n     @Override\n     public void onWindowFocusChanged(boolean hasFocus) {\n        super.onWindowFocusChanged(hasFocus);\n        \n        ToolTip.Builder builder = new ToolTip.Builder(this, mTextView, mRootLayout, \"Tip message\", ToolTip.POSITION_ABOVE);\n    }\n}\n```\n`mTextView` here is the view which near it the tip will be shown and `mRootLayout` is the layout where the tip view will be added to.\n**The root layout must be** of `RelativeLayout`, `FrameLayout` or similar. `LinearLayout` won't work but you can always wrap your `LinearLayout`\nwith another layout. Prefer to pass in a layout which is higher in the xml tree as this will give the\ntip view more visible space.\n \n**OPTIONAL**: Customize your tip with background color, text color, alignment, text gravity, type face and more. \n```java\npublic class MainActivity extends Activity {\n    \n     @Override\n     public void onWindowFocusChanged(boolean hasFocus) {\n        super.onWindowFocusChanged(hasFocus);\n         \n        ToolTip.Builder builder = new ToolTip.Builder(this, mTextView, mRootLayout, \"Tip message\", ToolTip.POSITION_ABOVE);\n        builder.setAlign(ToolTip.ALIGN_LEFT);\n        builder.setBackgroundColor(getResources().getColor(R.color.colorOrange));\n        builder.setGravity(ToolTip.GRAVITY_RIGHT);\n        builder.setTextAppearance(R.style.TooltipTextAppearance); // from `styles.xml`\n        builder.setTypeface(mCustomFontTypeface);\n    }\n}\n```\n\nHere is an example on how you can define your text appearance in your `styles.xml`\n\n```xml\n\u003cstyle name=\"TooltipTextAppearance\"\u003e\n    \u003citem name=\"android:textColor\"\u003e@color/your_custom_color\u003c/item\u003e\n    \u003citem name=\"android:textSize\"\u003e16sp\u003c/item\u003e\n    \u003citem name=\"android:textStyle\"\u003ebold\u003c/item\u003e\n\u003c/style\u003e\n```\n\nYou can also customize the animation used to show and hide the tooltip view by providing `ToolTipAnimator` implementation and setting it in the `ToolTipsManager`.\n```java\npublic class MainActivity extends Activity {\n    ToolTipsManager mToolTipsManager;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        \n        mToolTipsManager = new ToolTipsManager();\n        mToolTipsManager.setToolTipAnimator(MyCustomToolTipAnimator());\n    }\n\n}\n```\n\nUse `ToolTipManger` to show the tip\n\n**IMPORTANT**: This must be called after the layout has been drawn\nYou can override the `onWindowFocusChanged()` of an Activity and show there, Start a delayed runnable from `onStart()`, react to user action or any other method that works for you\n```java\npublic class MainActivity extends Activity {\n    \n    @Override\n     public void onWindowFocusChanged(boolean hasFocus) {\n        super.onWindowFocusChanged(hasFocus);\n         \n        ToolTip.Builder builder = new ToolTip.Builder(this, mTextView, mRootLayout, \"Tip message\", ToolTip.POSITION_ABOVE);\n        \n        // Rest of builder configurations removed for brevity\n      \n        mToolTipsManager.show(builder.build());\n    }\n}\n```\n\nEach tip is dismissable by clicking on it, if you want to dismiss a tip from code there are a few options, the most simple way is to do the following\n```java\npublic class MainActivity extends Activity {\n    \n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        \n        mDismissBtn.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                mToolTipsManager.findAndDismiss(mTextView);\n            }\n        });\n    }\n    \n}\n```\nWhere `mTextView` is the same view we asked to position a tip near it\n\nIf you want to react when tip has been dismissed, Implement `ToolTipsManager.TipListener` interface and use appropriate `ToolTipsManager` constructor\n```java\npublic class MainActivity extends Activity implements ToolTipsManager.TipListener {\n    \n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        mToolTipsManager = new ToolTipsManager(this);\n    }\n\n    @Override\n    public void onTipDismissed(View view, int anchorViewId, boolean byUser) {\n        Log.d(TAG, \"tip near anchor view \" + anchorViewId + \" dismissed\");\n    \n        if (anchorViewId == R.id.text_view) {\n            // Do something when a tip near view with id \"R.id.text_view\" has been dismissed\n        }\n    }\n    \n}\n```\n\n### License\n```\nCopyright 2016 Tomer Goldstein\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n\n","funding_links":[],"categories":["其他"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomergoldst%2Ftooltips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomergoldst%2Ftooltips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomergoldst%2Ftooltips/lists"}