mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-21 02:50:07 +01:00
adding a null check
This commit is contained in:
parent
670cfa152a
commit
7383691f67
@ -91,23 +91,25 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
|
||||
}
|
||||
|
||||
private fun setupFragment() {
|
||||
if (activity == null || activity!!.isFinishing) {
|
||||
return
|
||||
}
|
||||
|
||||
val plusIcon = resources.getColoredDrawableWithColor(R.drawable.ic_plus_vector, if (activity!!.isBlackAndWhiteTheme()) Color.BLACK else Color.WHITE)
|
||||
|
||||
view.apply {
|
||||
with(checklist_fab) {
|
||||
setImageDrawable(plusIcon)
|
||||
background.applyColorFilter(activity!!.getAdjustedPrimaryColor())
|
||||
setOnClickListener {
|
||||
showNewItemDialog()
|
||||
}
|
||||
view.checklist_fab.apply {
|
||||
setImageDrawable(plusIcon)
|
||||
background.applyColorFilter(activity!!.getAdjustedPrimaryColor())
|
||||
setOnClickListener {
|
||||
showNewItemDialog()
|
||||
}
|
||||
}
|
||||
|
||||
with(fragment_placeholder_2) {
|
||||
setTextColor(activity!!.getAdjustedPrimaryColor())
|
||||
underlineText()
|
||||
setOnClickListener {
|
||||
showNewItemDialog()
|
||||
}
|
||||
view.fragment_placeholder_2.apply {
|
||||
setTextColor(activity!!.getAdjustedPrimaryColor())
|
||||
underlineText()
|
||||
setOnClickListener {
|
||||
showNewItemDialog()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user