• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Text Field is invisible in Android Studio 2.2.1

I don't know if this is a feature of Android Studio 2.2.1 or not, but I was following thenewboston's android tutorials and his text fields appear as a single line that shows the user where to input text.

In my android studio, the line is invisible. The text field is still there, and I can edit its properties, but the field itself is invisible till I run it on the emulator(Android 5.1/Google API). Is this a rendering problem, or is this normal? This is causing me a huge problem as I can't see exactly where I've placed the text fields in text view.

Design view :

Emulator :
Spu5d.png


If it is normal, how can I force Android Studio to display a line to indicate a text field as it does in the emulator?

Here's the text for activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.somu.tnbtut11.MainActivity">

<TextView
android:text="Sign In"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/textView"
android:textSize="24sp" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:ems="10"
android:layout_marginRight="27dp"
android:layout_marginEnd="27dp"
android:id="@+id/editText"
android:layout_alignBaseline="@+id/textView2"
android:layout_alignBottom="@+id/textView2"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:width="250dp"
android:selectAllOnFocus="false" />

<TextView
android:text="Password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="55dp"
android:id="@+id/textView3"
android:layout_below="@+id/editText"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />

<TextView
android:text="eMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:id="@+id/textView2"
android:layout_below="@+id/textView"
android:layout_alignRight="@+id/textView3"
android:layout_alignEnd="@+id/textView3" />

<Button
android:text="Log In"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:id="@+id/button" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:ems="10"
android:id="@+id/editText3"
android:layout_alignBaseline="@+id/textView3"
android:layout_alignBottom="@+id/textView3"
android:layout_alignLeft="@+id/editText"
android:layout_alignStart="@+id/editText"
android:width="250dp"/>
</RelativeLayout>


Note: Changing app theme doesn't make the text fields appear!
pLcPK.png


Note2: Changing to theme Holo (Dark/Light) does make the text fields appear, but why aren't the text fields appearing for the other themes? What do I have to do to make this work?
 
Nice avatar there. I don't really feel inclined to answer someone who's telling me to **** off!
 
Back
Top Bottom