The TextView component displays read-only text in an activity layout. It has a default appearance, but learn how you can change that appearance with a variety of XML attributes.
- [Instructor] The Text View component…is one of the most commonly used view components…in the Android SDK.…Its purpose is simple,…to display non-editable text.…It has many attributes to control…its behavior and appearance…and I'll show you some of these now.…In this simple project, I have a single activity layout.…It's named activity_main.xml…and it contains a single text view component…that's constrained to the four borders…of its container.…Now, I'm going to remove the right…and the bottom constraints…so that the Text View component…floats up to the top and the left.…
And right now, this is what my code looks like.…I have constraints on the left and the top…and a left and a top margin of eight pixels.…I'll go back to design mode…and I'll select the TextView…and then I'll look at the Properties window on the right.…There's a set of properties displayed here…that you can use to affect the appearance…of that TextView.…For example, the default font family…is called sans-serif, and arial or a helvetica font.…You can change that to serif, or to cursive,…
Author
Updated
11/10/2017Released
3/17/2017- Using View components
- Exploring the design repository
- Using the new ConstraintLayout component
- Adding views to a ViewGroup with Java
- Manage string values as resources
- Working with TextView, EditText, and TextInputLayout
- Displaying toast and Snackbar messages
- Defining and applying styles
- Using material design components
- Managing image display with Picasso
Skill Level Beginner
Duration
Views
Q: This course was updated on 11/10/2017. What changed?
A: New videos were added that include information about additional techniques for building an app's user interface, including videos on localizing the strings presented in an app for multiple languages, extending View classes to create advanced visual components, and more.
Related Courses
-
Introduction
-
Welcome58s
-
What you should know1m 34s
-
-
1. Define Screens with Layout Files
-
Use the design repository2m 55s
-
2. Using ViewGroup Components
-
Apply alignment constraints4m 19s
-
3. Display Text Values
-
Display toast messages3m 41s
-
Localize UI text5m 53s
-
4. Create Themes and Styles
-
Define and apply a style4m 48s
-
-
5. Display Images
-
Display image resources5m 9s
-
-
6. Build Advanced UI Components
-
Extend View components11m 17s
-
-
Conclusion
-
Next steps1m 5s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Display strings with TextView