Skip to content

haikuowuya/MagicViews

 
 

Repository files navigation

MagicViews

Maven Central

Provides a simple way to set custom font in Android application. But, this is just a beginning. A lot of cool and awesome stuff is coming soon in this library.

ScreenshotsScreenshots

Usage

  1. Add the library as a dependency to your build.gradle
compile 'com.ivankocijan:MagicViews:version@aar'
  1. Add your application namespace to the root element in the XML xmlns:app="http://schemas.android.com/apk/res-auto"

  2. Add typeface to your assets folder. NOTE You can add your font anywhere in assets folder. Library will automatically find your font. Check TestApp for example.

  3. Instead of TextView use com.ivankocijan.magicviews.views.MagicTextView

    <com.ivankocijan.magicviews.views.MagicTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:typeFace="cha_chicle.otf"/>

Supported views

  • TextView
  • EditText
  • Button
  • CheckBox
  • CheckedTextView
  • PreferenceGroup
  • Preference
  • CheckboxPreference
  • SwitchPreference
  • EditTextPreference

Supported Android versions

  • 2.3 or higher

Contributing

Feedback 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.

About

Android 一个自定义字体的应用

Resources

License

Stars

Watchers

Forks

Packages

No packages published