主な問題は、下部中央にある反応ネイティブ コンポーネントに簡単にアクセスできないことです。
I'm trying to create a component at the bottom center of the screen in React Native. I've tried using <code>absolute</code> and <code>relative</code> positioning, but nothing seems to work. Here's my code: <code><View style={{position: 'absolute', bottom: 0, alignItems: 'center'}}> <Text>This is my component!</Text> </View> </code> A: You can use <code>flexDirection:'row'</code>,<code>justifyContent:'center'</code>,<code>alignItems:'flex-end'</code>.
<View style={{flexDirection:'row',justifyContent:'center',alignItems:'flex-end'}}>
<Text>This is my component!</Text>
</View>
React Nativeのヨガとは
React Native は、React を使用してモバイル アプリを構築するためのプラットフォームです。 Yoga は、開発者がユーザー インターフェイスとアプリケーションを作成するのに役立つプログラミング言語です。
フレックスボックスとは
?
Flexbox は、柔軟でレスポンシブなレイアウトを簡単に作成できる React Native のレイアウト モジュールです。 拡大するコンポーネントと圧縮するコンポーネントを指定でき、レイアウトのレンダリング方法を制御するためのさまざまなオプションを提供します。