그리는 수평한 원칙에 반응 Native

나는've tried반응이티브-hr패키지지 않는't work for me 도에 안드로이드나 iOS.

다음 코드에도 적합하지 않기 때문에 그것을 렌더링하는 세 가지 점에서 말

<Text numberOfLines={1}}>               
    ______________________________________________________________
</Text>
해결책

당신은 단순히 사용하는 빈 보기 하단 국경이다.

해설 (6)

중 하나를 사용할 수 있습 여백에서는 순서를 변화의 폭을 줄이고 센터도 있습니다.

import { StyleSheet } from 'react-native;


const styles = StyleSheet.create({
  lineStyle:{
        borderWidth: 0.5,
        borderColor:'black',
        margin:10,
   }
 });

주고 싶은 경우에 마진 동적으로 다음을 사용할 수 있는 차원의 폭입니다.

해설 (3)

나는 최근에 이 문제를 해결합니다.

 ────────  Register With  ────────

이 결과는:

해설 (6)

았는데,이렇게 하면 된다. 이


OR

style:

hairline: {
  backgroundColor: '#A2A2A2',
  height: 2,
  width: 165
},

loginButtonBelowText1: {
  fontFamily: 'AvenirNext-Bold',
  fontSize: 14,
  paddingHorizontal: 5,
  alignSelf: 'center',
  color: '#A2A2A2'
},
해설 (2)

수도 있습네이티브 반응 시간 구성 요소

npm i react-native-hr-component --save

귀하의 코드:

import Hr from 'react-native-hr-component'

//..

<Hr text="Some Text" fontSize={5} lineColor="#eee" textPadding={5} textStyles={yourCustomStyles} hrStyles={yourCustomHRStyles} />
해설 (1)

이에 반응하는 기본(JSX)코드,업데이트 오늘:



const styles = StyleSheet.create({
viewStyleForLine: {
    borderBottomColor: "black", 
    borderBottomWidth: StyleSheet.hairlineWidth, 
    alignSelf:'stretch',
    width: "100%"
  }
})

중 하나를 사용할 수 있습니다alignSelf:&#39;스&#39;또는폭:"100%"두어야 한다. 고,

borderBottomWidth: StyleSheet.hairlineWidth

여기시오.hairlineWidth은 얇고, 그런 다음

borderBottomWidth: 1,

그리고 증가 두께의 라인입니다.

해설 (0)

왜't 당신이 뭔가를 이것을 좋아하는가?

해설 (0)
import { View, Dimensions } from 'react-native'

var { width, height } = Dimensions.get('window')

// Create Component


해설 (0)

어쩌면 당신은 당신을 시도를 사용하여 반응하는 기본 시간은 무언가 이것을 좋아한다:

<Hr lineColor='#b3b3b3'/>

문서:https://www.npmjs.com/package/react-native-hr

해설 (1)

그냥 보기를 만들 구성 요소가있는 작은 높이입니다.

해설 (0)

당신이 사용할 수 있는 기본 요소 분배기입니다.

으로 설치:

npm install --save react-native-elements
# or with yarn
yarn add react-native-elements

import { Divider } from 'react-native-elements'

다음으로 이동:

Source

해설 (1)
import {Dimensions} from 'react-native'

const { width, height } = Dimensions.get('window')

해설 (1)

이것은 어떻게 해결된 분진 수평 라인과에서 텍스트 midddle:



  OR

과 스타일이:

import { Dimensions, StyleSheet } from 'react-native'

const { width } = Dimensions.get('window')

const styles = StyleSheet.create({
divider: {
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: 10,
  },
  hrLine: {
    width: width / 3.5,
    backgroundColor: 'white',
    height: 1,
  },
  dividerText: {
    color: 'white',
    textAlign: 'center',
    width: width / 8,
  },
})
해설 (0)