V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hualishu
V2EX  ›  Android

按百分比来适配屏幕

  •  
  •   hualishu · 2016-02-18 11:00:29 +08:00 · 4975 次点击
    这是一个创建于 2990 天前的主题,其中的信息可能已经有所发展或是发生改变。

    I made a sample of the new percent support library.
    You can check official docs reference here and here.
    This library provide percentage based layouts, horizontal and vertical at the same time.

    代码部分

    Alt text

    Alt text

    代码部分

    hualishu
        1
    hualishu  
    OP
       2016-02-18 11:01:41 +08:00
    这个可以解决一些问题
    Tneciv
        2
    Tneciv  
       2016-02-18 16:13:07 +08:00
    不是有个官方的 support 包就是用来干这个的吗 ``com.android.support:percent``
    xxstop
        3
    xxstop  
       2016-02-18 16:51:45 +08:00
    mark...由于如此并没有考虑横屏!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2842 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:17 · PVG 08:17 · LAX 17:17 · JFK 20:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.