Open iloster opened 7 years ago
import android.view.ViewGroup import android.widget.TextView import io.github.angebagui.mediumtextview.ParagraphView import mx.jetty.jetty.jettyelements.FontManager /** * @author Gorro * @since 06/09/17. */ fun ViewGroup.setFont() { (0..this.childCount).map { val view = this.getChildAt(it) if (view is ParagraphView) { (0..view.childCount).map { index -> val txtV = view.getChildAt(index) if (txtV is TextView) { if (it == 0) { FontManager(txtV.context).initStyle(txtV, 1) txtV.textSize = 24f } else { FontManager(txtV.context).setTypeFace(txtV) } } } } } }
I wrote this Kotlin function to change the font Of course
FontManager(txtV.context).initStyle(txtV, 1)
it's a function to set te TypeFont :)
I wrote this Kotlin function to change the font Of course
it's a function to set te TypeFont :)