Skip to content

Commit

Permalink
Merge pull request #1296 from alexbakker/shown-entries-bold
Browse files Browse the repository at this point in the history
Only bold number of shown entries if found in the translated string
  • Loading branch information
michaelschattgen authored Mar 13, 2024
2 parents 2d0e201 + 8951c19 commit fbd3bf3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,10 @@ public void refresh() {

String entriesShownString = String.format("%d", entriesShown);
int spanStart = entriesShownSpannable.toString().indexOf(entriesShownString);
int spanEnd = spanStart + entriesShownString.length();
entriesShownSpannable.setSpan(new StyleSpan(Typeface.BOLD), spanStart, spanEnd, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
if (spanStart >= 0) {
int spanEnd = spanStart + entriesShownString.length();
entriesShownSpannable.setSpan(new StyleSpan(Typeface.BOLD), spanStart, spanEnd, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}

TextView textView = _footerView.findViewById(R.id.entries_shown_count);
textView.setText(entriesShownSpannable);
Expand Down

0 comments on commit fbd3bf3

Please sign in to comment.