I would like to accomplish the task shown in the two images below; more precisely, be able to "extend" somehow the TextInputLayout to the Switch so that it is included in the forementioned layout, along with the TextInputEditText.
All tries I have done so far have failed me.
The XML code for one item is listed below:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="10dp">
<android.support.design.widget.TextInputEditText
android:id="@+id/myprofile_twitter"
android:layout_width="match_parent"
android:textColor="@color/blue_grey_800"
android:layout_height="wrap_content"
android:hint="Twitter" />
</android.support.design.widget.TextInputLayout>
<Switch
android:id="@+id/twitter_switch"
android:layout_width="45dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:layout_gravity="center_vertical"/>
</LinearLayout>
And here are the two images (image 1 is how it's currently presented and image 2 is what I would like to accomplish - see Linkedin). Though, not sure if it's possible to do this.