Posts

Showing posts from November, 2017

How to generate localization value folders in android

Steps to follow for this. Open command terminal in mac and run below commands. “sudo gem update --system” “sudo gem install roo” Finally run your script - “ruby  FilePath+parse_csv_to_stringsfile_Android.rb” Note : Make sure both files (.xls & .rb) are in same directory and your xls file name is properly referring inside script. Output gives all value folder which can be simple copy past inside project. Attached ruby script and localization xls sheet.

if your debug message is not showing over control, suppress testCoverageEnabled true

debug { debuggable true minifyEnabled false shrinkResources false //testCoverageEnabled true }

Add direction- and language-specific resources in Android

This step involves adding specific versions of your layout, drawables, and values resource files that contain customized values for different languages and text directions. In Android 4.2 (API level 17) and higher, you can use the  -ldrtl  (layout-direction-right-to-left) and  -ldltr  (layout-direction-left-to-right) resource qualifiers. To maintain backward compatibility with loading existing resources, older versions of Android use a resource's language qualifiers to infer the correct text direction. Suppose that you want to add a specific layout file to support RTL scripts, such as the Hebrew, Arabic, and Persian languages . To do this, you add a layout-ldrtl/  directory in your  res/  directory, as shown in the following example: res/ layout/ main.xml This layout file is loaded by default. layout-ldrtl/ main.xml This layout file is loaded for languages using an RTL text direction, including Arabic, Persian, and Hebrew. If you