I try to use function formatNumber
but it's deprecated. How to disable depreciation? Or maybe use any alternative function?
Generally you should not disable the deprecation sign of a method. In most cases the given method's KDoc/Javadoc explains what should you use instead of the deprecated method.
What does the deprecation means? (Offical Java docs)
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
Although you can disable the deprecation sign with an annotation at method signature level:
@Suppress("DEPRECATION")
fun methodName() {
...
deprecatedMethod()
...
}