Home
last modified time | relevance | path

Searched refs:button (Results 1 – 25 of 59) sorted by relevance

123

/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/
DTvAppVerifierActivity.java61 View button = item.findViewById(R.id.user_action_button); in setButtonEnabled() local
62 button.setFocusable(enabled); in setButtonEnabled()
63 button.setClickable(enabled); in setButtonEnabled()
64 button.setEnabled(enabled); in setButtonEnabled()
86 Button button = (Button) item.findViewById(R.id.user_action_button); in createAndAttachUserItem() local
87 button.setVisibility(View.VISIBLE); in createAndAttachUserItem()
88 button.setText(buttonTextId); in createAndAttachUserItem()
89 button.setOnClickListener(l); in createAndAttachUserItem()
102 Button button = item.findViewById(R.id.user_action_button); in createAndAttachUserItem() local
103 button.setVisibility(View.VISIBLE); in createAndAttachUserItem()
[all …]
/cts/tests/tests/gameservice/CtsGameServiceSystemBarVerifier/src/android/service/games/cts/systembarverifier/
DMainActivity.java32 final Button button = new Button(this); in onCreate() local
33 button.setText("Show system bars permanently"); in onCreate()
34 button.setAllCaps(false); in onCreate()
35 setContentView(button); in onCreate()
37 final WindowInsetsController windowInsetsController = button.getWindowInsetsController(); in onCreate()
42 button.setOnClickListener(v -> { in onCreate()
/cts/tests/input/src/android/input/cts/
DStylusButtonInputEventTest.kt107 for (button in LINUX_TO_ANDROID_KEYCODE_MAP.entries.iterator()) { in <lambda>() method
109 makeEvents(EV_KEY, button.key, KEY_DOWN, EV_SYN, SYN_REPORT, 0) in <lambda>()
113 assertReceivedSystemKey(button.value) in <lambda>()
116 makeEvents(EV_KEY, button.key, KEY_UP, EV_SYN, SYN_REPORT, 0) in <lambda>()
126 for (button in LINUX_TO_ANDROID_KEYCODE_MAP.entries.iterator()) { in <lambda>() method
128 makeEvents(EV_KEY, button.key, KEY_DOWN, EV_SYN, SYN_REPORT, 0) in <lambda>()
131 makeEvents(EV_KEY, button.key, KEY_UP, EV_SYN, SYN_REPORT, 0) in <lambda>()
150 for (button in LINUX_KEYCODE_TO_MOTIONEVENT_BUTTON.entries.iterator()) { in <lambda>() constant
155 uinputStylus.sendBtn(button.key, true) in <lambda>()
162 button.value, in <lambda>()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DTouchDelegateTestActivity.java65 final Button button = findViewById(R.id.button); in onCreate() local
75 button.getLocationInWindow(buttonLocation); in onCreate()
80 button.getHitRect(rect); in onCreate()
82 parent.setTouchDelegate(new TouchDelegate(rect, button)); in onCreate()
89 button.setOnClickListener(v -> mButtonClickCount++); in onCreate()
90 button.setOnTouchListener((v, event) -> { in onCreate()
94 button.setOnHoverListener((v, event) -> { in onCreate()
DView_DefaultFocusHighlightTest.java75 Button button = (Button) activity.findViewById(R.id.button); in testSettersAndGetters() local
81 assertTrue(button.getDefaultFocusHighlightEnabled()); in testSettersAndGetters()
87 button.setDefaultFocusHighlightEnabled(false); in testSettersAndGetters()
93 assertFalse(button.getDefaultFocusHighlightEnabled()); in testSettersAndGetters()
109 Button button = (Button) activity.findViewById(R.id.button_to_inflate); in testInflating() local
116 assertFalse(button.getDefaultFocusHighlightEnabled()); in testInflating()
129 final Button button = (Button) activity.findViewById(R.id.button_to_test_highlight_needed); in testIsDefaultFocusHighlightNeeded() local
150 button.setDefaultFocusHighlightEnabled(true); in testIsDefaultFocusHighlightNeeded()
151 isNeeded = button.isDefaultFocusHighlightNeeded(drawables[i], drawables[j]); in testIsDefaultFocusHighlightNeeded()
155 button.setDefaultFocusHighlightEnabled(false); in testIsDefaultFocusHighlightNeeded()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DSimpleKeyguardService.java65 Button button = new Button(context); in createView() local
67 button.setTransformationMethod(null); in createView()
68 button.setText(DISMISS_BUTTON_LABEL); in createView()
69 button.setOnClickListener(ignored -> { in createView()
70 button.setText("Dismissing..."); in createView()
71 button.setEnabled(false); in createView()
80 rootView.addView(button); in createView()
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/
DOneTimeCompoundButtonListener.java35 private final CompoundButton button; field in OneTimeCompoundButtonListener
38 public OneTimeCompoundButtonListener(String name, CompoundButton button, in OneTimeCompoundButtonListener() argument
41 this.button = button; in OneTimeCompoundButtonListener()
54 final boolean actual = button.isChecked(); in assertAutoFilled()
/cts/tests/framework/base/windowmanager/jetpack/src/android/server/wm/jetpack/utils/
DTestFocusActivity.java43 final Button button = new Button(this); in onCreate() local
45 button.setText(text); in onCreate()
48 button.setLayoutParams(new ViewGroup.LayoutParams( in onCreate()
53 mInitialFocusedView = button; in onCreate()
57 button.setOnFocusChangeListener((v , hasFocus) -> Log.d(getClass().getSimpleName(), in onCreate()
60 contentView.addView(button); in onCreate()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityWindowQueryTest.java195 AccessibilityNodeInfo button = sUiAutomation.getRootInActiveWindow() in testFindByContentDescription() local
198 assertNotNull(button); in testFindByContentDescription()
371 AccessibilityNodeInfo button = sUiAutomation in testPerformActionSetAndClearFocus() local
374 assertFalse(button.isFocused()); in testPerformActionSetAndClearFocus()
377 assertTrue(button.performAction(ACTION_FOCUS)); in testPerformActionSetAndClearFocus()
380 button = sUiAutomation.getRootInActiveWindow() in testPerformActionSetAndClearFocus()
382 assertTrue(button.isFocused()); in testPerformActionSetAndClearFocus()
385 assertTrue(button.performAction(ACTION_CLEAR_FOCUS)); in testPerformActionSetAndClearFocus()
388 button = sUiAutomation.getRootInActiveWindow() in testPerformActionSetAndClearFocus()
390 assertFalse(button.isFocused()); in testPerformActionSetAndClearFocus()
[all …]
DAccessibilityEndToEndTest.java290 final Button button = (Button) mActivity.findViewById(R.id.button); in testTypeViewClickedAccessibilityEvent() local
301 button.performClick(); in testTypeViewClickedAccessibilityEvent()
330 final Button button = (Button) mActivity.findViewById(R.id.button); in testTypeViewLongClickedAccessibilityEvent() local
341 button.performLongClick(); in testTypeViewLongClickedAccessibilityEvent()
372 final Button button = (Button) mActivity.findViewById(R.id.buttonWithTooltip); in testTypeViewFocusedAccessibilityEvent() local
376 () -> mActivity.runOnUiThread(button::requestFocus), in testTypeViewFocusedAccessibilityEvent()
656 mActivity.findViewById(R.id.button).requestFocus()) in testPackageNameCannotBeFaked()
689 mActivity.findViewById(R.id.button).requestFocus()) in testPackageNameCannotBeFakedAppWidget()
730 mActivity.findViewById(R.id.button).performClick()) in testPackageNameCannotBeFakedAppWidget()
1116 final AccessibilityNodeInfo button = sUiAutomation.getRootInActiveWindow() in testA11yActionTriggerMotionEventActionOutside() local
[all …]
DAccessibilityWindowReportingTest.java170 final Button button = new Button(mActivity); in testWindowAddedMovedAndRemoved_generatesEventsForAllThree() local
171 button.setText(R.string.button1); in testWindowAddedMovedAndRemoved_generatesEventsForAllThree()
174 button, paramsForTop, filterWindowsChangedWithChangeTypes(WINDOWS_CHANGE_ADDED)); in testWindowAddedMovedAndRemoved_generatesEventsForAllThree()
178 () -> mActivity.getWindowManager().updateViewLayout(button, paramsForBottom)), in testWindowAddedMovedAndRemoved_generatesEventsForAllThree()
182 WindowCreationUtils.removeWindow(sUiAutomation, sInstrumentation, mActivity, button); in testWindowAddedMovedAndRemoved_generatesEventsForAllThree()
543 final Button button = new Button(mActivity); in showTopWindowAndWaitForItToShowUp() local
544 button.setText(R.string.button1); in showTopWindowAndWaitForItToShowUp()
547 button, paramsForTop, (event) -> (event.getEventType() == TYPE_WINDOWS_CHANGED) in showTopWindowAndWaitForItToShowUp()
550 return button; in showTopWindowAndWaitForItToShowUp()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/widgets/
DProjectionWidgetActivity.java61 Button button; in onCreate() local
63 button = (Button) view.findViewById(R.id.up_button); in onCreate()
64 button.setOnClickListener(new InjectDPadClickListener(KeyEvent.KEYCODE_DPAD_UP)); in onCreate()
67 button = (Button) view.findViewById(R.id.down_button); in onCreate()
68 button.setOnClickListener(new InjectDPadClickListener(KeyEvent.KEYCODE_DPAD_DOWN)); in onCreate()
/cts/tests/tests/widget/src/android/widget/cts/util/
DListItemFactory.java119 final Button button = new Button(context); in horizontalButtonSlots() local
120 button.setText("left"); in horizontalButtonSlots()
121 ll.addView(button, lp); in horizontalButtonSlots()
127 final Button button = new Button(context); in horizontalButtonSlots() local
128 button.setText("center"); in horizontalButtonSlots()
129 ll.addView(button, lp); in horizontalButtonSlots()
135 final Button button = new Button(context); in horizontalButtonSlots() local
136 button.setText("right"); in horizontalButtonSlots()
137 ll.addView(button, lp); in horizontalButtonSlots()
154 public static View button(int position, Context context, String text, int desiredHeight) { in button() method in ListItemFactory
/cts/tests/controls/src/android/controls/cts/
DCtsControlsService.java105 ControlButton button = new ControlButton(isOn, isOn ? "On" : "Off"); in buildSwitch() local
106 ControlTemplate template = new ToggleTemplate("toggle", button); in buildSwitch()
121 ControlButton button = new ControlButton(isStarted, desc); in buildMower() local
122 ControlTemplate template = new ToggleTemplate("toggle", button); in buildMower()
139 ControlButton button = new ControlButton(isLocked, desc); in buildLock() local
140 ControlTemplate template = new ToggleTemplate("toggle", button); in buildLock()
153 ControlButton button = new ControlButton(isLocked, desc); in buildGate() local
154 ControlTemplate template = new ToggleTemplate("toggle", button); in buildGate()
272 ControlButton button = new ControlButton(b.getNewState(), desc); in performControlAction() local
273 builder.setControlTemplate(new ToggleTemplate("toggle", button)); in performControlAction()
[all …]
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DPermissionUtils.java206 UiObject2 button = findPermissionPromptButton(device, expectedAction, resNames); in pressPermissionPromptButton() local
207 Log.d(LOG_TAG, "Clicking on '" + button.getText() + "'"); in pressPermissionPromptButton()
208 button.click(); in pressPermissionPromptButton()
245 UiObject2 button = device.findObject(selector); in findPermissionPromptButton() local
247 possiblePkg, button != null)); in findPermissionPromptButton()
248 if (button != null) { in findPermissionPromptButton()
249 return button; in findPermissionPromptButton()
288 UiObject2 button = device.findObject(selector); in findPermissionPromptButtonAutomotive() local
289 Log.d(LOG_TAG, "button: " + button + (button == null ? "" : " (" + button.getText() + ")")); in findPermissionPromptButtonAutomotive()
291 .that(button).isNotNull(); in findPermissionPromptButtonAutomotive()
[all …]
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/
DManualPackageInstallTest.java119 UiObject2 button = mDevice.findObject(INSTALL_BUTTON_SELECTOR); in automateInstallClick() local
120 assertNotNull("Install button not found", button); in automateInstallClick()
121 button.click(); in automateInstallClick()
130 UiObject2 button = mDevice.findObject(getPopUpButtonSelector()); in automateDismissInstallBlockedDialog() local
131 assertNotNull("OK button not found", button); in automateDismissInstallBlockedDialog()
132 button.click(); in automateDismissInstallBlockedDialog()
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/
DSuspendPackageTest.java138 final UiObject2 button = device.findObject(getPopUpButtonSelector()); in dismissPolicyTransparencyDialog() local
139 assertWithMessage("OK button").that(button).isNotNull(); in dismissPolicyTransparencyDialog()
140 button.click(); in dismissPolicyTransparencyDialog()
146 final UiObject2 button = device.findObject(getPopUpButtonSelector()); in dismissPolicyTransparencyDialog() local
147 assertWithMessage("OK button").that(button).isNotNull(); in dismissPolicyTransparencyDialog()
148 button.click(); in dismissPolicyTransparencyDialog()
156 final UiObject2 button = device.findObject(SUSPEND_BUTTON_SELECTOR); in dismissCustomDialog() local
157 assertWithMessage("OK button").that(button).isNotNull(); in dismissCustomDialog()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/controls/
DControlsPanelVerifierSettingTest.java61 Button button = findViewById(R.id.button); in onCreate() local
62 button.setText(R.string.controls_panel_settings_test_open_lockscreen_settings); in onCreate()
63 button.setOnClickListener(v -> { in onCreate()
/cts/tests/tests/preference/src/android/preference/cts/
DPreferenceWithHeaders.java43 Button button = new Button(this); in onCreate() local
44 button.setText("Some action"); in onCreate()
45 setListFooter(button); in onCreate()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0591/src/android/security/cts/CVE_2021_0591/
DDeviceTest.java78 String button; in testClick() local
81 button = o.getText(); in testClick()
82 if (button == null) { in testClick()
85 if (button.matches("ALLOW|YES|Allow|Yes")) { in testClick()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/activities/
DAccessibilityEndToEndActivity.java79 Button button = findViewById(R.id.button); in onCreate() local
82 button.getViewTreeObserver().addOnGlobalLayoutListener(setTouchDelegate(button, in onCreate()
83 () -> withTouchableAtRight.apply(button))::run); in onCreate()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39706/src/android/security/cts/CVE_2021_39706/
DPocActivity.java34 Button button = (Button) findViewById(R.id.button); in onCreate() local
35 button.setOnClickListener(new View.OnClickListener() { in onCreate()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0305/src/android/security/cts/CVE_2021_0305/
DDeviceTest.java105 UiObject2 button = mDevice.findObject(selector); in testClick() local
106 if (button != null) { in testClick()
107 button.click(); in testClick()
/cts/tests/tests/packageinstaller/packagescheme/src/android/packageinstaller/packagescheme/cts/
DPackageSchemeTestBase.kt155 var button: UiObject2? in <lambda>() variable
164 button = mUiDevice.wait( in <lambda>()
168 button = mUiDevice.wait( in <lambda>()
172 assertWithMessage("$btnName not found").that(button).isNotNull() in <lambda>()
173 button?.click() in <lambda>()
/cts/tests/tests/widget/src/android/widget/cts/
DRadioGroupTest.java376 RadioButton button = new RadioButton(mActivity); in testOnFinishInflate() local
377 button.setId(checkId); in testOnFinishInflate()
378 radioGroup.addView(button, new LinearLayout.LayoutParams( in testOnFinishInflate()
385 assertFalse(button.isChecked()); in testOnFinishInflate()
387 assertTrue(button.isChecked()); in testOnFinishInflate()
392 button = new RadioButton(mActivity); in testOnFinishInflate()
393 radioGroup.addView(button, new LinearLayout.LayoutParams( in testOnFinishInflate()
400 assertFalse(button.isChecked()); in testOnFinishInflate()
405 assertFalse(button.isChecked()); in testOnFinishInflate()

123