1package com.xtremelabs.robolectric.shadows;
2
3import com.xtremelabs.robolectric.internal.Implementation;
4import com.xtremelabs.robolectric.internal.Implements;
5import com.xtremelabs.robolectric.internal.RealObject;
6
7import android.view.ViewGroup;
8
9/**
10 * Shadow for {@link ViewGroup.MarginLayoutParams} that simulates its implementation.
11 */
12@SuppressWarnings("UnusedDeclaration")
13@Implements(ViewGroup.MarginLayoutParams.class)
14public class ShadowMarginLayoutParams extends ShadowLayoutParams {
15
16    @RealObject
17    private ViewGroup.MarginLayoutParams realMarginLayoutParams;
18
19    @Implementation
20    public void setMargins(int left, int top, int right, int bottom) {
21        realMarginLayoutParams.leftMargin = left;
22        realMarginLayoutParams.topMargin = top;
23        realMarginLayoutParams.rightMargin = right;
24        realMarginLayoutParams.bottomMargin = bottom;
25    }
26}
27