I integrated the following library in my Android app project successfully. That works well, Thanks to the author dankito !
However, I would like to remove some buttons from the toolbar. (Heading 1 - 6, Body Text, Preformatted, Block quot, Insert Checkbox ..)
But I do not understand how to do it. It's written in Kotlin.
Is it possible to do it simply? I am stuck ...
I would also like to change the strings of characters to translate them into French. Is it possible ?
Here is the code of the library that I obviously can not modify.
package net.dankito.richtexteditor.android.toolbar
import android.content.Context
import android.util.AttributeSet
import net.dankito.richtexteditor.android.command.*
class AllCommandsEditorToolbar : EditorToolbar {
constructor(context: Context) : super(context) { initToolbar() }
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) { initToolbar() }
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { initToolbar() }
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) { initToolbar() }
private fun initToolbar() {
addCommand(BoldCommand())
addCommand(ItalicCommand())
addCommand(UnderlineCommand())
addCommand(StrikeThroughCommand())
addCommand(SuperscriptCommand())
addCommand(SubscriptCommand())
addCommand(RemoveFormatCommand())
addCommand(UndoCommand())
addCommand(RedoCommand())
addCommand(BlockQuoteCommand())
addCommand(SetTextFormatCommand())
addCommand(SetFontNameCommand())
addCommand(SetFontSizeCommand())
addCommand(SwitchTextColorOnOffCommand())
addCommand(SetTextColorCommand())
addCommand(SwitchTextBackgroundColorOnOffCommand())
addCommand(SetTextBackgroundColorCommand())
addCommand(DecreaseIndentCommand())
addCommand(IncreaseIndentCommand())
addCommand(AlignLeftCommand())
addCommand(AlignCenterCommand())
addCommand(AlignRightCommand())
addCommand(AlignJustifyCommand())
addCommand(InsertBulletListCommand())
addCommand(InsertNumberedListCommand())
addCommand(InsertLinkCommand())
addCommand(InsertImageCommand())
addCommand(InsertCheckboxCommand())
addSearchView()
}
}
Thanks for your help