Commit 269d48e7 authored by Marek Kotewicz's avatar Marek Kotewicz
Browse files

fixing style on adroid

parent 31b5b471
......@@ -40,7 +40,12 @@ public class EthkeyBridge extends ReactContextBaseJavaModule {
@ReactMethod
public void rlpItem(String rlp, int position, Promise promise) {
promise.resolve(ethkeyRlpItem(rlp, position));
try {
promise.resolve(ethkeyRlpItem(rlp, position));
} catch (Exception e) {
promise.reject("invalid rlp", null, null);
}
}
@ReactMethod
......
......@@ -20,7 +20,7 @@ export default class AccountDetails extends Component {
<Text style={AppStyles.valueText}>{this.props.account.name ? this.props.account.name : 'no name'}</Text>
<Text style={AppStyles.hintText}>Address</Text>
<Text style={AppStyles.valueText}>{this.props.account.address}</Text>
<View style={styles.buttonContainer}>
<View style={AppStyles.buttonContainer}>
<Button
style={styles.button}
onPress={this.props.onDisplayAddressPressed}
......@@ -28,6 +28,8 @@ export default class AccountDetails extends Component {
color='green'
accessibilityLabel='Press to address QR Code'
/>
</View>
<View style={AppStyles.buttonContainer}>
<Button
style={styles.button}
onPress={() => this.props.onDeleteAccountPressed(this.props.account)}
......@@ -42,10 +44,6 @@ export default class AccountDetails extends Component {
}
const styles = StyleSheet.create({
buttonContainer: {
//flexDirection: 'row',
//justifyContent: 'space-between'
},
button: {
flex: 0.5,
}
......
'use strict'
import React, { Component, PropTypes } from 'react'
import { Text, TextInput, View, StyleSheet } from 'react-native'
import { Text, TextInput, View } from 'react-native'
import AppStyles from '../styles'
export default class AccountPin extends Component {
static propTypes = {
......@@ -17,9 +18,10 @@ export default class AccountPin extends Component {
render() {
return (
<View style={styles.view}>
<View style={AppStyles.view}>
<View style={AppStyles.center}>
<TextInput
style={styles.input}
style={AppStyles.pin}
placeholder='enter pin here'
editable={true}
multiline={false}
......@@ -32,20 +34,7 @@ export default class AccountPin extends Component {
onEndEditing={() => { this.props.onNextPressed(this.state.text, this.props.account, this.props.extra) }}
/>
</View>
</View>
)
}
}
const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 300,
alignItems: 'center',
justifyContent: 'center',
},
input: {
height: 20,
textAlign: 'center'
}
})
......@@ -32,12 +32,14 @@ export default class Send extends Component {
<Text style={AppStyles.valueText}>{this.props.txGasPrice}</Text>
<Text style={AppStyles.hintText}>data</Text>
<Text style={AppStyles.valueText}>{this.props.txData}</Text>
<View style={AppStyles.buttonContainer}>
<Button
onPress={() => this.props.nextButtonAction()}
title={this.props.nextButtonTitle}
color="green"
accessibilityLabel={this.props.nextButtonDescription}
/>
</View>
</ScrollView>
)
}
......
'use strict'
import React, { Component } from 'react'
import { View, ScrollView, Text, TextInput, Button, StyleSheet } from 'react-native'
import { View, ScrollView, Text, TextInput, Button } from 'react-native'
import { connect } from 'react-redux'
import { Actions } from 'react-native-router-flux'
import debounce from 'debounce'
......@@ -46,19 +46,18 @@ export class AccountNew extends Component {
address: address,
})
} catch (e) {
// this should never fail
}
}
render() {
var self = this;
return (
<ScrollView style={AppStyles.view}>
<Text style={AppStyles.hintText}>name</Text>
<TextInput
placeholder='My Account'
value={this.state.name}
style={styles.input}
style={AppStyles.inputValue}
editable={true}
multiline={false}
returnKeyType='next'
......@@ -87,20 +86,6 @@ export class AccountNew extends Component {
}
}
const styles = StyleSheet.create({
hint: {
marginBottom: 20,
},
address: {
marginBottom: 20,
fontSize: 12,
},
input: {
height: 20,
marginBottom: 20,
}
})
export default connect(
undefined,
mapDispatchToProps
......
'use strict'
//'use strict'
import React from 'react'
import { StyleSheet } from 'react-native'
import { Platform, StyleSheet } from 'react-native'
export default StyleSheet.create({
view: {
flex: 1,
marginTop: 64,
marginTop: (Platform.OS === 'ios') ? 64 : 54,
marginBottom: 50,
padding: 20
padding: 20,
},
listView: {
flex: 1,
marginTop: 64,
marginTop: (Platform.OS === 'ios') ? 64 : 54,
marginBottom: 50,
},
hintText: {
......@@ -26,4 +26,23 @@ export default StyleSheet.create({
marginBottom: 20,
fontWeight: 'bold',
},
inputValue: {
color: 'black',
marginBottom: 20,
height: 40,
},
pin: {
color: 'black',
height: 70,
width: 300,
textAlign: 'center',
},
center: {
flex: 1,
alignItems:'center',
justifyContent:'center',
},
buttonContainer: {
height: 65,
},
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment