Giter Club home page Giter Club logo

customfontlib's Introduction

About the Library

CustomFontLib is an Android Library to help adding custom fonts to Android Views.

How to use

1. Add the lib as a dependency to your project build.gradle:

dependencies {
    compile 'com.daniribalbert:custom-font-lib:0.9.9'
}

2. Add the fonts to the assets/fonts folder:

assets/fonts

3. Add the custom font view to your layout:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    ... (Additional attributes) />
    <com.daniribalbert.customfontlib.views.CustomFontTextView
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello Text!"
        app:font="your_font_name"/>

Use the font attribute to add your font name without extension ex: app:font="helvetica".

screenshot

For more information please check the sample app available at GitHub

License

Copyright (c) 2016 daniribalbert
	
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
	
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
	
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

customfontlib's People

Contributors

daniribalbert avatar

Stargazers

 avatar Patryk Durka avatar  avatar Fernando Novoa avatar BIGAPPLE avatar Arthur Freire avatar dusunboy avatar Murat CAN avatar  avatar mooSta avatar Santosh Suresh Gaikar avatar Tinashe avatar thu avatar Nguyen Cong Binh avatar 赵杰 avatar  avatar Vincent avatar Yongliang He avatar f-t-i-o-i avatar Qiyu avatar  avatar Andrew Chen avatar CordingHornet avatar toast avatar 投木报琼 avatar Shiqm avatar  avatar Weihl avatar 霏霁 avatar whiyc avatar renzhiqiang avatar Darren avatar Pranav Lathigara avatar 宋志辉 avatar  avatar Xigong avatar  avatar Mithun Kundu avatar Jing Lu avatar SivaShankar avatar YuChen avatar  avatar  avatar Shengxiang Chong avatar Huang Ying avatar Jane avatar Devin avatar hucanhua avatar Achin verma avatar Knight_Davion avatar 何炳坤 avatar dxs avatar  avatar  avatar HeCheng avatar Wai Cheung avatar LiXiaoWang avatar ruixiang_cao avatar Robert.zhang avatar vice avatar Lynn avatar  avatar  avatar fangshuai avatar  avatar  avatar Bound avatar carzycat avatar Hayden avatar  avatar 于留月 avatar Михаил avatar TomYeYunfei avatar Janusz Bagiński avatar King Leung avatar Rocky avatar YTXQOX avatar Jake Woki avatar Andrey avatar Wade avatar  avatar DK avatar andyiac avatar wangxu avatar WilsonL avatar  avatar Iks_ruan avatar 打哈哈 avatar Celestior avatar Zan Li avatar Zubin avatar Roy Wu avatar young avatar SeniorZhai avatar Hao avatar Fiend avatar h.yw avatar JiChao avatar FrankZhan avatar 董俊锟 avatar

Watchers

 avatar  avatar  avatar

customfontlib's Issues

Duplicated name in value resource

I'm trying build gradle, but it thow an exception like this: "Error:(947) Attribute "font" already defined with incompatible format.". It duplicated with name "font" in
If you want your lib run normally, just rename "font" become anything like "myFont".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.