Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Add Toolbar Item Emoji and Font Foregound/Background Color in ARE_ToolbarDefault #62

Open
amaydiam opened this issue Apr 6, 2019 · 1 comment

Comments

@amaydiam
Copy link

amaydiam commented Apr 6, 2019

Hello guys,
This library is very cool, but how to apply add Toolbar Item Emoji and Font Foregound/Background Color in ARE_ToolbarDefault ?


    private void initToolbar() {
        IARE_ToolItem bold = new ARE_ToolItem_Bold();
        IARE_ToolItem italic = new ARE_ToolItem_Italic();
        IARE_ToolItem underline = new ARE_ToolItem_Underline();
        IARE_ToolItem strikethrough = new ARE_ToolItem_Strikethrough();
        ARE_ToolItem_FontSize fontSize = new ARE_ToolItem_FontSize();
        IARE_ToolItem quote = new ARE_ToolItem_Quote();
        IARE_ToolItem listNumber = new ARE_ToolItem_ListNumber();
        IARE_ToolItem listBullet = new ARE_ToolItem_ListBullet();
        IARE_ToolItem hr = new ARE_ToolItem_Hr();
        IARE_ToolItem link = new ARE_ToolItem_Link();
        IARE_ToolItem subscript = new ARE_ToolItem_Subscript();
        IARE_ToolItem superscript = new ARE_ToolItem_Superscript();
        IARE_ToolItem left = new ARE_ToolItem_AlignmentLeft();
        IARE_ToolItem center = new ARE_ToolItem_AlignmentCenter();
        IARE_ToolItem right = new ARE_ToolItem_AlignmentRight();
        IARE_ToolItem image = new ARE_ToolItem_Image();
        areToolbar.addToolbarItem(bold);
        areToolbar.addToolbarItem(italic);
        areToolbar.addToolbarItem(underline);
        areToolbar.addToolbarItem(strikethrough);
        areToolbar.addToolbarItem(quote);
        areToolbar.addToolbarItem(fontSize);
        areToolbar.addToolbarItem(listNumber);
        areToolbar.addToolbarItem(listBullet);
        areToolbar.addToolbarItem(hr);
        areToolbar.addToolbarItem(link);
        areToolbar.addToolbarItem(subscript);
        areToolbar.addToolbarItem(superscript);
        areToolbar.addToolbarItem(left);
        areToolbar.addToolbarItem(center);
        areToolbar.addToolbarItem(right);
        areToolbar.addToolbarItem(image);

        arEditText.setToolbar(areToolbar);

        setHtml();

        initToolbarArrow();
    }

Above code just implement some toolbar item , i cant find how to add Toolbar Item Emoji and Font Foregound/Background Color.
Please Advice ..
Thanks

@chinalwb
Copy link
Owner

chinalwb commented Apr 8, 2019

I'm sorry I response late.
Those styles are missed in current implementation, if you look into the source code of those classes implements IARE_ToolItem, and the classes in package com.chinalwb.are.styles, you will see they look similar, and the com.chinalwb.are.styles package includes the implementation of Emoji / Foreground/Background color.

I am sorry about I still could not get time to do the refactor about this project...

Hope guys like you could help :)

I can provide more info if you have questions when working out these new ARE_ToolItems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants