Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • whats-open-android whats-open-android
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 19
    • Issues 19
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SRCT
  • whats-open-androidwhats-open-android
  • Issues
  • #13

Closed
Open
Created Jan 14, 2017 by Robert Hitt@rhittOwner

Replace all String literals with references to String resources

Summary

Currently most text in the app (messages, information, etc) uses String literals. This is not a recommended practice for Android development. Rather, all strings should be defined in res/values/strings.xml. This is to make localization much easier. That means every single place in the app that uses String literals should be refactored. For example, a Toast called by Toast.makeText(getContext(), "Notifications set.", Toast.LENGTH_SHORT) should instead be called by Toast.makeText(getContext(), getString(R.id.notification_set_string), Toast.LENGTH_SHORT).

Helpful Links

  • https://developer.android.com/guide/topics/resources/string-resource.html
  • https://medium.com/google-developer-experts/android-strings-xml-things-to-remember-c155025bb8bb
Assignee
Assign to
Time tracking