Reputation: 2149
When i use EditText in my layout screen , its showing me like this
I have not applied any theme or any kind of style to activity or EditText.
Can anyone know the solution ?
Here is my Layout code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00529B">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:padding="20dip">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:hint="Member ID"
android:ems="10"
android:maxLines="1"
android:id="@+id/txt_member_id"
android:gravity="center" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:text=""
android:hint="Mobile Number"
android:ems="10"
android:id="@+id/txt_mobile"
android:maxLength="10"
android:maxLines="1"
android:gravity="center" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:hint="Key"
android:maxLines="1"
android:id="@+id/txt_key"
android:gravity="center" />
<Button
android:text="Button"
android:background="@drawable/button_style"
android:textColor="@color/button_text_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btn_login" />
</LinearLayout>
</LinearLayout>
Here is my build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-alpha1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Upvotes: 0
Views: 159
Reputation: 1015
Downgrade your gradle version to 2.1.+ (f.e. classpath 'com.android.tools.build:gradle:2.1.2')
There is a critical bug in 2.2.+ prior to alpha-4 concerning 9-patch (https://code.google.com/p/android/issues/detail?id=210467)
Upvotes: 1