Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c23244c

Browse files
author
Emmanuel Garcia
committed
temporary workaround
1 parent fd5c6bc commit c23244c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformView.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import android.content.Context;
88
import android.graphics.Color;
9+
import android.view.Choreographer;
910
import android.view.View;
1011
import android.widget.TextView;
1112
import androidx.annotation.NonNull;
@@ -21,6 +22,16 @@ public class TextPlatformView implements PlatformView {
2122
textView.setTextSize(72);
2223
textView.setBackgroundColor(Color.rgb(255, 255, 255));
2324
textView.setText(params);
25+
26+
// Investigate why this is needed to make some gold tests pass.
27+
Choreographer.getInstance()
28+
.postFrameCallback(
29+
new Choreographer.FrameCallback() {
30+
@Override
31+
public void doFrame(long frameTimeNanos) {
32+
textView.invalidate();
33+
}
34+
});
2435
}
2536

2637
@Override

0 commit comments

Comments
 (0)