Popularity
3.9
Growing
Activity
0.0
Stable
227
18
45

Code Quality Rank: L5
Programming language: Java
License: Apache License 2.0
Tags: Other Widget    
Latest version: v3.1.1

MagicViews alternatives and similar packages

Based on the "Other Widget" category.
Alternatively, view MagicViews alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of MagicViews or a related project?

Add another 'Other Widget' Package

README

MagicViews

Maven Central

Provides a simple way to set custom font in Android application.

ScreenshotsScreenshots

Adding to your project

1) Add the library as a dependency to your build.gradle

compile 'com.ivankocijan:MagicViews:[email protected]'

2) Specify path to fonts folder in onCreate method of your Application class (See example app).

   public class MyApplication extends Application {

        @Override
        public void onCreate() {
            super.onCreate();

             MagicViews.setFontFolderPath(this, "fontFolderPath");

        }

   }

Usage from layout

1) Add your application namespace to the root element in the XML xmlns:app="http://schemas.android.com/apk/res-auto"

2) 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"/>

For a complete list of features and how to use them see wiki page.

Supported views

  • TextView
  • EditText
  • Button
  • CheckBox
  • CheckedTextView
  • RadioButton
  • AutoCompleteTextView
  • MultiAutoCompleteTextView
  • PreferenceGroup
  • Preference
  • CheckboxPreference
  • SwitchPreference
  • EditTextPreference
  • Span

Supported Android versions

  • 2.3 or higher

Change log

V3.1.0

  • New MagicFontSpan - See example here
  • Layout preview no longer shows exception when MagicView is added to custom view - See example

V3.0.1

  • New letter spacing attribute which lets you add horizonatal spacing between characters
  • TabLayout support - you can now set custom font on TabLayout

See wiki for more info.

You might encounter this issue after updating: /build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml

There are two options to fix that:

Exclude appcompact-v7 from MagicViews library:

    compile('com.ivankocijan:MagicViews:[email protected]') {
        exclude group: 'com.android.support', module: 'appcompat-v7'
    }

or Compile your app with Android SDK 23:

   android {
      compileSdkVersion 23
   }

V3.0

  • Library now uses new AppCompat views which backport some cool stuff to pre-lollipop devices. See Android developer blogspot for more info
  • Added new views: RadioButton, AutoCompleteTextView and MultiAutoCompleteTextView
  • Font can now be set from code by calling setFont(String fontName) method
  • Example app is updated with new features
  • Bugfixes

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](LICENSE).


*Note that all licence references and agreements mentioned in the MagicViews README section above are relevant to that project's source code only.