Android - 警告Nested weights are bad for performance
來源:程序員人生 發布時間:2014-11-18 08:46:45 閱讀次數:3200次
Android - 正告Nested weights are bad for performance
本文地址: http://blog.csdn.net/caroline_wendy
緣由: Layout weights require a widget to be measured twice. When a LinearLayout with non-zero weights is nested inside another LinearLayout with non-zero weights, then the number of measurements increase exponentially.
嵌套權值(Nested Weights), 權值會被計算兩次, 改變時, 會依照比例進行改變.
解決方法: 使用RelativeLayout或GridLayout代替LinearLayout.

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈