All Projects → johnkil → Print

johnkil / Print

Licence: apache-2.0
A lightweight Android library for use iconic fonts.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Print

Victor Mono
A free programming font with cursive italics and ligatures. Donations welcome ❤️
Stars: ✭ 1,854 (+817.82%)
Mutual labels:  typeface
Sharpview
安卓带有尖角气泡的控件(TextView,ImageView,EditText,Layout),支持渐变色,圆角等自定义属性
Stars: ✭ 137 (-32.18%)
Mutual labels:  imageview
Lkimagekit
A high-performance image framework, including a series of capabilities such as image views, image downloader, memory caches, disk caches, image decoders and image processors.
Stars: ✭ 2,063 (+921.29%)
Mutual labels:  imageview
Pinchtozoom
Android's ImageView pinch-to-zoom made easy
Stars: ✭ 108 (-46.53%)
Mutual labels:  imageview
Karmilla
An expanded version of the amazing Karla webfont, adding support for various languages (French, German, Norse, Hungarian, Latvian, Icelandic...)
Stars: ✭ 130 (-35.64%)
Mutual labels:  typeface
San Francisco Family
All the fonts in San Francisco family font, developed by Apple. Including new SF Camera font from iOS 13!
Stars: ✭ 141 (-30.2%)
Mutual labels:  typeface
Sporting Grotesque
A grotesque typeface by @LucasLeBihan
Stars: ✭ 101 (-50%)
Mutual labels:  typeface
Open Sauce Fonts
Open Sauce Fonts is a font super family that I developed for Creative Sauce's internal type system. It is a compact typeface that is optimised for better viewing small text on screen and print. Open Sauce fonts (Sans, One and Two) are under the SIL Open Font License and is going to be actively developed, improved and tested.
Stars: ✭ 189 (-6.44%)
Mutual labels:  typeface
Times New Bastard
It's Times New Roman but every seventh letter is jarringly sans serif
Stars: ✭ 130 (-35.64%)
Mutual labels:  typeface
Inter
The Inter font family
Stars: ✭ 13,303 (+6485.64%)
Mutual labels:  typeface
Kotlin Playground
Kotlin practice
Stars: ✭ 111 (-45.05%)
Mutual labels:  imageview
Font Line
OpenType vertical metrics reporting and font line spacing adjustment tool
Stars: ✭ 122 (-39.6%)
Mutual labels:  typeface
Pinchimageview
体验非常好的Android图片手势控件。
Stars: ✭ 1,871 (+826.24%)
Mutual labels:  imageview
Typefacehelper
Helper object for injecting typeface into various text views of android.
Stars: ✭ 107 (-47.03%)
Mutual labels:  typeface
Gestureviews
ImageView and FrameLayout with gestures control and position animation
Stars: ✭ 2,257 (+1017.33%)
Mutual labels:  imageview
Dot Matrix Typeface
A simple Dot Matrix style typeface
Stars: ✭ 105 (-48.02%)
Mutual labels:  typeface
Plusjakartasans
+Jakarta Sans is a open-source fonts. Designed for Jakarta "City of collaboration" program in 2020.
Stars: ✭ 136 (-32.67%)
Mutual labels:  typeface
Vicmaimageview
Content Mode Animatable Image View, change image view's content mode with your animation!
Stars: ✭ 193 (-4.46%)
Mutual labels:  imageview
Techna Sans
Sharp, geometric typeface
Stars: ✭ 189 (-6.44%)
Mutual labels:  typeface
Iosevka
Versatile typeface for code, from code.
Stars: ✭ 13,137 (+6403.47%)
Mutual labels:  typeface

Print

Android Arsenal

A lightweight Android library for use iconic fonts.

image

Get it on Google Play

Download

Gradle:

compile 'com.github.johnkil.print:print:1.3.1'

Maven:

<dependency>
    <groupId>com.github.johnkil.print</groupId>
    <artifactId>print</artifactId>
    <version>1.3.1</version>
    <type>aar</type>
</dependency>

Getting started

Add fonts

Add your custom iconic fonts to assets/.

Setup default font

Define your default iconic font using PrintConfig in Application.onCreate() method. This font will be used in cases when the value of a font is not specified.

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();                
        PrintConfig.initDefault(getAssets(), "fonts/iconic-font.ttf");
    }

}

Note: The definition of the default font is not necessary, in this case, you must specify the value of the font all the time.

Usage

PrintDrawable

If you need an icon in ImageView or in ActionBar, then you should use PrintDrawable. To create the drawable using PrintDrawable.Builder.

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.main, menu);
    // Set an icon in the ActionBar
    menu.findItem(R.id.action_info).setIcon(
            new PrintDrawable.Builder(context)
                    .iconTextRes(R.string.ic_info)
                    .iconColorRes(R.color.ab_icon_color)
                    .iconSizeRes(R.dimen.ab_icon_size)
                    .build()
    );
    return true;
}

Custom views

Use PrintView as single icon in your layout.

<com.github.johnkil.print.PrintView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:print_iconText="@string/ic_android"
        app:print_iconColor="@color/icon_color"
        app:print_iconSize="@dimen/icon_size"/>

Or use PrintButton to create a button with an icon. Using a view similar to PrintView.

<com.github.johnkil.print.PrintButton
        ... />

XML Attributes

Attribute Name Related Method
print_iconText setIconTextRes(int resId)
setIconText(CharSequence text)
print_iconCode setIconCodeRes(int resId)
setIconCode(int code)
print_iconColor setIconColorRes(int resId)
setIconColor(int color)
setIconColor(ColorStateList colors)
print_iconSize setIconSizeRes(int resId)
setIconSizeDp(float size)
setIconSize(int unit, float size)
print_iconFont setIconFont(String path)
setIconFont(Typeface font)

Links

License

Copyright 2014 Evgeny Shishkin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].