From the course: Android Development Essential Training: The User Interface with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage string values as resources

Manage string values as resources - Android Tutorial

From the course: Android Development Essential Training: The User Interface with Kotlin

Start my 1-month free trial

Manage string values as resources

- [Narrator] Every Android app depends on the use of resources. There are many different kinds of resources, and they're stored under the res directory within your app module. There are image files in the drawable resource directory, XML layout files in Layout, XML menu files in Menu, more images in mipmap, and then a variety of resources in the values directory. Within files in the values directory, the type of resource is determined by the element name. So you have color resources, dimension resources, style resources, and string resources. And that's the focus of this video. A string resource is defined in this file and then can be referenced in your XML layout files and in your code. And by creating your strings as resources, it makes it easy to create translations so you can localize the application for different human languages. It's a good practice to make all of your strings resources so you can easily localize later on if you need to. Now I'm going to show you how these…

Contents