使用TextInputLayout
与app:startIconDrawable
<com.google.android.material.textfield.TextInputLayout
android:hint="Select Time"
app:startIconDrawable="@drawable/ic_add_24px"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
../>
</com.google.android.material.textfield.TextInputLayout>
注意:它需要库的版本1.1.0。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句