{"id":13639637,"url":"https://github.com/rubensousa/RaiflatButton","last_synced_at":"2025-04-19T22:33:16.668Z","repository":{"id":44331122,"uuid":"72290499","full_name":"rubensousa/RaiflatButton","owner":"rubensousa","description":"A raised button that lowers down to 0dp of elevation","archived":false,"fork":false,"pushed_at":"2017-02-28T17:15:50.000Z","size":1365,"stargazers_count":330,"open_issues_count":0,"forks_count":35,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-13T04:09:32.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubensousa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-29T14:45:57.000Z","updated_at":"2024-04-25T23:56:55.000Z","dependencies_parsed_at":"2022-08-30T07:00:35.209Z","dependency_job_id":null,"html_url":"https://github.com/rubensousa/RaiflatButton","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubensousa%2FRaiflatButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubensousa%2FRaiflatButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubensousa%2FRaiflatButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubensousa%2FRaiflatButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubensousa","download_url":"https://codeload.github.com/rubensousa/RaiflatButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249822217,"owners_count":21329936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-02T01:01:02.821Z","updated_at":"2025-04-19T22:33:16.620Z","avatar_url":"https://github.com/rubensousa.png","language":"Java","funding_links":[],"categories":["按钮"],"sub_categories":[],"readme":"# RaiflatButton\n\nA raised button that lowers down to 0dp of elevation. From my blog post: https://rubensousa.github.io/2016/10/raiflatbutton\n\nIt behaves like a normal button on APIs \u003c 21\n\n\u003cimg src=\"screens/demo.gif\" width=\"400\"\u003e\n\n## Build\n\n```groovy\ndependencies {\n   compile 'com.github.rubensousa:raiflatbutton:0.1'\n}\n```\n\n## How to\n\nJust add the following xml to your layout:\n\n```xml\n\u003ccom.github.rubensousa.raiflatbutton.RaiflatButton\n    android:id=\"@+id/normalButton\"\n    style=\"@style/Base.Widget.AppCompat.Button.Colored\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:text=\"Colored\" /\u003e\n    \n\u003ccom.github.rubensousa.raiflatbutton.RaiflatImageButton\n    android:id=\"@+id/imageButton\"\n    style=\"@style/Base.Widget.AppCompat.Button\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:src=\"@drawable/ic_android\" /\u003e\n```\n\nIf you want to resume the normal button behavior, just use:\n\n```java\nbutton.setFlatEnabled(false);\n```\n\n## Styling\n\nSince RaiflatButton and RaiflatImageButton both extend AppCompatButton and AppCompatImageButton, you can reuse the same AppCompat styles.\n\nExample:\n\n```xml\n\u003cstyle name=\"RaiflatButtonPrimaryStyle\" parent=\"Base.Widget.AppCompat.Button.Colored\"\u003e\n    \u003citem name=\"android:colorControlNormal\"\u003e?attr/colorPrimary\u003c/item\u003e\n\u003c/style\u003e\n```\n\n## License\n\n    Copyright 2016 Rúben Sousa\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n        http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubensousa%2FRaiflatButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubensousa%2FRaiflatButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubensousa%2FRaiflatButton/lists"}