Home | History | Annotate | Download | only in widget

Lines Matching defs:View

33 import android.view.View;
50 void mockInfoHeightAnimation(BaseCardView view, int width, int startHeight, int endHeight) {
51 ((BaseCardView.InfoHeightAnimation) view.getAnimation()).mockStart();
52 measureAndLayout(view, width, startHeight);
53 ((BaseCardView.InfoHeightAnimation) view.getAnimation()).mockEnd();
54 assertNull(view.getAnimation());
55 measureAndLayout(view, width, endHeight);
58 void mockInfoAlphaAnimation(BaseCardView view, View infoView,
60 ((BaseCardView.InfoAlphaAnimation) view.getAnimation()).mockStart();
62 assertEquals(View.VISIBLE, infoView.getVisibility());
63 ((BaseCardView.InfoAlphaAnimation) view.getAnimation()).mockEnd();
64 assertNull(view.getAnimation());
66 assertEquals(endAlpha == 0f? View.GONE: View.VISIBLE, infoView.getVisibility());
69 void measureAndLayout(View view, int expectedWidth, int expectedHeight) {
70 view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
71 assertEquals(expectedWidth, view.getMeasuredWidth());
72 assertEquals(expectedHeight, view.getMeasuredHeight());
73 view.layout(0, 0, expectedWidth, expectedHeight);
76 void verifyLayoutTimes(View.OnLayoutChangeListener listener, int timesCalled) {
77 verify(listener, times(timesCalled)).onLayoutChange(any(View.class),
85 View main = new View(cardView.getContext());
88 View info = new View(cardView.getContext());
89 View.OnLayoutChangeListener onLayout = Mockito.mock(View.OnLayoutChangeListener.class);
132 View main = new View(cardView.getContext());
135 View info = new View(cardView.getContext());
136 View.OnLayoutChangeListener onLayout = Mockito.mock(View.OnLayoutChangeListener.class);
179 View main = new View(cardView.getContext());
182 View info = new View(cardView.getContext());
183 View.OnLayoutChangeListener onLayout = Mockito.mock(View.OnLayoutChangeListener.class);
224 View main = new View(cardView.getContext());
227 View info = new View(cardView.getContext());
228 View.OnLayoutChangeListener onLayout = Mockito.mock(View.OnLayoutChangeListener.class);
265 View main = new View(cardView.getContext());
268 View info = new View(cardView.getContext());
269 View.OnLayoutChangeListener onLayout = Mockito.mock(View.OnLayoutChangeListener.class);
286 assertEquals(info.getVisibility(), View.GONE);