V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
jasonhc
V2EX  ›  Android

Android view 的属性默认值怎么能知道?

  •  
  •   jasonhc · Oct 16, 2020 · 12775 views
    This topic created in 2018 days ago, the information mentioned may be changed or developed.
    SDK 文档里关于属性默认值写的很少,好像同一个属性在不同的 View 里默认值也会不同,有的得看源代码才能知道。这可麻烦了
    Supplement 1  ·  Oct 20, 2020
    比如 focusable, scaleType,descendantFocusability 这些和 View 行为有关的属性
    5 replies    2020-10-19 10:07:08 +08:00
    kile
        1
    kile  
       Oct 16, 2020
    熟能生巧...

    这个巧就是我踩过坑了,背的了
    fansangg
        2
    fansangg  
       Oct 16, 2020
    view 的默认值是什么东西?
    kx5d62Jn1J9MjoXP
        3
    kx5d62Jn1J9MjoXP  
       Oct 16, 2020 via Android   ❤️ 1
    style 里
    300
        4
    300  
       Oct 17, 2020 via Android
    多写就记住了
    反正常用的也就那几个
    jasonhc
        5
    jasonhc  
    OP
       Oct 19, 2020
    比如 focusable, scaleType,descendantFocusability 这些和 View 行为有关的属性
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5905 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 03:34 · PVG 11:34 · LAX 20:34 · JFK 23:34
    ♥ Do have faith in what you're doing.