Android: borders on content-sized components

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

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

Hướng nghiên cứu

Start in the Android rendering path where borderWidth/borderColor are baked into a bitmap and stretched over the component; that is the code that skips drawing when there is no fixed numeric width/height. Read that path together with how the background color is applied, then check #194 for the content-sized badge/pill case that motivates this. The suggested outer-box/inner-box approach with padding is a starting point only, so confirm with maintainers before building; done means a border renders on a content-sized component with an opaque background, and fixed-size hollow or translucent borders still work.

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

Mô tả

enhancement platform:Android

On Android, borderWidth and borderColor are only drawn when a component has a fixed numeric width and height. Glance has no border modifier, so the background and border are drawn into a bitmap that Android stretches over the component. A component sized by its content, by flex or by "100%" has no size to draw that bitmap at, so the border is skipped. Content-sized badges and pills are a common case for borders (see #194).

A possible partial approach for components with an opaque background: draw the border as an outer box filled with borderColor and padded by borderWidth, around an inner box with the background. That follows the content's size. It can't produce hollow or translucent fills, because the outer color would show through, so those would still need a fixed size.

Ngôn ngữ chính
TypeScript
Star
864
Fork
51
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

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.

Issue khác của callstackincubator/voltra

Tất cả issue của callstackincubator/voltra

Issue tương tự

Thêm issue về TypeScript

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.