1 package org.robolectric.shadows; 2 3 import android.widget.LinearLayout; 4 import org.robolectric.annotation.Implements; 5 import org.robolectric.annotation.RealObject; 6 import org.robolectric.util.ReflectionHelpers; 7 8 @Implements(LinearLayout.class) 9 public class ShadowLinearLayout extends ShadowViewGroup { 10 @RealObject LinearLayout realObject; 11 12 public int getGravity() { 13 return ReflectionHelpers.getField(realObject, "mGravity"); 14 } 15 } 16