Conversation
|
See how the text in the Todo txt dialogs are highlighted. This will be a 1 function call |
| return false; | ||
| } | ||
|
|
||
| private Spannable getTaskSpannable(TodoTxtTask task) { |
There was a problem hiding this comment.
This static function will return a highlighter callable which can apply todotxt highlighting to a spannable.
So simply
final GsCallback.a1<Spannable> hl = getSttHighlighter();
for (Spannable s : lines) {
hl.callback(s)
}
There was a problem hiding this comment.
This will highlight every line in lines
You will need to make getSttHighlighter public and move it somewhere appropriate.
There was a problem hiding this comment.
final GsCallback.a1<Spannable> hl = getSttHighlighter();
Spannable s = new SpannableString(_tasks.get(position).getLine());
hl.callback(s);
views.setTextViewText(R.id.todo_widget_item_text, s);
I couldn't make it work. What is wrong here?
It's also very important to remove creation dates, priority parentheses, etc. as they take up valuable space especially on narrower screens. How would that be achieved?,
|
from me:
|
|
Hello @wshoy |
|
The highlighter doesn't seem to work, then I guess that's all. Just not sure about the duplicated colors. Somewhere in the future I plan to make a separate plain text widget. #1997 |
Where should I get color from?