Set gravity to end if we begin clipping subviews.

In the pin view, after a certain number of pin inputs, the pin dots
begin to get cut off. This is because the gravity is centered. During
the layout pass, we calculate what to set the gravity to. We use the
local visible rect to determine if the first child (the leftmost dot) is
clipped or not visible. This will help us indicate whether we are
overflowing. In this case we want to justify all of the dots to the end.
Otherwise, we want to remain centered.

Fixes: 285576678
Test: Tested non hinting pin view with overflow. Tested deletion and
full deletion as well.

Change-Id: I037f265ec80b1a105f0658217adc4383a3181987
1 file changed