Debug answers

pull/194/merge
M66B 3 years ago
parent c2c578c8fb
commit ba1f517e4e

@ -1940,12 +1940,18 @@ public class FragmentCompose extends FragmentBase {
for (String group : groups) for (String group : groups)
map.put(group, main.addSubMenu(Menu.NONE, order, order++, group)); map.put(group, main.addSubMenu(Menu.NONE, order, order++, group));
NumberFormat NF = NumberFormat.getNumberInstance();
for (EntityAnswer answer : answers) { for (EntityAnswer answer : answers) {
if (answer.favorite) if (answer.favorite)
continue; continue;
order++; order++;
String name = answer.name; SpannableStringBuilder name = new SpannableStringBuilder(answer.name);
if (grouped && answer.applied > 0) {
name.append(" (").append(NF.format(answer.applied)).append(")");
name.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_SMALL),
answer.name.length() + 1, name.length(), 0);
}
MenuItem item; MenuItem item;
if (answer.group == null) if (answer.group == null)

@ -2940,7 +2940,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
for (EntityAnswer answer : answers) { for (EntityAnswer answer : answers) {
order++; order++;
String name = answer.name; SpannableStringBuilder name = new SpannableStringBuilder(answer.name);
if (grouped && answer.applied > 0) {
name.append(" (").append(NF.format(answer.applied)).append(")");
name.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_SMALL),
answer.name.length() + 1, name.length(), 0);
}
MenuItem item; MenuItem item;
if (answer.group == null) if (answer.group == null)

Loading…
Cancel
Save