mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-21 02:50:07 +01:00
adding a crashfix at the Plain Text notes
This commit is contained in:
parent
a9066ab343
commit
d0dfab6855
@ -14,6 +14,7 @@ import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
|
||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
|
||||
import com.simplemobiletools.commons.extensions.removeBit
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
import com.simplemobiletools.notes.pro.R
|
||||
import com.simplemobiletools.notes.pro.dialogs.RenameChecklistItemDialog
|
||||
@ -161,7 +162,7 @@ class ChecklistAdapter(activity: BaseSimpleActivity, var items: ArrayList<Checkl
|
||||
paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||
alpha = DONE_CHECKLIST_ITEM_ALPHA
|
||||
} else {
|
||||
paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG - Paint.STRIKE_THRU_TEXT_FLAG
|
||||
paintFlags = paintFlags.removeBit(Paint.STRIKE_THRU_TEXT_FLAG)
|
||||
alpha = 1f
|
||||
}
|
||||
}
|
||||
|
@ -143,9 +143,11 @@ class TextFragment : NoteFragment() {
|
||||
|
||||
if (config.showKeyboard && isMenuVisible) {
|
||||
onGlobalLayout {
|
||||
requestFocus()
|
||||
val inputManager = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputManager.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
|
||||
if (activity?.isDestroyed == false) {
|
||||
requestFocus()
|
||||
val inputManager = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputManager.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user