Browse Source

FIX: Multiple android layout issues

pulltorefresh
Marcos Rodriguez Vélez 6 years ago
parent
commit
a270ffc898
  1. 27
      BlueComponents.js
  2. 6
      screen/lnd/lndCreateInvoice.js
  3. 2
      screen/settings/about.js
  4. 6
      screen/settings/lightningSettings.js
  5. 3
      screen/wallets/add.js

27
BlueComponents.js

@ -44,30 +44,27 @@ if (aspectRatio > 1.6) {
export class BlueButton extends Component {
render() {
// eslint-disable-next-line
this.props.buttonStyle = this.props.buttonStyle || {};
return (
<Button
activeOpacity={0.1}
delayPressIn={0}
<TouchableOpacity
style={{
flex: 1,
borderWidth: 0.7,
borderColor: 'transparent',
}}
buttonStyle={Object.assign(
{
backgroundColor: '#ccddf9',
minHeight: 45,
height: 45,
borderWidth: 0,
borderRadius: 25,
},
this.props.buttonStyle,
)}
color="#0c2550"
minWidth: width / 1.5,
justifyContent: 'center',
alignItems: 'center',
}}
{...this.props}
/>
>
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
{this.props.icon && <Icon name={this.props.icon.name} type={this.props.icon.type} color={this.props.icon.color} />}
<Text style={{ marginHorizontal: 8, fontSize: 16, color: '#0c2550' }}>{this.props.title}</Text>
</View>
</TouchableOpacity>
);
}
}

6
screen/lnd/lndCreateInvoice.js

@ -51,11 +51,7 @@ export default class LNDCreateInvoice extends Component {
{this.state.isLoading ? (
<ActivityIndicator />
) : (
<BlueButton
disabled={!(this.state.description.length > 0 && this.state.amount > 0)}
onPress={() => this.createInvoice()}
title={loc.send.details.create}
/>
<BlueButton disabled={!this.state.amount > 0} onPress={() => this.createInvoice()} title={loc.send.details.create} />
)}
</View>
);

2
screen/settings/about.js

@ -51,7 +51,6 @@ export default class About extends Component {
<BlueTextCentered h4>Always backup your keys</BlueTextCentered>
<BlueSpacing20 />
</BlueCard>
<BlueButton
icon={{
@ -117,7 +116,6 @@ export default class About extends Component {
/>
<BlueSpacing20 />
<BlueCard>
<BlueText h3>Built with awesome:</BlueText>
<BlueSpacing20 />
<BlueText h4>* React Native</BlueText>

6
screen/settings/lightningSettings.js

@ -3,6 +3,7 @@ import { AsyncStorage, View, TextInput, Linking } from 'react-native';
import { AppStorage } from '../../class';
import { BlueLoading, BlueSpacing20, BlueButton, SafeBlueArea, BlueCard, BlueNavigationStyle, BlueText } from '../../BlueComponents';
import PropTypes from 'prop-types';
import { Button } from 'react-native-elements';
import { LightningCustodianWallet } from '../../class/lightning-custodian-wallet';
/** @type {AppStorage} */
let BlueApp = require('../../BlueApp');
@ -56,7 +57,7 @@ export default class LightningSettings extends Component {
<BlueText>{loc.settings.lightning_settings_explain}</BlueText>
</BlueCard>
<BlueButton
<Button
icon={{
name: 'mark-github',
type: 'octicon',
@ -67,6 +68,7 @@ export default class LightningSettings extends Component {
Linking.openURL('https://github.com/BlueWallet/LndHub');
}}
title="github.com/BlueWallet/LndHub"
color={BlueApp.settings.buttonTextColor}
buttonStyle={{
backgroundColor: '#FFFFFF',
}}
@ -92,7 +94,7 @@ export default class LightningSettings extends Component {
value={this.state.URI}
onChangeText={text => this.setState({ URI: text })}
numberOfLines={1}
style={{ flex: 1, marginHorizontal: 8, minHeight: 33, height: 33 }}
style={{ flex: 1, marginHorizontal: 8, minHeight: 36, height: 36 }}
editable={!this.state.isLoading}
underlineColorAndroid="transparent"
/>

3
screen/wallets/add.js

@ -182,9 +182,6 @@ export default class WalletsAdd extends Component {
{!this.state.isLoading ? (
<BlueButton
title={loc.wallets.add.create}
buttonStyle={{
width: width / 1.5,
}}
onPress={() => {
this.setState(
{ isLoading: true },

Loading…
Cancel
Save