Advertisement
English transcript
Okay, hopefully this wasn't too difficult.
You used the textColor attribute.
Now, just as a little bit of a reminder of what this value is,
we use @android:Color to get access to the standard Android colors,
and then /white specifies that we're looking to use Android's white color.
Really, there aren't a lot of standard Android options.
If you want a specific color, it's a lot easier to use a hex code,
like we talked about in the lesson.
A good resource for hex codes is the material design color web page
from the Android developer website.
That web page is linked in the instructor notes,
if you'd like to take a look at it.
But enough about color.
We're using Android's white, and
let's go over to Android Studio to take a look at what that looks like.
All right, we're back at our trusty old activity_main.xml, and you're probably
used to adding attributes right now, so I'm just going to go ahead and
start typing in the Happy Birthday Ben TextView.
Again, the attribute I'm using is textColor.
All right, and the drop down actually gives me some options.
It's @Android:,
then color/white, and almost immediately my preview updates,
and it's white, so it's kind of hard to see.
But again, that's what we wanted it to do.
All right, let's do the same thing to the other TextView.
going to click here,
android:textColor="".
Quotations, important, important quotations, @android:/color.
And once I'm finished typing this,
I can see that, well, this TextView disappears as well.
Again, expected, because it's a white text on a white background.
But I can see from the vew outline here and
here that the text does in fact still exist.
And for the sake of thoroughness, let's go ahead and run it on our phones.
Okay, now those of you viewing at home might find it a little bit hard to see,
but I can just barely see my white text on my light gray background.
So it looks like we did a good job.
That's one more off our list.
Let's move on to the next step.
You used the textColor attribute.
Now, just as a little bit of a reminder of what this value is,
we use @android:Color to get access to the standard Android colors,
and then /white specifies that we're looking to use Android's white color.
Really, there aren't a lot of standard Android options.
If you want a specific color, it's a lot easier to use a hex code,
like we talked about in the lesson.
A good resource for hex codes is the material design color web page
from the Android developer website.
That web page is linked in the instructor notes,
if you'd like to take a look at it.
But enough about color.
We're using Android's white, and
let's go over to Android Studio to take a look at what that looks like.
All right, we're back at our trusty old activity_main.xml, and you're probably
used to adding attributes right now, so I'm just going to go ahead and
start typing in the Happy Birthday Ben TextView.
Again, the attribute I'm using is textColor.
All right, and the drop down actually gives me some options.
It's @Android:,
then color/white, and almost immediately my preview updates,
and it's white, so it's kind of hard to see.
But again, that's what we wanted it to do.
All right, let's do the same thing to the other TextView.
going to click here,
android:textColor="".
Quotations, important, important quotations, @android:/color.
And once I'm finished typing this,
I can see that, well, this TextView disappears as well.
Again, expected, because it's a white text on a white background.
But I can see from the vew outline here and
here that the text does in fact still exist.
And for the sake of thoroughness, let's go ahead and run it on our phones.
Okay, now those of you viewing at home might find it a little bit hard to see,
but I can just barely see my white text on my light gray background.
So it looks like we did a good job.
That's one more off our list.
Let's move on to the next step.