GithubHelp home page GithubHelp logo

Comments (5)

demchenkoalex avatar demchenkoalex commented on June 30, 2024 1

Hi @mariovillamizar thanks for the kind words :) I will check this ASAP (probably this weekend). Can you please give an example of a background you are using? Is it ImageBackground or some kind of blur library?

from react-native-keyboard-accessory-view.

mariovillamizar avatar mariovillamizar commented on June 30, 2024

Hey @demchenkoalex take a look of the screenshots:
Simulator Screen Shot - iPhone 11 - 2021-04-08 at 12 30 51
Simulator Screen Shot - iPhone 11 - 2021-04-08 at 12 31 02

This is my code:

<KeyboardAccessoryView 
    contentContainerStyle={{overflow: 'hidden'}}
    renderScrollable={renderScrollable}
    renderBackground={renderBackground}
    useListenersOnAndroid
    spaceBetweenKeyboardAndAccessoryView={Platform.OS == 'android' ? 20 : 0}
    contentOffsetKeyboardOpened={Platform.OS == 'android' ? 20 : 40}
>
const renderScrollable = (panHandlers: GestureResponderHandlers) => (
    <ScrollView ref={scrollView} keyboardDismissMode='interactive' {...panHandlers}>
        
        <View style={styles.recommendContainer}>
            <TextField
                value={screen.state.comment}
                containerStyle={styles.textFieldContainer}
                inputStyle={styles.textFieldInput}
                onChangeText={(text: string) => screen.setComment(text)}
                autoCapitalize={'sentences'}
                autoCorrect
                multiline
                maxLength={inputCharactersLimit}
                errorMessage={`${screen.state.comment?.length ?? 0}/${inputCharactersLimit}`}
                errorStyle={styles.textFieldCounter}
                scrollEnabled={false}
                onContentSizeChange={() => scrollView.current?.scrollToEnd()}
                //autoFocus
            />
        </View> 
    </ScrollView>
)

const renderBackground = () => (
    <View style={{backgroundColor: 'red', height: 400, width: 400}}></View>
)

The background view is the red box (just for test purposes). Let me know if you need some extra info.

from react-native-keyboard-accessory-view.

demchenkoalex avatar demchenkoalex commented on June 30, 2024

I should probably emphasise this, but in the docs

(e.g. <ImageBackground style={StyleSheet.absoluteFill} /> ). Remember about absolute positioning.

background should be absolute positioned otherwise it will depend on a view you have in accessory, can you please try

<View style={StyleSheet.flatten([StyleSheet.absoluteFill, {backgroundColor: 'red', height: 400, width: 400}])}></View>

from react-native-keyboard-accessory-view.

demchenkoalex avatar demchenkoalex commented on June 30, 2024

Hi @mariovillamizar were you able to fix this using absolute positioning?

from react-native-keyboard-accessory-view.

demchenkoalex avatar demchenkoalex commented on June 30, 2024

Closing due no response, feel free to reopen if the issue is still there

from react-native-keyboard-accessory-view.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.