I have a rectangular shaped Edit Text which is inside the TextInputLayout. I want to put some margin between floating label and rectangular boundaries of edit text but i am not able to do that. I tried different margins parameters but it didn't workout.
In the image you can see that floating label is stick with the upper boundary of the rectangular edit text. But i want some space between label and upper boundary. Thanx in advance.
below is the XML code for EditText
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<EditText
android:id="@+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="email"
android:background="@drawable/textbg"/>
below is the code for background drawable
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp"
android:color="@color/colorPrimary"/>
/>
<padding
android:left="15dp"
android:right="15dp"
android:top="15dp"
android:bottom="15dp" />
</shape>
You can give the height manually to TextInputLayout Like :
android:layout_height="100dp"
it work for me.