Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does offsetLeftAndRight() exactly do?

What does offsetLeftAndRight() exactly do? Documentation says: "Offset this view's horizontal location by the specified amount of pixels" So, does it mean that if the view's left position is suppose 50 and offsetLeftAndRight(20) is called on it, then the view will move by 20pixels & its left position will be (50-20) i.e. 30?

Thanks in advance.

like image 631
andro Avatar asked Sep 25 '12 20:09

andro


1 Answers

Both the left and the right positions will be incremented by the offset. So in your example, the left position will change to 50 + 20 = 70.

like image 160
UgglyNoodle Avatar answered Oct 06 '22 02:10

UgglyNoodle