1

I have to create a form in my application and i used com.google.android.material.textfield.TextInputEditText. the same is worked earlier but now when type a number or text in my edittext field it is not displaying what i am typing but after remove focus from that particular text field it shows the typed text. Same way if i delete text also it affected only when i remove focus from the edittext. i couldn't get any error when typing also the some another edittext is working fine in the same form. When i test the same in multiple devices i got to know tha The same edittext is working fine in API 22 emulator and the problem is API 26 onwards.

 <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/product_stockquantity_input"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/product_stockquntity_edit_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:drawableLeft="@drawable/ic_mode_edit_red"
                    android:drawablePadding="5dp"
                    android:hint="@string/product_stock_quantity"
                    android:inputType="number" />
            </com.google.android.material.textfield.TextInputLayout>



implementation 'com.google.android.material:material:1.1.0'

this is the edittext i have used. please help me to solve the issue. thanks in advance.

screen shot of my form

developer
  • 135
  • 1
  • 2
  • 11

0 Answers0