Android-Rich-text-Editor
Android-Rich-text-Editor copied to clipboard
Change toolbar selection color
Is there a way to change the color selection on the toolbar? The default seems to be a pink color for the AREditText.
Sorry there is no easy way to do this for now. What worth a try based on current code is to extends the current ToolItems and override the getToolItemUpdater
public class ARE_ToolItem_Bold extends ARE_ToolItem_Abstract {
@Override
public IARE_ToolItem_Updater getToolItemUpdater() {
if (mToolItemUpdater == null) {
mToolItemUpdater = new ARE_ToolItem_UpdaterDefault(this, Constants.CHECKED_COLOR /* Change this color*/, Constants.UNCHECKED_COLOR);
setToolItemUpdater(mToolItemUpdater);
}
return mToolItemUpdater;
}
...
}
For example:
public class My_ARE_ToolItem_Bold extends ARE_ToolItem_Bold {
@Override
public IARE_ToolItem_Updater getToolItemUpdater() {
if (mToolItemUpdater == null) {
mToolItemUpdater = new ARE_ToolItem_UpdaterDefault(this, MY_CHECKED_COLOR, Constants.UNCHECKED_COLOR);
setToolItemUpdater(mToolItemUpdater);
}
return mToolItemUpdater;
}
And afterwards you can use My_ARE_ToolItem_Bold instead of ARE_ToolItem_Bold
You have to do this for every single control?
Is there no theme that can be applied?
On May 30, 2019, at 2:21 PM, Rain Liu [email protected] wrote:
Sorry there is no easy way to do this. What worth a try based on current code is to extends the current ToolItems and override the getToolItemUpdater
public class ARE_ToolItem_Bold extends ARE_ToolItem_Abstract {
@Override public IARE_ToolItem_Updater getToolItemUpdater() { if (mToolItemUpdater == null) { mToolItemUpdater = new ARE_ToolItem_UpdaterDefault(this, Constants.CHECKED_COLOR /* Change this color*/, Constants.UNCHECKED_COLOR); setToolItemUpdater(mToolItemUpdater); } return mToolItemUpdater; }... } For example:
public class My_ARE_ToolItem_Bold extends ARE_ToolItem_Bold {
@Override public IARE_ToolItem_Updater getToolItemUpdater() { if (mToolItemUpdater == null) { mToolItemUpdater = new ARE_ToolItem_UpdaterDefault(this, MY_CHECKED_COLOR, Constants.UNCHECKED_COLOR); setToolItemUpdater(mToolItemUpdater); } return mToolItemUpdater; }And afterwards you can use My_ARE_ToolItem_Bold instead of ARE_ToolItem_Bold
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Sorry, I could have that done but not yet..
Hi this is not highlighting all buttons i want to update all buttons like bullets, numbers, align left , align right so if there any way to do this let me know.. Only working in (Bold,italic,quotes)
@chiragdabhi0007 that needs some improvements from the code, simply speaking the work is to update the button style (high lighting) when cursor moving and code detects the corresponding span has been applied at the cursor position.
Sorry about the defect, I could do but I can't make a fix date promise..
Sorry there is no easy way to do this for now. What worth a try based on current code is to extends the current ToolItems and override the
getToolItemUpdaterpublic class ARE_ToolItem_Bold extends ARE_ToolItem_Abstract { @Override public IARE_ToolItem_Updater getToolItemUpdater() { if (mToolItemUpdater == null) { mToolItemUpdater = new ARE_ToolItem_UpdaterDefault(this, Constants.CHECKED_COLOR /* Change this color*/, Constants.UNCHECKED_COLOR); setToolItemUpdater(mToolItemUpdater); } return mToolItemUpdater; } ... }For example:
public class My_ARE_ToolItem_Bold extends ARE_ToolItem_Bold { @Override public IARE_ToolItem_Updater getToolItemUpdater() { if (mToolItemUpdater == null) { mToolItemUpdater = new ARE_ToolItem_UpdaterDefault(this, MY_CHECKED_COLOR, Constants.UNCHECKED_COLOR); setToolItemUpdater(mToolItemUpdater); } return mToolItemUpdater; }And afterwards you can use
My_ARE_ToolItem_Boldinstead ofARE_ToolItem_Bold
You can do it without extending a new class, just set the toolItemUpdater for example :
IARE_ToolItem bold = new ARE_ToolItem_Bold();
bold.setToolItemUpdater(new ARE_ToolItem_UpdaterDefault(bold, MY_CHECKED_COLOR, Constants.UNCHECKED_COLOR));
MY_CHECKED_COLOR in format 0xaaRRGGBB
Hi @Hamahmi , thanks for the comment! It amazed me! I cannot imagine there are really some guys would read the f**k code, but obviously you, are the one! Thank you!
@chinalwb Thanks man, your work is amazing btw, and I'd like to contribute and change some stuff when I get some free time