Replacement for the linearLayout weights mechanism

前端 未结 4 1949
渐次进展
渐次进展 2021-02-02 13:15

Background:

  • Google suggests to avoid using nested weighted linearLayouts because of performance.
  • using nested weighted linearLayout is awful to read, writ
4条回答
  •  难免孤独
    2021-02-02 13:51

    I propose to use following optimizations:

    
    
    
        
    
    
    

    or use http://developer.android.com/reference/android/widget/LinearLayout.html#attr_android:weightSum

    or use TableLayout with layout_weight for rows and columns

    or use GridLayout.

提交回复
热议问题