Sai
Sai

Reputation: 386

Increasing distance between objects in relative layout

I have a relative layout for my android app. It is a SurfaceView overlapped with a few images. I had to use relative layout for the camera over lay features. It is currently shown like in the image below: enter image description here

The top red long rectangular bars are actually two short rectangle images. I would like to increase the distance between the two images so that they look like two individual rectangles. Is it possible to increase the distance in a relative layout?

If I position two red bars, one on top of the other, is it possible to increase the distance between the two?

Upvotes: 1

Views: 2473

Answers (2)

android developer
android developer

Reputation: 116412

Set a margin between the views and that's it ...

Upvotes: 2

Sai
Sai

Reputation: 386

I was reading through the Android developer's page carefully. This page explains how to set margins on the layout

Upvotes: 0

Related Questions