INNER CODE UNIT · Kotlin
onEditTextChangeListener
burhanrashid52/PhotoEditor · app/src/main/java/com/burhanrashid52/photoediting/EditImageActivity.kt:202
override fun onEditTextChangeListener(rootView: View, text: String, colorCode: Int) {
clearPendingTextPlacement()
val textEditorDialogFragment =
TextEditorDialogFragment.show(this, text.toString(), colorCode)
textEditorDialogFragment.setOnTextEditorListener(object :
TextEditorDialogFragment.TextEditorListener {
override fun onDone(inputText: String, colorCode: Int) {
val styleBuilder = TextStyleBuilder()
styleBuilder.withTextColor(colorCode)
mPhotoEditor.editText(rootView, inputText, styleBuilder)
mTxtCurrentTool.setText(R.string.label_text)
}
})
}
override fun onAddViewListener(viewType: ViewType, numberOfAddedViews: Int) {
Log.d(
TAG,