If the idea of Compose is to get rid of XML, why is it still recommended to use XML based Strings and String Resources?
object Strings {...}
object Sp {...}
object Dp {...}
In a .kt file sounds like a much better way to handle strings in compose. And sp/dp values
Yes, Jetpack Compose is to move away from XML-based UI definitions, but there are situations where using XML for strings and string resources is still recommended. This is mainly for the sake of maintaining compatibility and leveraging existing localization tools. See below for greater clarity -
However, your suggestion of defining Sp and Dp constants within Kotlin files has merit. These values typically relate to specific themes or UI elements and are often not meant to be translated or shared beyond your project. Keeping them within your codebase can simplify management and improve readability.
Hope you understand!