79557850

Date: 2025-04-06 06:18:21
Score: 1
Natty:
Report link

I changed this code

public void updateGooglePlayPurchaseInformation()
{
...
    _billingPreference.setSummary(summary);
}

to add a "dummy" swiping, this somehow updates the screen with the latest summary text.

public void updateGooglePlayPurchaseInformation()
{
...
    _billingPreference.setSummary(summary);

    // This works: scrollToPreference() followed by scrollBy();
    scrollToPreference(_billingPreference);
    RecyclerView recyclerView = this.getListView();
    if (recyclerView != null) {
        // x and y do not seem to matter
        recyclerView.scrollBy(0, 0);
    }
}

I don't know why the updated summary does not display (maybe something because of the callback code running on different threads?) but the "swiping-by-code" causes the last summary to be displayed as if the user had done the swiping.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Christoph Maurer