Adding blank spaces to layout

前端 未结 14 1138
深忆病人
深忆病人 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:42

    This can by be achieved by using space or view.

    Space is lightweight but not much flexible.

    View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is more customizable, you can add background, draw shapes like space.

    Implementing Space :

    (Eg: Space For 20 vertical and 10 horizontal density pixels)

    
    

    Implementing View :

    (Eg: View For 20 vertical and 10 horizontal density pixels including a background color)

      
    

    Space for string formatting using HTML entity:

      for non-breakable whitespace. for regular space.

提交回复
热议问题