react native - Sticky footer button for form is not shown when keyboard pops up -
i have sticky footer button in form component. when opening keyboard button should on top of keyboard. tried use keyboardavoidingview
in many ways didn't help.
my current code:
//... <view style={styles.container}> <animated.view style={[styles.line, { left: this.state.progressbar }]} /> <kheader hasborderbottom={false} left={ <iconbutton onpress={onpreviousstep} style={styles.backicon} name="back" size={20} /> } /> <animated.view style={[styles.body, { left: this.state.stepcontainerposition }]}> {react.cloneelement(this.props.children[step], { aftersubmit: onnextstep, submittedfieldswitherrors, updatefocus, shouldwaitanimationtofocus: true, })} </animated.view> <footerbutton caption={this.props.children[step].props.buttonlabel} onpress={this.onsubmit} /> </view> //... const footerbutton = ({ caption, onpress }) => <view style={styles.footer}> <somebuttoncomponent caption={caption} type="primary" size="fullwidth" style={styles.button} onpress={onpress} /> </view>; const styles = stylesheet.create({ footer: { flexdirection: 'row', flex: 0.2, }, button: { alignself: 'flex-end', position: 'absolute', }, });
current behaviour when keyboard opened:
android: footer button shown on top of keyboard expected behaviour. when closing splash screen shown brief second keyboard was
ios: button not shown anymore.
how can achieve sticky button on top of keyboard?
Comments
Post a Comment