Android TextInputLayout提示填充不起作用

Android TextInputLayout提示填充不起作用,android,textinputlayout,Android,Textinputlayout,我想在TextInputLayout中对edittext的提示进行填充 其中电子邮件地址为提示,示例为文本 也试过了,但没用 更改支持设计库23.1.0后面临此问题 这是我的密码 <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"

我想在TextInputLayout中对edittext的提示进行填充

其中电子邮件地址为提示,示例为文本

也试过了,但没用

更改支持设计库23.1.0后面临此问题

这是我的密码

       <android.support.design.widget.TextInputLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp">

            <android.support.v7.widget.AppCompatEditText
                android:id="@+id/edtEmailAddress"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/border_round_edt_grey"
                android:focusableInTouchMode="true"
                android:hint="@string/emailadd"
                android:padding="10dp"
                android:singleLine="true" />
        </android.support.design.widget.TextInputLayout>

根据答案,如果您在EditText上设置了自定义背景,则android:padding属性simple无法改变提示文本和编辑文本之间的间距。因此,如果您已将自定义背景设置为AppCompatEditText,则可以在AppCompatEditText中使用
android:translationY
属性

请在
AppCompatiEditText
中添加以下行

android:translationY="10dp" 

希望您得到您的答案:)

谢谢它的工作。!!使用android:translationY=“2dp”hi,当我尝试使用android:translationY=“10dp”这些行时,它会隐藏底部的编辑文本边框。如何解决它?