Android - 警告Nested weights are bad for performance
來源:程序員人生 發(fā)布時間:2014-11-18 08:46:45 閱讀次數(shù):3205次
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.
嵌套權(quán)值(Nested Weights), 權(quán)值會被計算兩次, 改變時, 會依照比例進(jìn)行改變.
解決方法: 使用RelativeLayout或GridLayout代替LinearLayout.

生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈