For example I got a screen width 1000 . And I need to calculate the value of the first 25% which will be when x in 0..250 -> doSmth()
and last part
which will be when x in 750..1000 -> doSmth()
But I need to make it dynamically depends on the screen width. What is the way to do that in Android?