{"id":13537831,"url":"https://github.com/ikocijan/MagicViews","last_synced_at":"2025-04-02T04:31:58.332Z","repository":{"id":17144735,"uuid":"19911369","full_name":"ikocijan/MagicViews","owner":"ikocijan","description":"Set custom font in Android application","archived":false,"fork":false,"pushed_at":"2016-10-09T20:20:36.000Z","size":3364,"stargazers_count":224,"open_issues_count":3,"forks_count":41,"subscribers_count":18,"default_branch":"development","last_synced_at":"2025-04-01T05:41:32.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"looknd/jetbrains-monokai-sublime","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikocijan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-18T13:42:11.000Z","updated_at":"2024-10-05T16:55:48.000Z","dependencies_parsed_at":"2022-09-10T19:31:21.219Z","dependency_job_id":null,"html_url":"https://github.com/ikocijan/MagicViews","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikocijan%2FMagicViews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikocijan%2FMagicViews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikocijan%2FMagicViews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikocijan%2FMagicViews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikocijan","download_url":"https://codeload.github.com/ikocijan/MagicViews/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246757525,"owners_count":20828914,"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-01T09:01:04.106Z","updated_at":"2025-04-02T04:31:53.436Z","avatar_url":"https://github.com/ikocijan.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"MagicViews\n==========\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.ivankocijan/MagicViews/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.ivankocijan/MagicViews)\n\nProvides a simple way to set custom font in Android application.\n\n![Screenshots](https://raw.github.com/ikocijan/MagicViews/master/screenshot.jpg)![Screenshots](https://raw.github.com/ikocijan/MagicViews/master/screenshoot_2.png)\n\n## Adding to your project\n\n1) Add the library as a dependency to your ```build.gradle```\n\n```groovy\ncompile 'com.ivankocijan:MagicViews:version@aar'\n```\n\n2) Specify path to fonts folder in onCreate method of your Application class (See example app). \n\n```java\n   public class MyApplication extends Application {\n   \n        @Override\n        public void onCreate() {\n            super.onCreate();\n            \n             MagicViews.setFontFolderPath(this, \"fontFolderPath\");\n        \n        }\n   \n   }\n   \n   ```\n\n## Usage from layout\n\n1) Add your application namespace to the root element in the XML\n    \u003ccode\u003exmlns:app=\"http://schemas.android.com/apk/res-auto\"\u003c/code\u003e \n\n2) Instead of TextView use \u003ccode\u003ecom.ivankocijan.magicviews.views.MagicTextView\u003c/code\u003e\n\n```xml\n    \u003ccom.ivankocijan.magicviews.views.MagicTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:typeFace=\"cha_chicle.otf\"/\u003e\n```\n\nFor a complete list of features and how to use them see [wiki page](https://github.com/ikocijan/MagicViews/wiki).\n\n## Supported views\n* TextView\n* EditText\n* Button\n* CheckBox\n* CheckedTextView\n* RadioButton\n* AutoCompleteTextView\n* MultiAutoCompleteTextView\n* PreferenceGroup\n* Preference\n* CheckboxPreference\n* SwitchPreference\n* EditTextPreference\n* Span\n\n## Supported Android versions\n* 2.3 or higher\n\n## Change log\n\nV3.1.0\n\n* New MagicFontSpan - See example [here](https://github.com/ikocijan/MagicViews/blob/development/TestApp%2Fsrc%2Fmain%2Fjava%2Fcom%2Fivankocijan%2FTestApp%2Factivites%2FMagicFontSpanExampleActivity.java)\n* Layout preview no longer shows exception when MagicView is added to custom view - [See example] (https://github.com/ikocijan/MagicViews/blob/development/TestApp%2Fsrc%2Fmain%2Fjava%2Fcom%2Fivankocijan%2FTestApp%2Factivites%2FCustomViewActivity.java) \n\nV3.0.1\n\n* New letter spacing attribute which lets you add horizonatal spacing between characters\n* TabLayout support - you can now set custom font on TabLayout\n\nSee [wiki](https://github.com/ikocijan/MagicViews/wiki) for more info. \n\nYou might encounter this issue after updating: /build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml\n\nThere are two options to fix that:\n\nExclude appcompact-v7 from MagicViews library:\n\n```groovy\n    compile('com.ivankocijan:MagicViews:3.1.0@aar') {\n        exclude group: 'com.android.support', module: 'appcompat-v7'\n    }\n```\n\nor Compile your app with Android SDK 23:\n```groovy\n   android {\n      compileSdkVersion 23\n   }\n```\n\nV3.0\n\n* Library now uses new AppCompat views which backport some cool stuff to pre-lollipop devices. See [Android developer blogspot](http://android-developers.blogspot.com/2015/04/android-support-library-221.html) for more info\n* Added new views: RadioButton, AutoCompleteTextView and MultiAutoCompleteTextView\n* Font can now be set from code by calling setFont(String fontName) method\n* Example app is updated with new features\n* Bugfixes\n\n## Contributing\n\nFeedback and code contributions are very much welcomed. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the same [license](LICENSE).\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikocijan%2FMagicViews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikocijan%2FMagicViews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikocijan%2FMagicViews/lists"}