본문 바로가기

Java, JavaScript97

DPI Meaning xhdpixxhdpi420dpi (Baseline) MDPI 160 1 StyleGuide for Baseline coz 1 px equals 1 dp. Designers can design in px and Developers can put them as dp. HDPI 240 1.5 XHDPI 320 2 XXHDPI 480 3 XXXHDPI 640 4 Graphics Assets for Max Device Support 출처 다음지식인 DPI 란 무엇인가? 프린터를 살 때 보면 600 DPI, 1440 DPI하고 자랑하는 것을 보아왔을 것이다. DPI란 무엇일까? 큰 DPI 일수록 섬세해진다. DPIDPI는 Dot Per Inch 의 약자이다. 쉽게 말해 “1인치당 찍은 점의 수”이다. DPI는 인쇄.. 2018. 9. 25.
react native use variable for image file SOURCE: https://stackoverflow.com/questions/33907218/react-native-use-variable-for-image-file In JS require statements are resolved at bundle time (when the JS bundle is calculated). Therefore it's not supported to put variable expression as an argument for require.In case of requiring resources it's even more trickier. When you have require('./someimage.png'), React Native packager will locale .. 2018. 9. 23.
image and touchableOpacity SOURCE : https://facebook.github.io/react-native/docs/touchableopacity renderButton: function() { return ( ); }, import React, { Component } from 'react' import { AppRegistry, StyleSheet, TouchableOpacity, Text, View, } from 'react-native' class App extends Component { constructor(props) { super(props) this.state = { count: 0 } } onPress = () => { this.setState({ count: this.state.count+1 }) } r.. 2018. 9. 23.
Background Images in React Native SOURCE : https://thekevinscott.com/background-images-in-react-native/ import React, { Component } from 'react'; import { AppRegistry, Image, View, Text, } from 'react-native'; const remote = 'https://s15.postimg.org/tw2qkvmcb/400px.png'; export default class BackgroundImage extends Component { render() { const resizeMode = 'center'; const text = 'I am some centered text'; return ( {text} ); } } .. 2018. 9. 23.