mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-20 14:05:27 +01:00
FIX: Multiple android layout issues
This commit is contained in:
parent
1b0fea1c06
commit
a270ffc898
5 changed files with 80 additions and 90 deletions
|
@ -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',
|
||||
backgroundColor: '#ccddf9',
|
||||
minHeight: 45,
|
||||
height: 45,
|
||||
borderRadius: 25,
|
||||
minWidth: width / 1.5,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
buttonStyle={Object.assign(
|
||||
{
|
||||
backgroundColor: '#ccddf9',
|
||||
minHeight: 45,
|
||||
height: 45,
|
||||
borderWidth: 0,
|
||||
borderRadius: 25,
|
||||
},
|
||||
this.props.buttonStyle,
|
||||
)}
|
||||
color="#0c2550"
|
||||
{...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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
|
@ -51,73 +51,71 @@ export default class About extends Component {
|
|||
|
||||
<BlueTextCentered h4>Always backup your keys</BlueTextCentered>
|
||||
<BlueSpacing20 />
|
||||
</BlueCard>
|
||||
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'mark-github',
|
||||
type: 'octicon',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
Linking.openURL('https://github.com/BlueWallet/BlueWallet');
|
||||
}}
|
||||
title="github.com/BlueWallet/BlueWallet"
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'mark-github',
|
||||
type: 'octicon',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
Linking.openURL('https://github.com/BlueWallet/BlueWallet');
|
||||
}}
|
||||
title="github.com/BlueWallet/BlueWallet"
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'twitter',
|
||||
type: 'font-awesome',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
Linking.openURL('https://twitter.com/bluewalletio');
|
||||
}}
|
||||
title="Follow us on Twitter"
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'twitter',
|
||||
type: 'font-awesome',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
Linking.openURL('https://twitter.com/bluewalletio');
|
||||
}}
|
||||
title="Follow us on Twitter"
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'telegram',
|
||||
type: 'font-awesome',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
Linking.openURL('https://t.me/bluewallet');
|
||||
}}
|
||||
title="Join Telegram chat"
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'telegram',
|
||||
type: 'font-awesome',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
Linking.openURL('https://t.me/bluewallet');
|
||||
}}
|
||||
title="Join Telegram chat"
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'thumbsup',
|
||||
type: 'octicon',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
let options = {
|
||||
AppleAppID: '1376878040',
|
||||
GooglePackageName: 'io.bluewallet.bluewallet',
|
||||
preferredAndroidMarket: AndroidMarket.Google,
|
||||
preferInApp: true,
|
||||
openAppStoreIfInAppFails: true,
|
||||
fallbackPlatformURL: 'https://bluewallet.io',
|
||||
};
|
||||
Rate.rate(options, success => {
|
||||
if (success) {
|
||||
console.log('User Rated.');
|
||||
}
|
||||
});
|
||||
}}
|
||||
title="Rate Blue Wallet"
|
||||
/>
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'thumbsup',
|
||||
type: 'octicon',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => {
|
||||
let options = {
|
||||
AppleAppID: '1376878040',
|
||||
GooglePackageName: 'io.bluewallet.bluewallet',
|
||||
preferredAndroidMarket: AndroidMarket.Google,
|
||||
preferInApp: true,
|
||||
openAppStoreIfInAppFails: true,
|
||||
fallbackPlatformURL: 'https://bluewallet.io',
|
||||
};
|
||||
Rate.rate(options, success => {
|
||||
if (success) {
|
||||
console.log('User Rated.');
|
||||
}
|
||||
});
|
||||
}}
|
||||
title="Rate Blue Wallet"
|
||||
/>
|
||||
|
||||
<BlueSpacing20 />
|
||||
<BlueCard>
|
||||
<BlueSpacing20 />
|
||||
<BlueText h3>Built with awesome:</BlueText>
|
||||
<BlueSpacing20 />
|
||||
<BlueText h4>* React Native</BlueText>
|
||||
|
|
|
@ -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"
|
||||
/>
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue