[Flexbox] Use Flex to Scale Background Image
to use Image flex background scale Flexbox
2023-09-14 09:00:53 时间
In this lesson we will use Flexbox to scale a background image to fit on the screen of our React Native application.
import React, { Component } from 'react'; import {AppRegistry, StyleSheet, Text, View, Image} from 'react-native'; export default class general extends Component { render() { return ( <Image source={require("./cat.jpg")} style={styles.container}> <Text>A good looking cat</Text> </Image> ); } } const styles = StyleSheet.create({ container: { flex: 1, width: null, height: null, alignItems: "center", justifyContent: "center" } }) AppRegistry.registerComponent('general', () => general);
相关文章
- 警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
- 【Oracle错误】unable to connect 08004 ora12154
- to program_I Just Want To
- What is /dev/null and How to Use It
- typescript error TS2322: Type ‘Timeout‘ is not assignable to type ‘number‘.
- use SceneKit to display 3d objects in an iOS project
- 【错误记录】Git 使用报错 ( no changes added to commit (use “git add“ and/or “git commit -a“) )
- ORA-01239: database must be in ARCHIVELOG mode to use external cache ORACLE 报错 故障修复 远程处理
- ORA-01581: attempt to use rollback segment (string) new extent (string) which is being allocated ORACLE 报错 故障修复 远程处理
- ORA-21522: attempted to use an invalid connection in OCI (object mode only) ORACLE 报错 故障修复 远程处理
- ORA-22904: invalid reference to a nested table column ORACLE 报错 故障修复 远程处理
- ORA-24198: attempt to use an invalid operation ID ORACLE 报错 故障修复 远程处理
- ORA-32336: cannot use USING NO INDEX to create materialized view “string”.”string” ORACLE 报错 故障修复 远程处理
- ORA-38883: Cannot shrink data file string on primary database due to guaranteed restore points. ORACLE 报错 故障修复 远程处理
- MySQL Error number: 4013; Symbol: ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-00409: COMPATIBLE needs to be string or higher to use AUTO SEGMENT SPACE MANAGEMENT ORACLE 报错 故障修复 远程处理
- ORA-01239: database must be in ARCHIVELOG mode to use external cache ORACLE 报错 故障修复 远程处理
- ORA-01563: rollback segment is PUBLIC, need to use the keyword PUBLIC ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-010980; Symbol: ER_FAILED_TO_ACQUIRE_LOCK_ON_RESOURCE_GROUP; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-06445: ssvpstevrg: Incorrect parameters passed to function call ORACLE 报错 故障修复 远程处理
- ORA-09989: attempt to use invalid skgmsdef struct pointer ORACLE 报错 故障修复 远程处理
- ORA-16253: Logical standby cannot start due to a prior, incomplete operation ORACLE 报错 故障修复 远程处理
- Linux系统的笔记本:A New Way to Enjoy Mobility(linux系统的笔记本电脑)
- ABAP:区别CALL SCREEN/SET SCREEN/LEAVE TO SCREEN详解编程语言
- Oracle 指针: 使用技巧 to Enhance Database Performance(oracle指针)
- Using Linux to Easily Retrieve Process Names for Optimal System Management(linux获取进程名)
- Efficient Oracle Table Space Management: Tips to Tidy Up Your Data(oracle表空间整理)
- MySQL中USE命令使用方法简介(mysql中use的用法)
- 红遍大街小巷,去用Redis吧(to go redis)
- 利用Oracle TO函数实现数据转换(oracle to_函数)