can we know programmatically that view is croped in screen or not?
e.g.
There are four buttons on the screen. If one button out of them is cropped in the screen due to size of buttons. so can we know that any button is cropped the in the screen using code(which button is cropped it doesn’t matter)? so we can manage this situation.
Thank You.
View elements have widht/height and you screen does too.
You can find out the size of your button, and the size of your screen, so some quick calculation should indicate if it would fit or not.
I don’t know if this is the right way to fix your problem, but as you don’t extensively
describe your problem it’s hard to tell. But if you want to make your buttons smaller in case of non-fitting, you probably want to consider a different approach, where you scale your buttons beforehand: Either use an automatic scaling method (fit parent and the likes), or just obtain the screen/parent-view widht, and calculate the ideal button size, instead of finding out if a (semi-random) buttonsize would fit.