I'm trying to create a layout for my recyclerview with three items next to each other horizontally.
I was hoping to achieve this with a LinearLayout but the last item (the ImageButton) won't appear. I've been trying combination of weights as well.
Is there a good way to achieve this? The following is my current layout file.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal">
<TextView
android:id="@+id/textView_option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/option"
android:layout_margin="15dp"
android:textSize="20dp"
/>
<EditText
android:id="@+id/editText_option"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:lines="1" />
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:src="@drawable/icon_minus"
android:scaleType="fitCenter"
android:background="@null"
android:layout_weight="2"
/>
</LinearLayout>