小编use*_*921的帖子

反应原生 flexbox 分屏

我正在尝试使用 flexbox 拆分屏幕,但我没有得到我想要的结果,这就是我所拥有的

<View style={{flex: 1}}>
    <View style={{flex: 1}}>{/* half of the screen */}</View>

    <View style={{flex: 1}}>{/* the other half */}
        {/*<Swiper>*/}
            <View style={{flex: 1}}>{/* a quarter of the other half */}</View>
            <View style={{flex: 1}}>{/* a quarter of the other half */}</View>
            <View style={{flex: 1}}>{/* a quarter of the other half */}</View>
            <View style={{flex: 1}}>{/* a quarter of the other half */}</View>
        {/*</Swiper>*/}
    </View>
</View>
Run Code Online (Sandbox Code Playgroud)

我遇到的问题是屏幕的另一半扩展到全屏的大小,它只是附加到前半部分而不考虑它存在的一半

截屏

我应该如何处理这个问题?

flexbox react-native

5
推荐指数
1
解决办法
1万
查看次数

git filter-branch 后跟 git push 导致双重提交

我试图从 repo 中删除一些大型二进制文件以减少其克隆大小。在研究了这个话题后,我偶然发现了以下脚本:

#!/bin/bash

# this script displays all blob objects in the repository, sorted from smallest to largest
# you may need `brew install coreutils --with-default-names`

git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| grep -vF "$(git ls-tree -r HEAD | awk '{print $3}')" \
| awk '$2 >= 2^20' \
| sort --numeric-sort --key=2 \
| gcut -c 1-12,41- \
| gnumfmt --field=2 --to=iec-i --suffix=B --padding=7 …
Run Code Online (Sandbox Code Playgroud)

git github

1
推荐指数
1
解决办法
917
查看次数

标签 统计

flexbox ×1

git ×1

github ×1

react-native ×1