|
@@ -1,6 +1,8 @@
|
|
package com.bomostory.sceneeditmodule.cover
|
|
package com.bomostory.sceneeditmodule.cover
|
|
|
|
|
|
import android.content.Context
|
|
import android.content.Context
|
|
|
|
+import android.text.Editable
|
|
|
|
+import android.text.TextWatcher
|
|
import android.util.AttributeSet
|
|
import android.util.AttributeSet
|
|
import android.view.View
|
|
import android.view.View
|
|
import android.widget.ArrayAdapter
|
|
import android.widget.ArrayAdapter
|
|
@@ -66,5 +68,34 @@ class FrontCoverEditorView @JvmOverloads constructor(
|
|
add(s)
|
|
add(s)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ et_frontCoverEditor_projectName.addTextChangedListener(object : TextWatcher {
|
|
|
|
+ override fun afterTextChanged(editable: Editable?) {
|
|
|
|
+ if (editable == null) return
|
|
|
|
+ tv_frontCoverEditor_coverTitle.text = editable.toString()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
|
|
|
+ // do nothing
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
|
|
|
+ // do nothing
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ et_frontCoverEditor_author.addTextChangedListener(object : TextWatcher {
|
|
|
|
+ override fun afterTextChanged(editable: Editable?) {
|
|
|
|
+ if (editable == null) return
|
|
|
|
+ tv_frontCoverEditor_coverAuthor.text = editable.toString()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
|
|
|
+ // do nothing
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
|
|
|
+ // do nothing
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|