Android 警告「Use a layout_height of 0dip instead of wrap_content for better performance」

警告「Use a layout_height of 0dip instead of wrap_content for better performance」が出たら
layout_weightの設定によるコンポーネントのサイズ計算が走った後、無意味なwrap_contentのサイズ計算が走ってしまうので
layout_weightを指定しているときはlayout_widthまたはlayout_height(LinearLayoutのorientationにより異なる)を[wrap_content」ではなく「0dip」に設定すると、パフォーマンスが良くなるよということ。

0 件のコメント: