CustomEditor icon indicating copy to clipboard operation
CustomEditor copied to clipboard

Does this support font changer ?

Open korrio opened this issue 10 years ago • 1 comments

DO you have any idea if we can change font by font selector/spinner ?

korrio avatar Jan 04 '16 03:01 korrio

Ok, now I can do this by myself.

CustomEditText.java (support multiple typeface) https://gist.github.com/korrio/3e54a23d538ac587f1ca

I modified the CustomEditText with CalligraphyTypefaceSpan from (https://github.com/chrisjenx/Calligraphy)

Usage:

        int selectionStart = et.getSelectionStart();
        int selectionEnd = et.getSelectionEnd();
        // et (CustomEditText)
        et.setColor(Color.RED, selectionStart, selectionEnd);
        et.setFont(TypefaceUtils.load(getActivity().getAssets(), "fonts/ThaiSansNeue-Black.ttf"),selectionStart,selectionEnd);

korrio avatar Jan 04 '16 04:01 korrio