Android: borders on content-sized components

Abierto
#380 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, kotlin, react-native
Área
mobile-dev

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
864
Forks
51
Merge medio
2 d 2 h
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/voltra

Todos los issues de callstackincubator/voltra

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.