This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
import android .content .Context ;
8
8
import android .graphics .Color ;
9
+ import android .view .Choreographer ;
9
10
import android .view .View ;
10
11
import android .widget .TextView ;
11
12
import androidx .annotation .NonNull ;
12
13
import androidx .annotation .Nullable ;
13
14
import io .flutter .plugin .platform .PlatformView ;
14
15
15
16
public class TextPlatformView implements PlatformView {
16
- private final TextView textView ;
17
+ final TextView textView ;
17
18
18
19
@ SuppressWarnings ("unchecked" )
19
20
TextPlatformView (@ NonNull final Context context , int id , @ Nullable String params ) {
20
21
textView = new TextView (context );
21
22
textView .setTextSize (72 );
22
23
textView .setBackgroundColor (Color .rgb (255 , 255 , 255 ));
23
24
textView .setText (params );
25
+
26
+ Choreographer .getInstance ()
27
+ .postFrameCallbackDelayed (
28
+ new Choreographer .FrameCallback () {
29
+ @ Override
30
+ public void doFrame (long frameTimeNanos ) {
31
+ textView .invalidate ();
32
+ }
33
+ },
34
+ 500 );
24
35
}
25
36
26
37
@ Override
You can’t perform that action at this time.
0 commit comments