hualishu
V2EX  ›  Android

按百分比来适配屏幕

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