mirror of
				https://github.com/SimpleMobileTools/Simple-Notes.git
				synced 2025-06-05 17:00:23 +02:00 
			
		
		
		
	fixing some coloring issues
This commit is contained in:
		| @@ -1,6 +1,5 @@ | |||||||
| package com.simplemobiletools.notes.pro.fragments | package com.simplemobiletools.notes.pro.fragments | ||||||
|  |  | ||||||
| import android.graphics.Color |  | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
| import android.view.LayoutInflater | import android.view.LayoutInflater | ||||||
| import android.view.View | import android.view.View | ||||||
| @@ -41,7 +40,6 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { | |||||||
|  |  | ||||||
|     override fun onResume() { |     override fun onResume() { | ||||||
|         super.onResume() |         super.onResume() | ||||||
|  |  | ||||||
|         loadNoteById(noteId) |         loadNoteById(noteId) | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -60,8 +58,7 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { | |||||||
|  |  | ||||||
|                 try { |                 try { | ||||||
|                     val checklistItemType = object : TypeToken<List<ChecklistItem>>() {}.type |                     val checklistItemType = object : TypeToken<List<ChecklistItem>>() {}.type | ||||||
|                     items = Gson().fromJson<ArrayList<ChecklistItem>>(storedNote.value, checklistItemType) |                     items = Gson().fromJson<ArrayList<ChecklistItem>>(storedNote.value, checklistItemType) ?: ArrayList(1) | ||||||
|                         ?: ArrayList(1) |  | ||||||
|                 } catch (e: Exception) { |                 } catch (e: Exception) { | ||||||
|                     migrateCheckListOnFailure(storedNote) |                     migrateCheckListOnFailure(storedNote) | ||||||
|                 } |                 } | ||||||
| @@ -70,7 +67,6 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { | |||||||
|                     items.sortBy { it.isDone } |                     items.sortBy { it.isDone } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 activity?.updateTextColors(view.checklist_holder) |  | ||||||
|                 setupFragment() |                 setupFragment() | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| @@ -95,18 +91,22 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { | |||||||
|             return |             return | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         val plusIcon = resources.getColoredDrawableWithColor(R.drawable.ic_plus_vector, if (activity!!.isBlackAndWhiteTheme()) Color.BLACK else Color.WHITE) |         val adjustedPrimaryColor = activity!!.getAdjustedPrimaryColor() | ||||||
|  |  | ||||||
|         view.checklist_fab.apply { |         view.checklist_fab.apply { | ||||||
|             setImageDrawable(plusIcon) |             setColors( | ||||||
|             background?.applyColorFilter(activity!!.getAdjustedPrimaryColor()) |                 activity!!.config.textColor, | ||||||
|  |                 adjustedPrimaryColor, | ||||||
|  |                 adjustedPrimaryColor.getContrastColor() | ||||||
|  |             ) | ||||||
|  |  | ||||||
|             setOnClickListener { |             setOnClickListener { | ||||||
|                 showNewItemDialog() |                 showNewItemDialog() | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         view.fragment_placeholder.setTextColor(activity!!.config.textColor) | ||||||
|         view.fragment_placeholder_2.apply { |         view.fragment_placeholder_2.apply { | ||||||
|             setTextColor(activity!!.getAdjustedPrimaryColor()) |             setTextColor(adjustedPrimaryColor) | ||||||
|             underlineText() |             underlineText() | ||||||
|             setOnClickListener { |             setOnClickListener { | ||||||
|                 showNewItemDialog() |                 showNewItemDialog() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user