{"id":13641199,"url":"https://github.com/Livin21/DroidAwesome","last_synced_at":"2025-04-20T07:32:22.948Z","repository":{"id":91148159,"uuid":"74854905","full_name":"Livin21/DroidAwesome","owner":"Livin21","description":"An android library to display FontAwesome Icons in any View or a MenuItem","archived":false,"fork":false,"pushed_at":"2017-12-02T05:58:35.000Z","size":304,"stargazers_count":39,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-27T08:03:32.776Z","etag":null,"topics":["android","android-library","floatingactionbutton","font","font-awesome","font-icon-libraries","font-icons","icons","imagebutton","imageview","java","kotlin-android","library","menuitem","textview"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/Livin21.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-26T22:50:51.000Z","updated_at":"2024-05-30T08:02:10.000Z","dependencies_parsed_at":"2023-04-20T12:54:53.872Z","dependency_job_id":null,"html_url":"https://github.com/Livin21/DroidAwesome","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Livin21%2FDroidAwesome","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Livin21%2FDroidAwesome/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Livin21%2FDroidAwesome/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Livin21%2FDroidAwesome/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Livin21","download_url":"https://codeload.github.com/Livin21/DroidAwesome/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223602673,"owners_count":17171952,"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":["android","android-library","floatingactionbutton","font","font-awesome","font-icon-libraries","font-icons","icons","imagebutton","imageview","java","kotlin-android","library","menuitem","textview"],"created_at":"2024-08-02T01:01:18.732Z","updated_at":"2024-11-09T11:30:52.590Z","avatar_url":"https://github.com/Livin21.png","language":"Kotlin","funding_links":[],"categories":["图标"],"sub_categories":[],"readme":"# ![icon-96x96.png](https://s18.postimg.org/tboj9r74p/icon_96x96.png) DroidAwesome\nA library to display FontAwesome Icons in any View or a MenuItem\n\n[ ![Download](https://api.bintray.com/packages/lmntrx-tech/DroidAwesome/droid-awesome/images/download.svg) ](https://bintray.com/lmntrx-tech/DroidAwesome/droid-awesome/_latestVersion) [![](https://jitpack.io/v/Livin21/DroidAwesome.svg)](https://jitpack.io/#Livin21/DroidAwesome) [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/Livin21/droidawesome) [![TravisCI](https://api.travis-ci.org/Livin21/DroidAwesome.svg?branch=master)](https://travis-ci.org/Livin21/DroidAwesome) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DroidAwesome-yellowgreen.svg?style=flat)](http://android-arsenal.com/details/1/4895) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/5f09cf084d7e4957b75fc8508b2c8da9)](https://www.codacy.com/app/livinmathew99/DroidAwesome?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Livin21/DroidAwesome\u0026amp;utm_campaign=Badge_Grade)\n\n## Views Supported: ##\n* TextView\n* AutoComplete TextView\n* EditText\n* Switch\n* CheckBox\n* Radio Button\n* Button\n* Toggle Button\n* ImageView\n* ImageButton\n* FloatingActionButton\n* MenuItem\n\n## Screenshot ##\n![Screenshot_1480330061.png](https://s16.postimg.org/63vrfifdh/Screenshot_1480330061.png) ![Screenshot_1480244308.png](https://s21.postimg.org/4mk08gn93/Screenshot_1480244308.png)\n\n## Gradle Setup ##\nAdd the following code snippet to module/build.gradle\n```gradle\ndependencies {\n    compile 'com.lmntrx.livin.library.droidawesome:droid-awesome:1.1.9'\n}\n```\n\n\n## Maven Setup ##\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.lmntrx.livin.library.droidawesome\u003c/groupId\u003e\n  \u003cartifactId\u003edroid-awesome\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.9\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n## How to use it? ##\n### Define required icons in res/values/icons.xml ###\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n  \u003cresources\u003e\n    \u003cstring name=\"android_icon_font_awesome\"\u003e\u0026#xf17b;\u003c/string\u003e //http://fontawesome.io/cheatsheet/\n    \u003cstring name=\"not_allowed_font_awesome\"\u003e\u0026#xf05e;\u003c/string\u003e\n    \u003cstring name=\"fa_settings_gears\"\u003e\u0026#xf085;\u003c/string\u003e\n  \u003c/resources\u003e\n```\n### Now use custom view in activity.xml ###\n```xml\n\u003c!-- Icons do not render in android studio render sandbox. Run project in an emulator to see changes --\u003e\n\u003ccom.lmntrx.livin.library.droidawesome.DroidAwesomeAutoCompleteTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"65sp\"\n        android:textColor=\"#0f0\"\n        android:gravity=\"center\"\n        android:text=\"@string/android_icon_font_awesome\"/\u003e\n\n\u003ccom.lmntrx.livin.library.droidawesome.DroidAwesomeImageView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:text=\"@string/not_allowed_font_awesome\"\n        app:textColor=\"@color/colorAccent\"\n        app:textSize=\"38sp\"/\u003e\n```\n* Or in java file\n```java\nDroidAwesomeTextView textView = new DroidAwesomeTextView(context);\ntextView.setText(getString(R.string.your_icon_string));\n```\nOr\n```java\n//TextView, EditText, Button, etc.\nTextView textView = new TextView(context);\ntextView.setText(\n                new DroidAwesome.StringBuilder(this)\n                        .icon(getString(R.string.android_icon_font_awesome)) //icon\n                        .build()\n        );\n\n//Imageview, ImageButton, FloatingActionButton, etc.\nImageview imageView = new Imageview(context);\nimageView.setImageDrawable(\n                new DroidAwesome.DrawableBuilder(this)\n                        .color(R.color.colorPrimaryDark) //colorRes\n                        .size(75f) //dimension float (sp)\n                        .icon(getString(R.string.fa_settings_gears)) //icon\n                        .build()\n        );\n```\n### To use with menu items ###\n```xml\n\u003c!--XML--\u003e\n\u003cmenu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    tools:context=\"com.lmntrx.livin.droidawesome.MainActivity\"\u003e\n    \u003citem\n        android:id=\"@+id/action_settings\"\n        android:orderInCategory=\"100\"\n        android:title=\"@string/action_settings\"\n        /\u003e\n\u003c/menu\u003e\n```\n```java\n//Java\n@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n    // Inflate the menu; this adds items to the action bar if it is present.\n    getMenuInflater().inflate(R.menu.menu_main, menu);\n    MenuItem menuItem = menu.findItem(R.id.action_settings);\n    menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);\n    menuItem.setIcon(\n                new DroidAwesome.DrawableBuilder(this)\n                        .icon(getString(R.string.fa_settings_gears)) //icon\n                        .color(R.color.colorAccent) //colorRes\n                        .size(25f) //dimension float (sp)\n                        .build()\n        );\n    return true;\n}\n```\n\n## ChangeLog ##\n\n### 1.1.9 ###\n* Removed use of font file from assets\n* Removed setFontFile() method\n\n### 1.1.8 ###\n* Minor Bug Fixes\n\n### 1.1.7 ###\n* Set Font Filename\n\n### 1.1.6 ###\n* Minor Bug Fix\n\n### 1.1.5 ###\n* Added DrawableBuilder and StringBuilder\n* Deprecated setFontIcon() and getFontIcon methods\n\n### 1.1.4 ###\n* Added setIcon() method to ImageView, ImageButton, FAB\n\n### 1.1.3 ###\n* Minor Bug Fixes\n* Updated build version and support library \n\n### 1.1.2 ###\n* Minor Bug Fix\n\n### 1.1.1 ###\n* Add FontAwesome icon programmatically\n* Added support for MenuItem \n\n### 1.1.0 ###\n* Added ImageView\n* Added ImageButton\n* Added FloatingActionButton\n\n### 1.0.1 ###\n* Minor Bug Fix\n\n### 1.0.0 ###\n* Added custom TextView\n* Added custom AutoComplete TextView\n* Added custom EditText\n* Added custom Button\n* Added custom ToggleButton\n* Added custom Switch\n* Added custom CheckBox\n* Added custom Radio Button\n\n## Credits ##\nIcon designed by [Aswin CJ](https://github.com/ACJLionsRoar)\n\n[![BehanceProfile](https://s29.postimg.org/4tb0l0q9z/behance.png)](https://www.behance.net/ACJLionsRoar) [![GitHubProfile](https://s27.postimg.org/8a185gi0j/github_logo_2.png)](https://github.com/ACJLionsRoar)\n\n## Copyright ##\n```\nCopyright 2016 DroidAwesome - Livin Mathew\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLivin21%2FDroidAwesome","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLivin21%2FDroidAwesome","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLivin21%2FDroidAwesome/lists"}