React Native AWS 放大背景图片

问题描述

大家好,我正在尝试使用 AWS Amplify 和 React Native 制作应用程序。我只想向我的应用程序添加一个背景图像,为了这个小目的,我不想创建一个完全自定义的组件来显示登录屏幕。这是我的代码

import React,{ useEffect } from 'react';
import { Text,View,StyleSheet,StatusBar,imagebackground,Image } from 'react-native';
import SplashScreen from 'react-native-splash-screen';
import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';
import { Authenticator,AmplifyTheme } from 'aws-amplify-react-native';

Amplify.configure(awsconfig);

console.disableYellowBox=true;

const App = function() {
  
  useEffect(() => {
    SplashScreen.hide();
  },[]);

  return(
    <View style={styles.container}>
      <StatusBar 
        barStyle = 'light-content'
        backgroundColor='black'
      />
      <Authenticator usernameAttributes="email" > 
      </Authenticator>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,justifyContent: 'center',alignItems: 'center',backgroundColor: 'black'
  }
});

export default App;

我知道 imagebackground 应该可以完成这项工作,但我不知道如何将 Amplify 登录与其集成。

提前致谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...