Merge pull request #1296 from alexbakker/shown-entries-bold

Only bold number of shown entries if found in the translated string
pull/1301/head
Michael Schättgen 12 months ago committed by GitHub
commit fbd3bf3ff5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -865,8 +865,10 @@ public class EntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
String entriesShownString = String.format("%d", entriesShown); String entriesShownString = String.format("%d", entriesShown);
int spanStart = entriesShownSpannable.toString().indexOf(entriesShownString); int spanStart = entriesShownSpannable.toString().indexOf(entriesShownString);
int spanEnd = spanStart + entriesShownString.length(); if (spanStart >= 0) {
entriesShownSpannable.setSpan(new StyleSpan(Typeface.BOLD), spanStart, spanEnd, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); 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 textView = _footerView.findViewById(R.id.entries_shown_count);
textView.setText(entriesShownSpannable); textView.setText(entriesShownSpannable);

Loading…
Cancel
Save