Код: Выделить всё
// There is a text view on group layout, no problem there.
@Override
public void onGroupCollapse(int groupPosition) {
// this callback is triggered, however, once the textView is BOLD by onGroupExpanded, the textView is not set back to normal, seems this line of code does nothing...WHY?
textView.setTypeface(textView.getTypeface(), Typeface.NORMAL);
}
@Override
public void onGroupExpand(int groupPosition) {
// it works fine
textView.setTypeface(textView.getTypeface(), Typeface.BOLD);
}
Оба обратных вызова срабатывает правильно, однако, как только textView становится BOLD обратным вызовом onGroupExpanded(...), textView не возвращается в NORMAL при последующем запуске onGroupCollapse(...). Кажется, строка кода в onGroupCollapsed(...) ничего не делает... ПОЧЕМУ?
(Опять же, срабатывает onGroupCollapse(...). Никаких проблем!)
Подробнее здесь: https://stackoverflow.com/questions/477 ... effect-why
Мобильная версия