Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)
18. Localization Knowing CriminalIntent is going to be a wildly popular app, you have decided to make it accessible to a larger ...
Chapter 18 Localization Localizing Resources Language settings are part of the device’s configuration. (See the section called ...
Localizing Resources Click OK. The new strings.xml file will be listed under res/values, with (es) after its name. The strings f ...
Chapter 18 Localization Now it is time to make the magic happen. Add Spanish versions of all your strings to res/values-es/ str ...
Default resources Default resources The configuration qualifier for English is -en. In a fit of localization, you might think to ...
Chapter 18 Localization Run CriminalIntent on a device with the language set to English. The app displays the resource ID for c ...
Default resources mReportButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent i = new Int ...
Chapter 18 Localization Screen density works differently The exception to providing default resources is for screen density. A ...
Targeting a region Targeting a region You can qualify a resource directory with a language-plus-region qualifier that targets re ...
Chapter 18 Localization Consider an example. Suppose you set the language on your device to Spanish and your region to Chile (F ...
Targeting a region Testing custom locales Different devices and different versions of Android know about and support different l ...
Chapter 18 Localization Configuration Qualifiers You have now seen and used several configuration qualifiers for providing alte ...
Prioritizing alternative resources Prioritizing alternative resources Given the many types of configuration qualifiers for targe ...
Chapter 18 Localization Add a longer value for crime_title_hint to values-w600dp/strings.xml. Listing 18.4 Creating alternativ ...
Multiple qualifiers Multiple qualifiers You may have noticed that the New Resource File dialog has many available qualifiers. Yo ...
Chapter 18 Localization Finding the best-matching resources Let’s walk through how Android determined which version of crime_ti ...
Testing Alternative Resources Because there are multiple values still in the running, Android keeps stepping down the qualifier ...
Chapter 18 Localization Challenge: Localizing Dates You may have noticed that, regardless of the device’s locale, the dates dis ...
19. Accessibility In this chapter you will make CriminalIntent more accessible. An accessible app is usable by anyone, regardles ...
Chapter 19 Accessibility To enable TalkBack, launch Settings and press Accessibility. Press on TalkBack under the Services head ...
«
14
15
16
17
18
19
20
21
22
23
»
Free download pdf