mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-04 10:41:08 +02: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.applyColorFilter
|
||||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||||
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
|
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
|
||||||
|
import com.simplemobiletools.commons.extensions.removeBit
|
||||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
import com.simplemobiletools.notes.pro.R
|
import com.simplemobiletools.notes.pro.R
|
||||||
import com.simplemobiletools.notes.pro.dialogs.RenameChecklistItemDialog
|
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
|
paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||||
alpha = DONE_CHECKLIST_ITEM_ALPHA
|
alpha = DONE_CHECKLIST_ITEM_ALPHA
|
||||||
} else {
|
} else {
|
||||||
paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG - Paint.STRIKE_THRU_TEXT_FLAG
|
paintFlags = paintFlags.removeBit(Paint.STRIKE_THRU_TEXT_FLAG)
|
||||||
alpha = 1f
|
alpha = 1f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,9 +143,11 @@ class TextFragment : NoteFragment() {
|
|||||||
|
|
||||||
if (config.showKeyboard && isMenuVisible) {
|
if (config.showKeyboard && isMenuVisible) {
|
||||||
onGlobalLayout {
|
onGlobalLayout {
|
||||||
requestFocus()
|
if (activity?.isDestroyed == false) {
|
||||||
val inputManager = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
requestFocus()
|
||||||
inputManager.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
|
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