/cts/tests/tests/view/src/android/view/cts/ |
D | ViewTest.java | 17 package android.view.cts; 19 import static android.view.flags.Flags.FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY; 20 import static android.view.flags.Flags.FLAG_VIEW_VELOCITY_API; 81 import android.view.ActionMode; 82 import android.view.ContextMenu; 83 import android.view.Display; 84 import android.view.HapticFeedbackConstants; 85 import android.view.InputDevice; 86 import android.view.KeyEvent; 87 import android.view.LayoutInflater; [all …]
|
D | View_LayoutPositionTest.java | 17 package android.view.cts; 25 import android.view.View; 68 View view = mActivity.findViewById(R.id.testview); in testPositionInParent() local 75 assertEquals(-1, view.getBaseline()); in testPositionInParent() 78 view.getLocationOnScreen(vLocation); in testPositionInParent() 81 view.getDrawingRect(vRect); in testPositionInParent() 88 assertEquals(left, view.getLeft()); in testPositionInParent() 89 assertEquals(top, view.getTop()); in testPositionInParent() 90 assertEquals(right, view.getRight()); in testPositionInParent() 91 assertEquals(bottom, view.getBottom()); in testPositionInParent() [all …]
|
D | HandwritingBoundsOffsetTest.java | 17 package android.view.cts; 26 import android.view.View; 57 final View view = activity.findViewById(R.id.default_view); in handwritingBoundsOffset_viewDefaultValue() local 61 assertThat(view.getHandwritingBoundsOffsetLeft()).isZero(); in handwritingBoundsOffset_viewDefaultValue() 62 assertThat(view.getHandwritingBoundsOffsetRight()).isZero(); in handwritingBoundsOffset_viewDefaultValue() 63 assertThat(view.getHandwritingBoundsOffsetTop()).isZero(); in handwritingBoundsOffset_viewDefaultValue() 64 assertThat(view.getHandwritingBoundsOffsetBottom()).isZero(); in handwritingBoundsOffset_viewDefaultValue() 70 final View view = activity.findViewById(R.id.default_textview); in handwritingBoundsOffset_textViewDefaultValue() local 75 assertThat(view.getHandwritingBoundsOffsetLeft()).isEqualTo( in handwritingBoundsOffset_textViewDefaultValue() 77 assertThat(view.getHandwritingBoundsOffsetRight()).isEqualTo( in handwritingBoundsOffset_textViewDefaultValue() [all …]
|
D | ViewReceiveContentTest.java | 17 package android.view.cts; 19 import static android.view.ContentInfo.SOURCE_CLIPBOARD; 20 import static android.view.ContentInfo.SOURCE_DRAG_AND_DROP; 37 import android.view.ContentInfo; 38 import android.view.DragEvent; 39 import android.view.OnReceiveContentListener; 40 import android.view.View; 85 View view = new View(mActivity); in testOnReceiveContent_mimeTypes() local 88 assertThat(view.getReceiveContentMimeTypes()).isNull(); in testOnReceiveContent_mimeTypes() 92 view.setOnReceiveContentListener(mimeTypes, mReceiver); in testOnReceiveContent_mimeTypes() [all …]
|
D | ViewOutlineProviderTest.java | 17 package android.view.cts; 27 import android.view.View; 28 import android.view.ViewOutlineProvider; 51 private void setViewLeftTopRightBottom(View view, int left, int top, int right, int bottom) { in setViewLeftTopRightBottom() argument 52 view.setLeft(left); in setViewLeftTopRightBottom() 53 view.setTop(top); in setViewLeftTopRightBottom() 54 view.setRight(right); in setViewLeftTopRightBottom() 55 view.setBottom(bottom); in setViewLeftTopRightBottom() 61 View view = new View(mContext); in testBackground() local 62 setViewLeftTopRightBottom(view, 100, 200, 300, 400); in testBackground() [all …]
|
D | View_AnimationTest.java | 17 package android.view.cts; 30 import android.view.View; 31 import android.view.animation.TranslateAnimation; 32 import android.view.animation.cts.AnimationTestUtils; 83 final View view = mActivity.findViewById(R.id.mock_view); in testAnimation() local 85 view.setAnimation(null); in testAnimation() 86 assertNull(view.getAnimation()); in testAnimation() 88 view.setAnimation(mAnimation); in testAnimation() 89 mActivityRule.runOnUiThread(view::invalidate); in testAnimation() 91 AnimationTestUtils.assertRunAnimation(mInstrumentation, mActivityRule, view, mAnimation, in testAnimation() [all …]
|
D | ViewAnimationMatrixTest.java | 17 package android.view.cts; 30 import android.view.PixelCopy; 31 import android.view.View; 32 import android.view.ViewGroup; 67 View view = new View(InstrumentationRegistry.getTargetContext()); in testAnimationMatrixGetter() local 71 view.setAnimationMatrix(matrix); in testAnimationMatrixGetter() 73 assertEquals(matrix, view.getAnimationMatrix()); in testAnimationMatrixGetter() 79 final View view = activity.mView; in testAnimationMatrixAppliedDuringDrawing() local 83 mRule.runOnUiThread(() -> view.setAnimationMatrix(moveToTopLeftCorner(view))); in testAnimationMatrixAppliedDuringDrawing() 87 Bitmap bitmap = captureView(root, view.getWidth(), view.getHeight()); in testAnimationMatrixAppliedDuringDrawing() [all …]
|
D | AutoHandwritingTest.java | 17 package android.view.cts; 25 import android.view.View; 56 View view = activity.findViewById(R.id.auto_handwriting_enabled); in autoHandwriting_setToTrueInXml() local 58 assertTrue(view.isAutoHandwritingEnabled()); in autoHandwriting_setToTrueInXml() 64 View view = activity.findViewById(R.id.auto_handwriting_disabled); in autoHandwriting_setToFalseInXml() local 66 assertFalse(view.isAutoHandwritingEnabled()); in autoHandwriting_setToFalseInXml() 72 View view = activity.findViewById(R.id.auto_handwriting_enabled); in autoHandwriting_setToFalse() local 73 assertTrue(view.isAutoHandwritingEnabled()); in autoHandwriting_setToFalse() 75 view.setAutoHandwritingEnabled(false); in autoHandwriting_setToFalse() 76 assertFalse(view.isAutoHandwritingEnabled()); in autoHandwriting_setToFalse() [all …]
|
D | LayoutInflaterTest.java | 17 package android.view.cts; 40 import android.view.ContextThemeWrapper; 41 import android.view.Gravity; 42 import android.view.InflateException; 43 import android.view.LayoutInflater; 44 import android.view.LayoutInflater.Factory; 45 import android.view.LayoutInflater.Filter; 46 import android.view.View; 47 import android.view.ViewGroup; 48 import android.view.cts.util.XmlUtils; [all …]
|
/cts/tests/sensitivecontentprotection/src/android/sensitivecontentprotection/cts/ |
D | ViewUnitTest.java | 19 import static android.view.flags.Flags.FLAG_SENSITIVE_CONTENT_APP_PROTECTION_API; 25 import android.view.View; 58 View view = activity.findViewById(R.id.view); in testContentSensitivityXmlAttribute() 59 assertThat(view.getContentSensitivity()).isEqualTo(View.CONTENT_SENSITIVITY_AUTO); in testContentSensitivityXmlAttribute() 60 assertThat(view.isContentSensitive()).isFalse(); in testContentSensitivityXmlAttribute() 63 view = activity.findViewById(R.id.view_content_sensitivity_auto); in testContentSensitivityXmlAttribute() 64 assertThat(view.getContentSensitivity()).isEqualTo(View.CONTENT_SENSITIVITY_AUTO); in testContentSensitivityXmlAttribute() 65 assertThat(view.isContentSensitive()).isFalse(); in testContentSensitivityXmlAttribute() 68 view = activity.findViewById(R.id.view_content_sensitivity_not_sensitive); in testContentSensitivityXmlAttribute() 69 assertThat(view.getContentSensitivity()) in testContentSensitivityXmlAttribute() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/display/ |
D | WindowContextPolicyTests.java | 19 import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY; 20 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; 21 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG; 22 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; 23 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; 24 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; 25 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; 26 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL; 27 import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; 28 import static android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION; [all …]
|
/cts/tests/tests/widget29/src/android/widget/cts29/ |
D | ToastTest.java | 33 import android.view.Gravity; 34 import android.view.View; 35 import android.view.ViewTreeObserver; 36 import android.view.WindowManager; 37 import android.view.accessibility.AccessibilityManager; 116 private static void assertShowToast(final View view) { in assertShowToast() argument 117 PollingCheck.waitFor(TIME_OUT, () -> null != view.getParent()); in assertShowToast() 120 private static void assertShowAndHide(final View view) { in assertShowAndHide() argument 121 assertShowToast(view); in assertShowAndHide() 122 PollingCheck.waitFor(TIME_OUT, () -> null == view.getParent()); in assertShowAndHide() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | PointerIconTest.java | 19 import static android.view.flags.Flags.FLAG_ENABLE_ARROW_ICON_ON_HOVER_WHEN_CLICKABLE; 29 import android.view.InputDevice; 30 import android.view.MotionEvent; 31 import android.view.MotionEvent.PointerCoords; 32 import android.view.PointerIcon; 33 import android.view.View; 120 private void assertDefaultWidgetMousePointerIconBehaviorWithoutFlag(View view) { in assertDefaultWidgetMousePointerIconBehaviorWithoutFlag() argument 121 assertMousePointerIcon("Default pointer icon", mHandIcon, view); in assertDefaultWidgetMousePointerIconBehaviorWithoutFlag() 123 view.setEnabled(false); in assertDefaultWidgetMousePointerIconBehaviorWithoutFlag() 124 assertMousePointerIcon("Disabled view has no pointer icon", null, view); in assertDefaultWidgetMousePointerIconBehaviorWithoutFlag() [all …]
|
D | SimpleCursorTreeAdapterTest.java | 28 import android.view.View; 112 TextView view = new TextView(mContext); in testBindChildView() local 113 view.setId(R.id.cursorAdapter_item0); in testBindChildView() 114 mSimpleCursorTreeAdapter.bindChildView(view, null, mChildCursor, true); in testBindChildView() 115 assertEquals("child02", view.getText().toString()); in testBindChildView() 118 mSimpleCursorTreeAdapter.bindChildView(view, null, mChildCursor, false); in testBindChildView() 119 assertEquals("child12", view.getText().toString()); in testBindChildView() 131 TextView view = new TextView(mContext); in testBindGroupView() local 132 view.setId(R.id.cursorAdapter_group0); in testBindGroupView() 133 mSimpleCursorTreeAdapter.bindGroupView(view, null, mGroupCursor, true); in testBindGroupView() [all …]
|
/cts/tests/tests/view/src/android/view/animation/cts/ |
D | AnimationTestUtils.java | 17 package android.view.animation.cts; 21 import android.view.View; 22 import android.view.ViewGroup; 23 import android.view.animation.Animation; 24 import android.view.animation.LayoutAnimationController; 54 final ActivityTestRule activityTestRule, final View view, final Animation animation) in assertRunAnimation() argument 56 assertRunAnimation(instrumentation, activityTestRule, view, animation, in assertRunAnimation() 71 final ActivityTestRule activityTestRule, final View view, final Animation animation, in assertRunAnimation() argument 74 activityTestRule.runOnUiThread(() -> view.startAnimation(animation)); in assertRunAnimation() 90 final ViewGroup view, final LayoutAnimationController controller, in assertRunController() argument [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
D | EventCapturingClickListener.java | 23 import android.view.View; 33 public void onClick(View view) { in onClick() argument 34 mViews.offer(view); in onClick() 39 View view; in assertClicked() local 43 view = mViews.poll(waitTime, SECONDS); in assertClicked() 50 view); in assertClicked() 51 if (v != view) { in assertClicked() 52 fail("Unexpected click event for view" + view.toString()); in assertClicked() 64 View view = mViews.poll(waitTime, SECONDS); in assertNoneClicked() local 65 if (view != null) { in assertNoneClicked() [all …]
|
D | EventCapturingLongClickListener.java | 24 import android.view.View; 47 public boolean onLongClick(View view) { in onLongClick() argument 48 mViews.offer(view); in onLongClick() 54 View view; in assertLongClicked() local 58 view = mViews.poll(waitTime, SECONDS); in assertLongClicked() 65 view); in assertLongClicked() 66 if (v != view) { in assertLongClicked() 67 fail("Unexpected long click event for view" + view.toString()); in assertLongClicked() 79 View view = mViews.poll(waitTime, SECONDS); in assertNoneLongClicked() local 80 if (view != null) { in assertNoneLongClicked() [all …]
|
/cts/tests/tests/car_builtin/src/android/car/cts/builtin/view/ |
D | TouchableInsetsProviderTest.java | 17 package android.car.cts.builtin.view; 25 import android.car.builtin.view.TouchableInsetsProvider; 35 import android.view.InputDevice; 36 import android.view.MotionEvent; 37 import android.view.View; 134 View view = mActivity.getWindow().getDecorView(); in testTouchableInsetsProvider_InputEventDeliveredOnObscuredRegion() local 135 tapOnView(view, view.getWidth() / 8, view.getHeight() / 8); in testTouchableInsetsProvider_InputEventDeliveredOnObscuredRegion() 142 View view = mActivity.getWindow().getDecorView(); in testViewWithTouchableInsetsProvider_InputEventIsNotDelivered() local 143 tapOnView(view, view.getWidth() / 2, view.getHeight() / 2); in testViewWithTouchableInsetsProvider_InputEventIsNotDelivered() 148 tapOnView(view, view.getWidth() / 8 * 7, view.getHeight() / 8); in testViewWithTouchableInsetsProvider_InputEventIsNotDelivered() [all …]
|
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/ |
D | StateInitializeActivity.java | 17 package android.view.inputmethod.cts.util; 19 import static android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN; 24 import android.view.View; 25 import android.view.ViewGroup; 42 final View view = new View(this); in onCreate() local 43 view.setBackgroundColor(Color.WHITE); in onCreate() 44 view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, in onCreate() 53 view.setFitsSystemWindows(true); in onCreate() 54 setContentView(view); in onCreate()
|
D | NavigationBarInfo.java | 17 package android.view.inputmethod.cts.util; 19 import static android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND; 20 import static android.view.inputmethod.cts.util.TestUtils.getOnMainSync; 29 import android.view.View; 30 import android.view.ViewGroup; 31 import android.view.WindowInsets; 91 final View view = new View(activity); in getInstance() 92 view.setLayoutParams(new ViewGroup.LayoutParams( in getInstance() 95 viewRef.set(view); in getInstance() 96 return view; in getInstance() [all …]
|
/cts/tests/surfacecontrol/src/android/view/surfacecontrol/cts/ |
D | SurfaceViewSyncTest.java | 16 package android.view.surfacecontrol.cts; 28 import android.view.Gravity; 29 import android.view.SurfaceControl; 30 import android.view.SurfaceHolder; 31 import android.view.SurfaceView; 32 import android.view.View; 33 import android.view.ViewGroup; 34 import android.view.animation.LinearInterpolator; 35 import android.view.cts.surfacevalidator.AnimationFactory; 36 import android.view.cts.surfacevalidator.AnimationTestCase; [all …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | LocalAlertService.java | 18 import static android.view.Gravity.LEFT; 19 import static android.view.Gravity.TOP; 20 import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; 21 import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; 22 import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; 23 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; 30 import android.view.View; 31 import android.view.WindowManager; 72 final TextView view = new TextView(this); in showAlertWindow() local 73 view.setText(windowName); in showAlertWindow() [all …]
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | CharacterPickerDialogTest.java | 28 import android.view.View; 69 final View view = new TextViewNoIme(mActivity); in testConstructor() local 70 new CharacterPickerDialog(view.getContext(), view, content, "\u00A1", false); in testConstructor() local 78 final View view = new TextViewNoIme(mActivity); in testConstructorNullContext() local 79 new CharacterPickerDialog(null, view, content, "\u00A1", false); in testConstructorNullContext() 88 final View view = new TextViewNoIme(mActivity); in testOnItemClick() local 90 new CharacterPickerDialog(view.getContext(), view, text, "abc", false); in testOnItemClick() 98 replacePickerDialog.onItemClick(parent, view, 0, 0); in testOnItemClick() 107 replacePickerDialog.onItemClick(parent, view, 2, 0); in testOnItemClick() 114 new CharacterPickerDialog(view.getContext(), view, text, "abc", true); in testOnItemClick() [all …]
|
/cts/tests/tests/transition/src/android/transition/cts/ |
D | ChangeScrollTest.java | 23 import android.view.View; 59 final View view = mActivity.findViewById(R.id.text); in testChangeScroll() local 60 assertEquals(0, view.getScrollX()); in testChangeScroll() 61 assertEquals(0, view.getScrollY()); in testChangeScroll() 63 view.scrollTo(150, 300); in testChangeScroll() 64 view.setOnScrollChangeListener(listener); in testChangeScroll() 69 final View view = mActivity.findViewById(R.id.text); in testChangeScroll() local 70 final int scrollX = view.getScrollX(); in testChangeScroll() 71 final int scrollY = view.getScrollY(); in testChangeScroll() 79 final View view = mActivity.findViewById(R.id.text); in testChangeScroll() [all …]
|
/cts/tests/tests/animation/src/android/animation/cts/ |
D | AnimationActivity.java | 36 import android.view.MotionEvent; 37 import android.view.View; 38 import android.view.ViewGroup; 39 import android.view.animation.AccelerateInterpolator; 59 public AnimationView view = null; field in AnimationActivity 76 view = new AnimationView(this); in onCreate() 78 viewGroup.addView(view); in onCreate() 93 return createAnimator(view.newBall, "y", 1000, ValueAnimator.INFINITE, repeatMode, in createAnimatorWithRepeatMode() 98 return createAnimator(view.newBall, "y", 1000, repeatCount, ValueAnimator.REVERSE, in createAnimatorWithRepeatCount() 103 return createAnimator(view.newBall, "y", duration ,ValueAnimator.INFINITE, in createAnimatorWithDuration() [all …]
|