create absolute layout if view layout can't be reused

The existing view layout may not be an absolute layout,
and will throw a ClassCastException. Check to see if it
is compatible before the cast.

Change-Id: I7309600a1e7405a29e49a3bab469a164d51126ae
http://b/2526854
1 file changed