How to Change the Edit Text Background Color and Hint Text Color

hey the code below will let you change Edit Text Background Color and Hint Color Text

(1) before any text is entered it the hints display “happy halloween”

(2) when text is entered in the boxes they say “dope right?”

 

———-beginning of code———-

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.dagbacomputers.dagbacomputers.MainActivity">


    <EditText
        android:id="@+id/Label1"
        android:layout_width="300dp"
        android:layout_height="91dp"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:background="@android:color/black"
        android:ems="10"
        android:hint="         Happy"
        android:inputType="text"
        android:textColor="@android:color/holo_blue_dark"
        android:textColorHint="@android:color/holo_orange_dark"
        android:textSize="40sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.23" />

    <EditText
        android:id="@+id/Label2"
        android:hint="     Halloween!"
        android:inputType="text"
        android:textColor="@color/colorPrimary"
        android:textColorHint="@android:color/black"
        android:background="@android:color/holo_orange_dark"
        android:textSize="40sp"
        android:layout_width="300dp"
        android:layout_height="91dp"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:ems="10"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

———–end of code——————-

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: