From dffe8a8c0f4b4ce4ead1b37e3036156b36bf7137 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 1 Aug 2018 14:59:15 +0100 Subject: [PATCH 1/3] Add a keyboard avoiding view. --- example/App.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/App.js b/example/App.js index ddd7f143e71c09..f6ebb08ae153e8 100644 --- a/example/App.js +++ b/example/App.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import {AppRegistry, StyleSheet, View, FlatList} from 'react-native'; +import {AppRegistry, StyleSheet, View, FlatList, KeyboardAvoidingView} from 'react-native'; import {example_content} from './content'; import RCTAztecView from 'react-native-aztec' @@ -15,7 +15,7 @@ export default class example extends React.Component { render() { let myMinHeight = Math.max(_minHeight, this.state.height); return ( - + { @@ -42,7 +42,7 @@ export default class example extends React.Component { maxImagesWidth = {200} /> } /> - + ); } } From ef54b8ba7578b960d9cdeba4e6b99f150cdb6267 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 1 Aug 2018 17:45:35 +0100 Subject: [PATCH 2/3] Restore sample content. --- example/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/App.js b/example/App.js index f6ebb08ae153e8..af13964485eb23 100644 --- a/example/App.js +++ b/example/App.js @@ -30,7 +30,7 @@ export default class example extends React.Component { { From d569a6169a854da2c2eb935baf0b2b790267bb78 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 1 Aug 2018 18:37:53 +0100 Subject: [PATCH 3/3] Take in account the SafeView in iOS --- example/App.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/example/App.js b/example/App.js index af13964485eb23..d08e1961faa735 100644 --- a/example/App.js +++ b/example/App.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import {AppRegistry, StyleSheet, View, FlatList, KeyboardAvoidingView} from 'react-native'; +import {AppRegistry, StyleSheet, View, FlatList, KeyboardAvoidingView, SafeAreaView, Platform} from 'react-native'; import {example_content} from './content'; import RCTAztecView from 'react-native-aztec' @@ -11,11 +11,11 @@ export default class example extends React.Component { this.state = {isShowingText: true, height: _minHeight, text: example_content()}; console.log("a ver que tiene" + JSON.stringify(this.state)); } - + render() { - let myMinHeight = Math.max(_minHeight, this.state.height); - return ( - + let myMinHeight = Math.max(_minHeight, this.state.height); + const mainContent = ( + } /> - - ); + + ); + if (Platform.OS === "ios") { + return ({mainContent}) + } else { + return mainContent + } } }