I have 2 image buttons and 2 text boxes. I want to place them in this order.
textview1 - imagebutton1 - textview2 - imagebutton2
Can anyone here help me with this?
this is what i tried but it doesn't work properly
<TextView
android:id="@+id/like_count"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_below="@id/comments_list"
android:textColor="@android:color/white"
android:textSize="14sp"
android:text="10" />
<ImageButton
android:id="@+id/like_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_below="@id/comments_list"
android:layout_toRightOf="@id/like_count"
android:background="@android:color/transparent"
android:src="@drawable/xml_like_button_selctor" />
<TextView
android:id="@+id/comment_count"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@id/like_button"
android:textColor="@android:color/white"
android:textSize="14sp"
android:text="10"/>
<ImageButton
android:id="@+id/comment_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_toRightOf="@id/comment_count"
android:background="@android:color/transparent"
android:src="@drawable/xml_comment_button_selector" />
source
share