Alternate for Input accessory view for Android

794 Views Asked by At

this is my code its working fine in ios but not on android is there any alternative of this for android (input accessory view

import React, { Component, useState } from 'react';
import {
         StyleSheet,
         InputAccessoryView,
         Button,
         FlatList, 
         TextInput, 
         ScrollView, 
         KeyboardAvoidingView,
         TouchableWithoutFeedback,
         Platform, 
         Keyboard, 
         View, 
         Text,
          }
from 'react-native';
import { KeyboardAwareFlatList } from 'react-native-keyboard-aware-scroll-view'
    
const ConnectWithPeople = () => {
   const [text, setText] = useState(initialText);

      return (
        <View style={styles.view}>
    
          <KeyboardAwareFlatList
            style={{ aspectRatio: 1 }}
            contentContainerStyle={{ flex: 1, }}
            data={[1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11,]}
            renderItem={() => {
              return (
    
                <View style={{ backgroundColor: 'red', marginBottom: 10, height: 60 }}>
    
                </View>
    
              )
            }}
    
            ListFooterComponent={() => {
              return (
    
                <InputAccessoryView >
    
                  <TextInput style={styles.TextInput}
                    inputAccessoryViewID={inputAccessoryViewID}
                    onChangeText={setText()}
                    value={text}
                    placeholder="please type here..."
                  />
                </InputAccessoryView>
              )
            }}
    
          />
    
    
        </View>
    
      );
    };
    
    const styles = StyleSheet.create({
      container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#FFFFFF',
      },
      TextInput: {
        padding: 10,
        marginTop: 550,
        marginLeft: 20,
        marginRight: 10,
        maxWidth: 350,
        borderWidth: 1,
        },
        
        view: {
        flex: 1,
        paddingTop: 6
         },
        });

0

There are 0 best solutions below