+ All Categories
Home > Technology > Board local(e) cab to users heart ❤

Board local(e) cab to users heart ❤

Date post: 23-Jan-2018
Category:
Upload: arun-babu-a-s-p
View: 174 times
Download: 2 times
Share this document with a friend
46
Board local(e) cab to user's heart
Transcript
  1. 1. Board local(e) cab to user's heart
  2. 2. If you talk to a man in a language he understands, that goes to his head. If you talk to him in his language, that goes to his heart. - Nelson Mandela
  3. 3. Successful stories 1 - 5M
  4. 4. Successful stories 1 - 5M 1 - 5M
  5. 5. Successful stories 1 - 5M 10 - 50M1 - 5M
  6. 6. Preparing Text
  7. 7. Basic changes String login = "Log In"; String login = context.getResources().getString(R.string.login);
  8. 8. Basic changes String login = "Log In"; String login = context.getResources() .getString(R.string.login); TextView textView = new TextView(this); textView.setText(Log In); textView.setText(R.string.login);
  9. 9. Basic changes String login = "Log In"; String login = context.getResources() .getString(R.string.login); TextView textView = new TextView(this); textView.setText(Log In); textView.setText(R.string.login); android:text="@string/login" />
  10. 10. With format strings JAVA String message = Welcome + username + ! Successfully logged in.;
  11. 11. With format strings JAVA String message = Welcome + username + ! Successfully logged in.; XML Welcome %1s! Successfully logged in. JAVA String welcome = getString(R.string.welcome, username);
  12. 12. JAVA textView.setText("" + count + "item(s) downloaded"); Quantity strings
  13. 13. JAVA textView.setText("" + count + "item(s) downloaded") ; XML %d items downloaded %d item downloaded %d items downloaded %d items downloaded %d items downloaded %d items downloaded Quantity strings
  14. 14. JAVA String messages = getResources().getQuantityString( R.plurals.itemsDownloaded, count, count); Quantity strings
  15. 15. Handling script types
  16. 16. Language script type English and English-like: Latin (except Vietnamese), Greek, Cyrillic, Hebrew, Armenian and Georgian.
  17. 17. Language script type English and English-like: Latin (except Vietnamese), Greek, Cyrillic, Hebrew, Armenian and Georgian. Tall: Language scripts that require extra line height to accommodate larger glyphs, including South and Southeast Asian and Middle Eastern languages, like Arabic, Hindi, Telugu, Thai, Vietnamese.
  18. 18. Language script type English and English-like: Latin (except Vietnamese), Greek, Cyrillic, Hebrew, Armenian and Georgian. Tall: Language scripts that require extra line height to accommodate larger glyphs, including South and Southeast Asian and Middle Eastern languages, like Arabic, Hindi, Telugu, Thai, Vietnamese. Dense: Language scripts that require extra line height to accommodate larger glyphs but have different metrics from tall scripts. Includes Chinese, Japanese, and Korean.
  19. 19. I Love You Tall / Lengthy languages
  20. 20. Important TextView attrs android:ellipsize
  21. 21. Important TextView attrs android:ellipsize android:maxLines android:minLines
  22. 22. Important TextView attrs android:ellipsize android:maxLines android:minLines android:fontFeatureSettings android:elegantTextHeight
  23. 23. Important TextView attrs android:ellipsize android:maxLines android:minLines android:fontFeatureSettings android:elegantTextHeight android:typeface
  24. 24. Custom font for full app Calligraphy CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() .setDefaultFontPath("your font path") .setFontAttrId(R.attr.fontPath) .build();
  25. 25. Custom font for full app Calligraphy CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() .setDefaultFontPath("your font path") .setFontAttrId(R.attr.fontPath) .build(); Using reflection final Field staticField = Typeface.class.getDeclaredField(staticTypefaceFieldName); staticField.setAccessible(true); staticField.set(null, newTypeface); http://stackoverflow.com/questions/2711858/is-it-possible-to-set-a-custom-font-for-entire-of-application
  26. 26. Localized layouts
  27. 27. RTL support - Native RTL support from Jellybean (4.2) - Left -> Start - Right -> End
  28. 28. RTL support - Native RTL support from Jellybean (4.2) - Left -> Start - Right -> End - Images with Text should be split - Background Image - Text as overlay
  29. 29. Flexible layout android:layoutDirection attribute for setting the direction of a component's layout.
  30. 30. Flexible layout android:layoutDirection attribute for setting the direction of a component's layout. android:textDirection attribute for setting the direction of a component's text.
  31. 31. Flexible layout android:layoutDirection attribute for setting the direction of a component's layout. android:textDirection attribute for setting the direction of a component's text. android:textAlignment attribute for setting the alignment of a component's text.
  32. 32. Force RTL layout
  33. 33. Distance, Time, Currency
  34. 34. Distance
  35. 35. Distance
  36. 36. Time
  37. 37. Currency - Can be make or break for your app - Must provide easy way to change it - $$ must be included if international
  38. 38. Common issues
  39. 39. Common issues Clipped text, or text that overlaps the edge of UI elements or the screen
  40. 40. Common issues Clipped text, or text that overlaps the edge of UI elements or the screen Poor line wrapping
  41. 41. Common issues Clipped text, or text that overlaps the edge of UI elements or the screen Poor line wrapping Incorrect word breaks or punctuation
  42. 42. Common issues Clipped text, or text that overlaps the edge of UI elements or the screen Poor line wrapping Incorrect word breaks or punctuation Incorrect alphabetical sorting
  43. 43. Common issues Clipped text, or text that overlaps the edge of UI elements or the screen Poor line wrapping Incorrect word breaks or punctuation Incorrect alphabetical sorting Incorrect layout direction or text direction
  44. 44. Common issues Clipped text, or text that overlaps the edge of UI elements or the screen Poor line wrapping Incorrect word breaks or punctuation Incorrect alphabetical sorting Incorrect layout direction or text direction Untranslated text
  45. 45. Thanks! Arun Babu A S P Love building apps with best user experience! https://www.linkedin.com/in/arunasp https://yourstory.com/2016/09/arun-babu-story/

Recommended