Adding blank spaces to layout

前端 未结 14 1134
深忆病人
深忆病人 2021-01-30 04:53

I am trying to make empty lines within android. This is what I have been doing:

android:layout_width=\"fill_parent\" 
android:layout_height=\"wrap_content\" 
an         


        
14条回答
  •  生来不讨喜
    2021-01-30 05:43

    I strongly disagree with CaspNZ's approach.

    First of all, this invisible view will be measured because it is "fill_parent". Android will try to calculate the right width of it. Instead, a small constant number (1dp) is recommended here.

    Secondly, View should be replaced by a simpler class Space, a class dedicated to create empty spaces between UI component for fastest speed.

提交回复
热议问题