The answer that fida gave should provide what you want (or close to it). That is assuming that you want them all to take up 1/3 of the screen. Otherwise, you can eliminate the weight
property and use margin between the View
s or use empty View
s between each of them and give an appropriate weight
.
The reason you aren't getting them in a horizontal layout is because you have android:layout_width="match_parent"
for the first ImageView
so I'm guessing that is taking up the whole width. They should probably be android:layout_width="wrap_content"
. Also, for your last one, you have android:layout_below="@+id/comapre_now_button"
which will obviously put it below the View
with that id
.
Assuming you want that in the center, you probably want android:layout_centerHorizontal="true"
or android:layout_toRightOf="@id/someId"
or android:layout_toLeftOf="id/someId"
Also, not the problem, but RelativeLayout
doesn't have an orientation
or weight
property.