Filling Issues in RelativeLayout

<View android:id="@+id/first_sep" android:layout_width="fill_parent" android:layout_height="1dip" android:paddingTop="100dip" android:layout_below="@id/calculate" android:background="#FFCCCCCC" /> 

I have a View in RelativeLayout , and the android:paddingTop doesn't seem to work. I tried it with different values, and yet the view is close to the "calculate" button.

+4
source share
1 answer

As MGS points out, you probably want android:layout_marginTop or maybe android:layout_height=101dip . I am not sure if padding makes any sense for a generic View . If it is supported, it certainly will not make any difference than just setting the height to turn on the gasket, since the gasket is considered part of the background calculations.

Use the fields to space between widgets and adjacent widgets. Indent the space between the edges of the widget and its contents (for example, between the edge of the Button and its title). In the case of a transparent background, they will visually be identical. In the case of an opaque background, they will differ significantly visually.

+14
source

All Articles