Nuttertoo1s
V2EX  ›  Android

突然发现 ConstraintLayout 配合图形化界面用起来好舒服啊

  •  
  •   Nuttertoo1s · Dec 16, 2020 · 13856 views
    This topic created in 1999 days ago, the information mentioned may be changed or developed.
    比 LinearLayout 和 RelativeLayout 好用多了
    14 replies    2020-12-20 16:59:59 +08:00
    Nuttertoo1s
        1
    Nuttertoo1s  
    OP
       Dec 16, 2020
    特别是那个百分比的辅助线,简直是适配神器
    jon97
        2
    jon97  
       Dec 16, 2020 via iPhone
    看见 MotionLayout 你会更开心。
    Nuttertoo1s
        3
    Nuttertoo1s  
    OP
       Dec 16, 2020
    @john6lq 明天摸鱼的时候研究一下
    huruwo
        4
    huruwo  
       Dec 16, 2020
    这个出了好几年了 我称之为 拉线布局
    merpyzf
        5
    merpyzf  
       Dec 16, 2020
    Compose 更香
    NexTooo
        6
    NexTooo  
       Dec 16, 2020
    可以,就是不习惯拉线的人感觉初次布局会繁琐一点……
    Nuttertoo1s
        7
    Nuttertoo1s  
    OP
       Dec 17, 2020
    @merpyzf 这个也不错,感觉自己 jetpack 学的还是不到位,有很多好用的功能都没发现
    Kamiyu0087
        8
    Kamiyu0087  
       Dec 17, 2020
    虽然也用 ConstraintLayout 很多年了,但依然都是自己写代码的,没用过图形工具
    yukiww233
        9
    yukiww233  
       Dec 17, 2020
    一直手写约束。。对满屏的线根本不想用鼠标去点
    IGJacklove
        10
    IGJacklove  
       Dec 18, 2020 via Android
    @merpyzf compose 能完全代替 XML 吗?
    chenjiajia9411
        11
    chenjiajia9411  
       Dec 18, 2020
    @IGJacklove #10 理论上可以,但是 alpha stage 的东西我是不敢用。
    AoEiuV020
        12
    AoEiuV020  
       Dec 19, 2020
    怕改,一次成型的话堪称最强,但我现在只在需要固定宽高比例情况用用 ConstraintLayout 的 layout_constraintDimensionRatio,
    Nuttertoo1s
        13
    Nuttertoo1s  
    OP
       Dec 19, 2020
    @AoEiuV020 确实,这个布局改起来有点麻烦需要重新拉线
    fansangg
        14
    fansangg  
       Dec 20, 2020
    一直以为图形工具只是鸡肋...从 eclipse 开始就是手写
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4067 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 62ms · UTC 05:14 · PVG 13:14 · LAX 22:14 · JFK 01:14
    ♥ Do have faith in what you're doing.