react / react/react-native

Fontsize changing only once with systems settings in Android 15

Đang mở
#49,459 5 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Issue: Author Provided Repro Platform: Android
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Description

When changing the sytems fontsize a react native application in Android does not change the fontsize until it is restarted, in Android versions <=14 it is rerendered in the new fontsize on the fly.

Steps to reproduce
  1. create new project from via npx @react-native-community/cli@latest init projectname and begin running it
  2. Use two android version for this test , particularly use Android 14 Pixel 8 , and another Android 15 Pixel 8
  3. start example app
  4. change fontsize at least two times -> Android 14 font resizes, Android 15 font stays the same

Android15 stays the same after changing fontSize:
Image
Android15 after restart with changed fontSize:
Image

Android14 before changing size:
Image
Android14 afterchanging size:
Image

Video showing only first fontSize change has effect until restarting App:

https://github.com/user-attachments/assets/42a4a157-6c72-4a99-aa9e-c315b9071adb

React Native Version

0.77.1 and before

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 15.3.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 1.34 GB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.6.2
    path: ~/.nvm/versions/node/v21.6.2/bin/node
  Yarn:
    version: 1.22.21
    path: ~/.nvm/versions/node/v21.6.2/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v21.6.2/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.7.8
    path: /opt/homebrew/opt/ruby@2.7/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.1
    wanted: 0.77.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false
Stacktrace or Logs
nothing
Reproducer

https://github.com/recumbentseeker/fontscale

Screenshots and Videos

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Trước tiên, hãy chạy trình tái hiện fontscale được liên kết trên Android 14 và Android 15, sau đó lặp lại các thay đổi kích thước phông chữ hệ thống được mô tả trong issue. So sánh hành vi trước và sau khi khởi động lại ứng dụng, đồng thời truy vết quá trình xử lý liên quan trong Android runtime. Công việc được xem là hoàn tất khi các thay đổi kích thước phông chữ tiếp tục cập nhật ứng dụng React Native mà không yêu cầu khởi động lại, trong khi hành vi trên Android 14 vẫn được giữ nguyên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.