Skip to content

FontFullLibrary is an android fonts library which enables font cutomization without having you to load font files, other customizations include color and size customizations

Notifications You must be signed in to change notification settings

mohitsingh35/FontFullLibrary

Repository files navigation

FontFullLibrary ツ

FontFull is a demonstration library created as a self-teaching project, packed with excellent font formatting features in just 4 lines of code

Download Sample APK ---> Click on "download raw"

Features

Main Screen

  1. FontStyle BottomSheet :

    You can integrate some of the widely used typefaces in your app without having to download each separately yourself has the liberty to add your own typefaces as well.

Font Style

  1. Font Size Slider :

    The font size selector slider is available in the bottom sheet and can be directly used to set the text size.

Font Size

  1. Font Color Picker Menu:

    Integrated into the bottom sheet, the color picker menu offers a clean UI and functions well to set the color of the text.

Font Color

Installation

Installation of FontFull is really very simple, follow the below steps to get started!

Using Gradle

Step 1 : Use this in settings.gradle

pluginManagement {
repositories {
    ...
    maven { url 'https://jitpack.io' }
  
    }
}

Step 2 : Use this in build.gradle (module:app)

dependencies { 

   implementation 'com.github.mohitsingh35:FontFullLibrary:1.0'
   
}

Usage

//FontStyle Usage

//this is a sample button change it in your code
FontStylebutton.setOnClickListener {
            val fontStyleSelectedListener = object : FontFull.FontStyleBottomSheetDialog.OnFontStyleSelectedListener {
                override fun onFontStyleSelected(typeface: Typeface) {
                    textView.typeface=typeface  // don't forget to change your textview here
                }
            }
            FontFull.FontStyleBottomSheetDialog.showFontStyleBottomSheet(this, fontStyleSelectedListener)
        }
//FontSize Usage

val fontSizeBottomSheetDialog = FontFull.FontSizeBottomSheetDialog(this)
        fontSizeBottomSheetDialog.setSizeChangeListener { selectedValue ->
            textView.textSize = selectedValue  // don't forget to change your textview here
        }
        FontSizebutton.setOnClickListener {    // open the bottom sheet
            fontSizeBottomSheetDialog.show()
        }
//FontColor Usage

//this is a sample button change it in your code
FontColorbutton.setOnClickListener {
            val colorPickerBottomSheet = FontFull.ColorPickerBottomSheet()
            colorPickerBottomSheet.setOnColorSelectedListener { color ->
                textView.setTextColor(color) // don't forget to change your textview here
            }
            colorPickerBottomSheet.show(supportFragmentManager, "colorPicker")
        }

Customisations

New FontStyles can be added by the desired .ttf file of font in res/font and then adding this in FontFull class inside fontstylelist as R.font.your_font

Other customizations will be added in future releases

Peace out 🤞

About

FontFullLibrary is an android fonts library which enables font cutomization without having you to load font files, other customizations include color and size customizations

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages