2017-02-03 15:12:43 +01:00
|
|
|
package org.mariotaku.twidere.view
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import android.util.AttributeSet
|
|
|
|
import org.mariotaku.chameleon.view.ChameleonTextView
|
2017-05-13 08:19:23 +02:00
|
|
|
import org.mariotaku.twidere.extension.setupEmojiFactory
|
2017-02-03 15:12:43 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by mariotaku on 2017/2/3.
|
|
|
|
*/
|
|
|
|
|
2017-02-05 04:13:28 +01:00
|
|
|
open class FixedTextView(context: Context, attrs: AttributeSet? = null) : ChameleonTextView(context, attrs) {
|
2017-02-03 15:12:43 +01:00
|
|
|
|
2017-02-13 17:44:56 +01:00
|
|
|
init {
|
2017-05-13 08:19:23 +02:00
|
|
|
setupEmojiFactory()
|
2017-02-13 17:44:56 +01:00
|
|
|
}
|
|
|
|
|
2017-02-03 15:12:43 +01:00
|
|
|
override fun onTextContextMenuItem(id: Int): Boolean {
|
|
|
|
try {
|
|
|
|
return super.onTextContextMenuItem(id)
|
|
|
|
} catch (e: AbstractMethodError) {
|
|
|
|
// http://crashes.to/s/69acd0ea0de
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
2017-05-13 08:19:23 +02:00
|
|
|
|
2017-02-03 15:12:43 +01:00
|
|
|
}
|