![](/img/trans.png)
[英]How to select radio buttons separately in a flatlist react-native
[英]How to position multiple buttons on the same line separately in react-native?
我想分別在同一行創建兩個按鈕。我使用flex = 2但它不能正常工作。我該如何解決?
<View style={{ flex: 2,flexDirection: "row" ,marginLeft:20}}>
<BtnDft h={40} w={100} name={ "Update"} />
<BtnDft h={40} w={100} name={ "Log out"} />
</View>
刪除flex: 2
{ flexDirection: "row" ,marginLeft: 20, justifyContent: 'space-evenly' }
使用justifyContent
更改按鈕的位置,可用選項包括flex-start
, center
, flex-end
, space-around
, space-between
和space-evenly
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.