Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
Posicionamiento de imagen al inicio de línea solo en Android React-Native (expo)

Estoy tratando de representar imágenes usando el paquete react-native-htmlview , pero en Android solo coloca la posición de la imagen al comienzo de la línea. Funciona bastante bien en iOS.

Androide:

renderizar imágenes en Android

iOS:

renderizar imágenes en iOS

La react-native-htmlview básicamente representa una cadena html reemplazada con componentes React Native.

Traté de cambiar los estilos a position:'absolute' , justifyContent: 'flex-start' , flexDirection:'row' , establecí un paddingTop: imgWidth , pero nada funciona...

Cuando realizo algún cambio en el código y el simulador de Android se actualiza, ¡las imágenes se mueven a la posición correcta!

El código:

 import React from 'react'; import { StyleSheet, Dimensions, Image } from 'react-native'; import ImageZoom from 'react-native-image-pan-zoom'; import HTMLView from 'react-native-htmlview'; export function HtmlView(props) { let now = new Date().getTime() const renderNode = (node, index, siblings, parent, defaultRenderer) => { if (node.name === 'img') { const data = node.attribs; const imgWidth = Dimensions.get('window').width - 100 return ( <View key={`${now}-img-view`} style={props.type == 'resolution'? styles.imgViewResolution: styles.imgView}> <ImageZoom key={`${now}-img-zoom`} style={styles.imageZoom} cropWidth={imgWidth} cropHeight={imgWidth} imageWidth={imgWidth} imageHeight={imgWidth}> <Image resizeMode="contain" key={`${now}-img`} source={{ uri: data.src }} style={{ width: imgWidth, height: imgWidth, aspectRatio: 1 }} /> </ImageZoom> <Text key={`${now}-img-text`} style={props.type == 'cell'? cellStyles.zoomImageText : styles.zoomImageText}><Ionicons name="resize-outline" size={12}/> utilize o zoom para ampliar a imagem</Text> </View> ); } return ( <HTMLView key={`${now}-htmlview`} stylesheet={styles} renderNode={renderNode} paragraphBreak={props.paragraphBreak || '\n'} value={props.value}/> ) }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!