That is not going to work. The x can have any of the Gravity combination and I want to detect Gravity.left(3) is being used.
I don't think there is a mathematical equation for this problem. I need to find other ways. Value 17 can represent (Gravity.Center) or (Gravity.Center_Vertical + Gravity.Center_Horizontal) and that example is why it will be impossible to detect which one is being used.