Wie man verhindern, dass Modal verschoben wird, wenn ich InputText öffneAndroid

Forum für diejenigen, die für Android programmieren
Anonymous
 Wie man verhindern, dass Modal verschoben wird, wenn ich InputText öffne

Post by Anonymous »

Wenn ich in dieser React -native App für Android auf den InputText drücke, wird die Tastatur geöffnet und die UI -Elemente sind verschoben. Ich möchte nicht, dass sie vertrieben werden, ich möchte, dass sie nur dort sind, wo sie sind. (Hier ist der Code der Datei app.tsx) < /p>

Code: Select all

import React from 'react';
import { View, TextInput, Modal, ImageBackground, KeyboardAvoidingView, TouchableOpacity, Image, Platform, StyleSheet, Text } from 'react-native';

const App = () => {
return (










);
};

const styles = StyleSheet.create({
imageBackground: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
width: '100%',
resizeMode: 'cover',
},
inputIncomeDescription: {
backgroundColor: 'white',
padding: 5,
marginTop: 10,
top: 100,
borderRadius: 15,
width: 300,
height: 40,
textAlign: 'center',
},
roundedRectangleInIncomeView: {
backgroundColor: '#ebf1f4',
width: '100%',
borderTopLeftRadius: 40,
borderTopRightRadius: 40,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0,
position: 'absolute',
bottom: 0,
transform: [{ scale: 1 }]
},
});

export default App;

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post