I am developing a sample app with just activation screen. I have one EditText
and one Button
.
In all android version screen is looking fine except Android 4.4.
I am getting issue with EditText
in Kitkat version only. EditText
not showing perfect height and also showing some shadow around EditText
.
Please see below image for more detail.
Below is EditText
code in layout xml file.
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/edt_activation_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="Activation Number"
android:maxLines="1"
android:textColor="#575757"
android:textSize="15dp" />
</android.support.design.widget.TextInputLayout>
How can I fit this issue with android 4.4. I also searched on Google too but not getting exact solution of this issue.
I had same issue. Use android.support.design.widget.TextInputEditText
instead of EditText
This solved the problem. Edited in your code
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/edt_activation_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="Activation Number"
android:maxLines="1"
android:textColor="#575757"
android:textSize="15dp" />
</android.support.design.widget.TextInputLayout>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.