hualishu
V2EX  ›  Android

按百分比来适配屏幕

  •  
  •   hualishu · Feb 18, 2016 · 13365 views
    This topic created in 3767 days ago, the information mentioned may be changed or developed.

    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
       Feb 18, 2016
    这个可以解决一些问题
    Tneciv
        2
    Tneciv  
       Feb 18, 2016
    不是有个官方的 support 包就是用来干这个的吗 ``com.android.support:percent``
    xxstop
        3
    xxstop  
       Feb 18, 2016
    mark...由于如此并没有考虑横屏!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5251 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 07:32 · PVG 15:32 · LAX 00:32 · JFK 03:32
    ♥ Do have faith in what you're doing.