Home
last modified time | relevance | path

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

1234567

/packages/apps/Camera2/src/com/android/camera/
DButtonManager.java184 MultiToggleImageButton button = null; in onSettingChanged() local
190 button = getButtonOrError(BUTTON_FLASH); in onSettingChanged()
194 button = getButtonOrError(BUTTON_TORCH); in onSettingChanged()
198 button = getButtonOrError(BUTTON_HDR_PLUS_FLASH); in onSettingChanged()
202 button = getButtonOrError(BUTTON_CAMERA); in onSettingChanged()
206 button = getButtonOrError(BUTTON_HDR_PLUS); in onSettingChanged()
210 button = getButtonOrError(BUTTON_HDR); in onSettingChanged()
214 button = getButtonOrError(BUTTON_GRID_LINES); in onSettingChanged()
222 button = getButtonOrError(BUTTON_COUNTDOWN); in onSettingChanged()
225 if (button != null && button.getState() != index) { in onSettingChanged()
[all …]
/packages/apps/Dialer/java/com/android/incallui/incall/impl/
DButtonController.java51 void setButton(CheckableLabeledButton button); in setButton() argument
55 private static void resetButton(CheckableLabeledButton button) { in resetButton() argument
56 if (button != null) { in resetButton()
57 button.setOnCheckedChangeListener(null); in resetButton()
58 button.setOnClickListener(null); in resetButton()
72 protected CheckableLabeledButton button; field in ButtonController.CheckableButtonController
94 if (button != null) { in setEnabled()
95 button.setEnabled(isEnabled); in setEnabled()
107 if (button != null) { in setAllowed()
108 button.setVisibility(isAllowed ? View.VISIBLE : View.INVISIBLE); in setAllowed()
[all …]
DInCallButtonGridFragment.java82 for (CheckableLabeledButton button : buttons) { in onInCallScreenDialpadVisibilityChange()
83 button.setImportantForAccessibility( in onInCallScreenDialpadVisibilityChange()
124 @InCallButtonIds int button = buttonsToPlace.get(i); in updateButtonStates() local
125 buttonGridListener.getButtonController(button).setButton(buttons[i]); in updateButtonStates()
132 for (CheckableLabeledButton button : buttons) { in updateButtonColor()
133 button.setCheckedColor(color); in updateButtonColor()
/packages/services/Telephony/src/com/android/phone/settings/fdn/
DFdnSetting.java141 private void updatePINChangeState(EditPinPreference button, boolean positiveResult) { in updatePINChangeState() argument
167 mOldPin = button.getText(); in updatePINChangeState()
168 button.setText(""); in updatePINChangeState()
172 displayPinChangeDialog(button); in updatePINChangeState()
174 displayPinChangeDialog(button, R.string.invalidPin2, true); in updatePINChangeState()
178 mNewPin = button.getText(); in updatePINChangeState()
179 button.setText(""); in updatePINChangeState()
183 displayPinChangeDialog(button); in updatePINChangeState()
185 displayPinChangeDialog(button, R.string.invalidPin2, true); in updatePINChangeState()
189 if (validatePin(button.getText(), false)) { in updatePINChangeState()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DDropTargetBar.java118 for (ButtonDropTarget button : mDropTargets) { in setInsets()
119 button.setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.dropTargetTextSizePx); in setInsets()
120 button.setToolTipLocation(tooltipLocation); in setInsets()
144 for (ButtonDropTarget button : mDropTargets) { in onMeasure()
145 if (button.getVisibility() != GONE) { in onMeasure()
146 button.setTextVisible(false); in onMeasure()
147 button.measure(widthSpec, heightSpec); in onMeasure()
161 for (ButtonDropTarget button : mDropTargets) { in onMeasure()
162 if (button.getVisibility() != GONE) { in onMeasure()
163 button.setTextVisible(textVisible); in onMeasure()
[all …]
/packages/apps/Car/Notification/src/com/android/car/notification/template/
DCarNotificationActionsView.java134 Button button = mActionButtons.get(i); in bind() local
135 button.setVisibility(View.VISIBLE); in bind()
137 button.setText(action.title.toString()); in bind()
140 button.setOnClickListener(clickHandlerFactory.getActionClickHandler(alertEntry, i)); in bind()
165 for (Button button : mActionButtons) { in reset()
166 button.setVisibility(View.GONE); in reset()
167 button.setText(null); in reset()
168 button.setOnClickListener(null); in reset()
199 Button button = mActionButtons.get(FIRST_MESSAGE_ACTION_BUTTON_INDEX); in createPlayButton()
200 button.setText(mContext.getString(R.string.assist_action_play_label)); in createPlayButton()
[all …]
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/androidTest/java/com/android/car/ui/uxr/
DDrawableStateViewTest.java78 DrawableStateView button = mClassToTest.getDeclaredConstructor(Context.class) in test_drawablestateview_methods_work() local
81 int[] drawableState = runOnUiThread(((View) button)::getDrawableState); in test_drawablestateview_methods_work()
89 ((View) button).setEnabled(false); in test_drawablestateview_methods_work()
90 return ((View) button).getDrawableState(); in test_drawablestateview_methods_work()
99 ((View) button).setEnabled(true); in test_drawablestateview_methods_work()
100 button.setExtraDrawableState(new int[] { R.attr.state_ux_restricted }, null); in test_drawablestateview_methods_work()
101 return ((View) button).getDrawableState(); in test_drawablestateview_methods_work()
114 ((View) button).setEnabled(true); in test_drawablestateview_methods_work()
115 button.setExtraDrawableState( in test_drawablestateview_methods_work()
118 return ((View) button).getDrawableState(); in test_drawablestateview_methods_work()
[all …]
/packages/apps/Dialer/java/com/android/incallui/video/impl/
DSpeakerButtonController.java37 @NonNull private CheckableImageButton button; field in SpeakerButtonController
47 @NonNull CheckableImageButton button, in SpeakerButtonController()
52 this.button = Assert.isNotNull(button); in SpeakerButtonController()
61 button.setVisibility(View.VISIBLE); in updateButtonState()
62 button.setEnabled(isEnabled); in updateButtonState()
63 button.setChecked(isChecked); in updateButtonState()
64 button.setOnClickListener(checkable ? null : this); in updateButtonState()
65 button.setOnCheckedChangeListener(checkable ? this : null); in updateButtonState()
66 button.setImageResource(icon); in updateButtonState()
67 button.setContentDescription(contentDescription); in updateButtonState()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/controller/
DColorChooser.java65 final Button button = (Button) mTopView.findViewById(mButtonsID[i]); in setUp() local
66 mButton[i] = button; in setUp()
70 button.setTag(hsvo); in setUp()
71 GradientDrawable sd = ((GradientDrawable) button.getBackground()); in setUp()
76 button.setOnClickListener(new View.OnClickListener() { in setUp()
83 Button button = (Button) mTopView.findViewById(R.id.draw_color_popupbutton); in setUp() local
85 button.setOnClickListener(new View.OnClickListener() { in setUp()
115 final Button button = mButton[i]; in resetBorders() local
116 GradientDrawable sd = ((GradientDrawable) button.getBackground()); in resetBorders()
122 public void selectColor(View button, int buttonNo) { in selectColor() argument
[all …]
DStyleChooser.java47 final ImageButton button = new ImageButton(context); in setUp() local
48 button.setScaleType(ScaleType.CENTER_CROP); in setUp()
49 button.setLayoutParams(lp); in setUp()
50 button.setBackgroundResource(android.R.color.transparent); in setUp()
51 mIconButton.add(button); in setUp()
53 button.setOnClickListener(new View.OnClickListener() { in setUp()
59 mLinearLayout.addView(button); in setUp()
67 button.setImageBitmap(bmap); in setUp()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/
DButtonRoleHolderController.java78 CarSystemBarButton button = (CarSystemBarButton) v; in addAllButtonsWithRoleName() local
79 String roleName = button.getRoleName(); in addAllButtonsWithRoleName()
80 if (roleName != null && button.isDefaultAppIconForRoleEnabled()) { in addAllButtonsWithRoleName()
81 addButtonWithRoleName(button, roleName); in addAllButtonsWithRoleName()
91 private void addButtonWithRoleName(CarSystemBarButton button, String roleName) { in addButtonWithRoleName() argument
92 mButtonMap.put(roleName, button); in addButtonWithRoleName()
118 CarSystemBarButton button = mButtonMap.get(roleName); in updateIcon() local
119 if (button == null) { in updateIcon()
122 List<String> holders = mRoleManager.getRoleHoldersAsUser(button.getRoleName(), in updateIcon()
125 button.setAppIcon(null); in updateIcon()
[all …]
/packages/apps/Camera2/src/com/android/camera/ui/
DRadioOptions.java87 public void onClick(View button) { in updateListeners()
88 setSelectedOptionByView(button); in updateListeners()
93 View button = getChildAt(i); in updateListeners() local
94 button.setOnClickListener(onClickListener); in updateListeners()
103 View button = findViewWithTag(tag); in setSelectedOptionByTag() local
104 setSelectedOptionByView(button); in setSelectedOptionByTag()
112 View button = findViewById(id); in setSeletedOptionById() local
113 setSelectedOptionByView(button); in setSeletedOptionById()
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/
DSetupChooseLockPatternTest.java96 Button button = mActivity.findViewById(R.id.screen_lock_options); in optionsButton_whenPatternSelected_shouldBeVisible() local
97 assertThat(button).isNotNull(); in optionsButton_whenPatternSelected_shouldBeVisible()
98 assertThat(button.getVisibility()).isEqualTo(View.VISIBLE); in optionsButton_whenPatternSelected_shouldBeVisible()
104 assertThat(button.getVisibility()).isEqualTo(View.VISIBLE); in optionsButton_whenPatternSelected_shouldBeVisible()
108 Button button = mActivity.findViewById(R.id.screen_lock_options); in verifyScreenLockOptionsShown() local
109 assertThat(button).isNotNull(); in verifyScreenLockOptionsShown()
110 assertThat(button.getVisibility()).isEqualTo(View.VISIBLE); in verifyScreenLockOptionsShown()
112 button.performClick(); in verifyScreenLockOptionsShown()
132 Button button = mActivity.findViewById(R.id.screen_lock_options); in verifyScreenLockOptionsHidden() local
133 assertThat(button).isNotNull(); in verifyScreenLockOptionsHidden()
[all …]
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/
DMediaButtonController.java147 ImageButton button = mControlBar.createIconButton(icon); in createIconButton() local
150 button.setImageTintList( in createIconButton()
153 button.setImageTintList(mIconsColor); in createIconButton()
155 button.setImageTintMode(PorterDuff.Mode.SRC_ATOP); in createIconButton()
156 return button; in createIconButton()
253 ImageButton button = mImageButtons.get(action.mAction); in getOrCreateIconButton() local
254 if (button != null) { in getOrCreateIconButton()
255 button.setImageDrawable(action.mIcon); in getOrCreateIconButton()
257 button = createIconButton(action.mIcon); in getOrCreateIconButton()
258 mImageButtons.put(action.mAction, button); in getOrCreateIconButton()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DNetworkRequestDialogFragmentTest.java206 final Button button = alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL); in display_shouldNotShowNeutralButton() local
207 assertThat(button).isNotNull(); in display_shouldNotShowNeutralButton()
208 assertThat(button.getVisibility()).isEqualTo(View.GONE); in display_shouldNotShowNeutralButton()
230 final Button button = alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL); in onMatchManyResult_showNeutralButton() local
231 assertThat(button).isNotNull(); in onMatchManyResult_showNeutralButton()
232 assertThat(button.getVisibility()).isEqualTo(View.VISIBLE); in onMatchManyResult_showNeutralButton()
251 final Button button = alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL); in clickNeutralButton_hideNeutralButton() local
252 button.performClick(); in clickNeutralButton_hideNeutralButton()
255 assertThat(button.getVisibility()).isEqualTo(View.GONE); in clickNeutralButton_hideNeutralButton()
267 final Button button = alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); in cancelDialog_callsReject() local
[all …]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/
DGestureBot.java115 private void swipe(int downX, int downY, int upX, int upY, int steps, int button, in swipe() argument
130 touchDown(downX, downY, button); in swipe()
135 touchMove(downX + (int) (xStep * i), downY + (int) (yStep * i), button); in swipe()
145 private boolean touchDown(int x, int y, int button) { in touchDown() argument
147 MotionEvent event = getMotionEvent(mDownTime, mDownTime, MotionEvent.ACTION_DOWN, button, x, in touchDown()
159 private boolean touchMove(int x, int y, int button) { in touchMove() argument
161 MotionEvent event = getMotionEvent(mDownTime, eventTime, MotionEvent.ACTION_MOVE, button, x, in touchMove()
167 private static MotionEvent getMotionEvent(long downTime, long eventTime, int action, int button, in getMotionEvent() argument
182 0, button, 1.0f, 1.0f, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0); in getMotionEvent()
/packages/apps/Settings/src/com/android/settings/widget/
DEntityHeaderController.java308 private void bindButton(ImageButton button, @ActionType int action) { in bindButton() argument
309 if (button == null) { in bindButton()
315 button.setVisibility(View.GONE); in bindButton()
317 button.setImageResource(com.android.internal.R.drawable.ic_mode_edit); in bindButton()
318 button.setVisibility(View.VISIBLE); in bindButton()
319 button.setOnClickListener(mEditOnClickListener); in bindButton()
325 button.setVisibility(View.GONE); in bindButton()
327 button.setOnClickListener(v -> { in bindButton()
335 button.setVisibility(View.VISIBLE); in bindButton()
340 button.setVisibility(View.GONE); in bindButton()
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/template/
DCarNotificationActionsViewTest.java135 Button button = mCarNotificationActionsView.getActionButtons().get(i); in onBind_noAction_doesNotCreateButtons() local
136 assertThat(button.getVisibility()).isNotEqualTo(View.VISIBLE); in onBind_noAction_doesNotCreateButtons()
137 assertThat(button.hasOnClickListeners()).isFalse(); in onBind_noAction_doesNotCreateButtons()
270 Button button = mCarNotificationActionsView.getActionButtons().get(0); in onBind_actionExists_notCarCompatibleMessage_buttonIsVisible() local
272 assertThat(button.getVisibility()).isEqualTo(View.VISIBLE); in onBind_actionExists_notCarCompatibleMessage_buttonIsVisible()
282 Button button = mCarNotificationActionsView.getActionButtons().get(0); in onBind_actionExists_notCarCompatibleMessage_buttonShowsActionTitle() local
284 assertThat(button.getText()).isEqualTo(ACTION_TITLE); in onBind_actionExists_notCarCompatibleMessage_buttonShowsActionTitle()
294 Button button = mCarNotificationActionsView.getActionButtons().get(0); in onBind_actionExists_notCarCompatibleMessage_hasIntent_buttonHasClickListener() local
296 assertThat(button.hasOnClickListeners()).isTrue(); in onBind_actionExists_notCarCompatibleMessage_hasIntent_buttonHasClickListener()
311 Button button = mCarNotificationActionsView.getActionButtons().get(0); in onBind_actionExists_notCarCompatibleMessage_hasNoIntent_buttonHasNoClickListener() local
[all …]
/packages/services/Telephony/src/com/android/phone/
DEmergencyDialer.java491 public void onConfirmClick(EmergencyShortcutButton button) { in onConfirmClick() argument
492 if (button == null) return; in onConfirmClick()
493 String phoneNumber = button.getPhoneNumber(); in onConfirmClick()
506 public void onConfirmClick(EmergencyInfoGroup button) { in onConfirmClick() argument
507 if (button == null) return; in onConfirmClick()
509 Intent intent = (Intent) button.getTag(R.id.tag_intent); in onConfirmClick()
1020 EmergencyShortcutButton button = (EmergencyShortcutButton) getLayoutInflater() in setupEmergencyCallShortcutButton()
1022 button.setPhoneNumber(number); in setupEmergencyCallShortcutButton()
1023 button.setPhoneDescription(description); in setupEmergencyCallShortcutButton()
1024 button.setPhoneTypeIcon(iconRes); in setupEmergencyCallShortcutButton()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothDeviceActionButtonsPreferenceController.java58 private void updateConnectionButton(ActionButtonInfo button) { in updateConnectionButton() argument
59 button.setEnabled(!getCachedDevice().isBusy()); in updateConnectionButton()
61 button.setText(R.string.disconnect).setIcon(R.drawable.ic_close).setOnClickListener( in updateConnectionButton()
64 button.setText(R.string.connect).setIcon(R.drawable.ic_add).setOnClickListener( in updateConnectionButton()
69 private void updateForgetButton(ActionButtonInfo button) { in updateForgetButton() argument
70 button.setText(R.string.forget).setIcon(R.drawable.ic_delete).setOnClickListener(v -> { in updateForgetButton()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/
DButtonSwitcher.java159 private ViewPropertyAnimator animateButton(final View button, final int direction) { in animateButton() argument
161 final float innerX = button.getX() - button.getTranslationX(); in animateButton()
164 button.setClickable(true); in animateButton()
165 return button.animate().translationX(0); in animateButton()
167 button.setClickable(false); in animateButton()
168 return button.animate().translationX(outerX - innerX); in animateButton()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/editors/
DEditorDrawTabletUI.java132 final ImageButton button = new ImageButton(context); in EditorDrawTabletUI() local
133 mStyleButton[i] = button; in EditorDrawTabletUI()
134 button.setScaleType(ImageView.ScaleType.CENTER_CROP); in EditorDrawTabletUI()
135 button.setLayoutParams(params); in EditorDrawTabletUI()
137 button.setImageBitmap(bitmap); in EditorDrawTabletUI()
138 button.setBackgroundResource(android.R.color.transparent); in EditorDrawTabletUI()
139 buttonContainer.addView(button); in EditorDrawTabletUI()
141 button.setOnClickListener(new View.OnClickListener() { in EditorDrawTabletUI()
271 final Button button = mColorButton[i]; in resetBorders() local
273 GradientDrawable sd = ((GradientDrawable) button.getBackground()); in resetBorders()
/packages/apps/TV/src/com/android/tv/menu/
DPlayControlsRowView.java305 PlayControlsButton button, in initializeButton() argument
310 button.setImageResId(imageResId); in initializeButton()
311 button.setAction(clickAction); in initializeButton()
313 button.setFocusedIconColor(focusedIconColor); in initializeButton()
315 button.findViewById(R.id.button) in initializeButton()
620 PlayControlsButton button; in updateButtons() local
623 button = mFastForwardButton; in updateButtons()
626 button = mRewindButton; in updateButtons()
629 button.setLabel(null); in updateButtons()
631 button.setLabel( in updateButtons()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/systembar/
DButtonSelectionStateControllerTest.java120 private void assertbuttonSelected(CarSystemBarButton button) { in assertbuttonSelected() argument
121 assertThat(button.getIconAlpha()).isEqualTo(button.getSelectedAlpha()); in assertbuttonSelected()
124 private void assertButtonUnselected(CarSystemBarButton button) { in assertButtonUnselected() argument
125 assertThat(button.getIconAlpha()).isEqualTo(button.getUnselectedAlpha()); in assertButtonUnselected()
/packages/apps/Camera2/src/com/android/camera/widget/
DModeOptions.java224 View button = mModeOptionsButtons.getChildAt(i); in setupToggleButtonParams() local
225 if (button instanceof MultiToggleImageButton) { in setupToggleButtonParams()
226 MultiToggleImageButton toggleButton = (MultiToggleImageButton) button; in setupToggleButtonParams()
287 final View button; in setupAnimators() local
289 button = mActiveBar.getChildAt(i); in setupAnimators()
291 button = mActiveBar.getChildAt(childCount-1-i); in setupAnimators()
301 button.setTranslationX((Float) animation.getAnimatedValue()); in setupAnimators()
303 button.setTranslationY(-((Float) animation.getAnimatedValue())); in setupAnimators()

1234567