Searched refs:button (Results 1 - 23 of 23) sorted by relevance

/frameworks/base/tests/ImfTest/tests/src/com/android/imftest/samples/
H A DButtonActivityTest.java35 final Button button = (Button) mTargetActivity.findViewById(ButtonActivity.BUTTON_ID);
37 // Push button
41 button.requestFocus();
55 destructiveCheckImeInitialState(mTargetActivity.getRootView(), button);
/frameworks/base/tests/ImfTest/src/com/android/imftest/samples/
H A DOneEditTextActivityNotSelected.java53 Button button = new Button(this);
54 button.setText("The focus is here.");
55 button.setFocusableInTouchMode(true);
56 button.requestFocus();
57 mDefaultFocusedView = button;
58 layout.addView(button);
/frameworks/base/core/tests/coretests/src/android/widget/focus/
H A DHorizontalFocusSearch.java94 Button button = new MyButton(this);
95 button.setText(label);
96 button.setLayoutParams(new LinearLayout.LayoutParams(
99 return button;
103 Button button = new MyButton(this);
104 button.setText(label);
105 button.setLayoutParams(new LinearLayout.LayoutParams(
125 ll.addView(button);
128 ll.addView(button);
132 return button;
[all...]
H A DVerticalFocusSearch.java102 Button button = new MyButton(this);
103 button.setText(label);
104 button.setLayoutParams(new LinearLayout.LayoutParams(
107 return button;
111 * Add a skinny button that takes up just less than half of the screen
113 * @param root The layout to add the button to.
114 * @param label The label of the button.
115 * @param atRight Which side to put the button on.
116 * @return The newly created button.
119 Button button
[all...]
H A DListOfButtonsTest.java51 mButtonAtTop = (Button) a.findViewById(R.id.button);
92 assertFalse("button at top should have focus back",
110 Button button = (Button) mListView.getSelectedView();
111 assertNotNull(indexInfo, button);
112 assertEquals(indexInfo, label, button.getText().toString());
113 assertTrue(indexInfo, button.hasFocus());
127 Button button = (Button) mListView.getSelectedView();
128 assertNotNull(indexInfo, button);
129 assertEquals(indexInfo, label, button.getText().toString());
130 assertTrue(indexInfo, button
[all...]
H A DListOfButtons.java66 Button button = new Button(parent.getContext());
67 button.setText(label);
68 return button;
H A DListWithFooterViewAndNewLabelsTest.java48 mButton = (Button) a.findViewById(R.id.button);
H A DListWithFooterViewAndNewLabels.java57 Button topButton = (Button) findViewById(R.id.button);
/frameworks/base/core/tests/coretests/src/android/widget/scroll/arrowscroll/
H A DShortButtonsTest.java60 String prefix = "after " + i + " downs expected button " + i;
61 final Button button = getActivity().getButtonAt(i);
62 assertTrue(prefix + " to have focus", button.isFocused());
63 assertTrue(prefix + " to be on screen", isButtonOnScreen(button));
89 String prefix = "after " + i + " ups expected button " + i;
90 final Button button = getActivity().getButtonAt(i);
91 assertTrue(prefix + " to have focus", button.isFocused());
92 assertTrue(prefix + " to be on screen", isButtonOnScreen(button));
/frameworks/base/tests/SslLoad/src/com/android/sslload/
H A DSslLoad.java48 private Button button; field in class:SslLoad
59 button = new Button(this);
60 button.setText("GO");
61 button.setOnClickListener(this);
63 setContentView(button);
78 button.setText(running ? "STOP" : "GO");
/frameworks/base/core/tests/coretests/src/android/widget/scroll/
H A DScrollViewButtonsAndLabels.java78 // want button to be first and last
85 Button button = new Button(this);
86 button.setText("Button " + (i + 1));
87 mLinearLayout.addView(button, p);
H A DScrollViewButtonsAndLabelsTest.java76 assertTrue("the button we've moved to off screen must not be the last "
77 + "button in the scroll view for this test to work (since we "
81 // now we are at the first button off screen
88 assertEquals("bottom of button should be verticalFadingEdgeLength "
101 assertEquals("button needs to be at the very bottom of the layout for "
105 // move down to last button
110 assertTrue("last button should have focus", lastButton.hasFocus());
115 assertEquals("button should be at very bottom of screen",
121 // get to bottom button
124 // go up to first off screen button
[all...]
/frameworks/base/core/tests/coretests/src/android/util/
H A DListItemFactory.java34 * Create a view with a button at the top and bottom, with filler in between.
119 final Button button = new Button(context);
120 button.setText("left");
121 ll.addView(button, lp);
127 final Button button = new Button(context);
128 button.setText("center");
129 ll.addView(button, lp);
135 final Button button = new Button(context);
136 button.setText("right");
137 ll.addView(button, l
155 public static View button(int position, Context context, String text, int desiredHeight) { method in class:ListItemFactory
[all...]
H A DScrollViewScenario.java120 * Add a button.
121 * @param text The text of the button.
127 final Button button = new Button(context);
128 button.setText(text);
129 return button;
138 * @param textPrefix The text to prepend to each button.
179 final Button button = new Button(context);
180 button.setText(prefix + i);
181 ll.addView(button, lp);
/frameworks/base/core/java/com/android/internal/app/
H A DHeavyWeightSwitcherActivity.java80 View button = findViewById((R.id.switch_old));
81 button.setOnClickListener(mSwitchOldListener);
82 button = findViewById((R.id.switch_new));
83 button.setOnClickListener(mSwitchNewListener);
84 button = findViewById((R.id.cancel));
85 button.setOnClickListener(mCancelListener);
H A DAlertController.java252 * Sets a click listener or a message to be sent when the button is clicked.
255 * @param whichButton Which button, can be one of
259 * @param text The text to display in positive button.
511 * If we only have 1 button it should be centered on the layout and
525 private void centerButton(Button button) { argument
526 LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) button.getLayoutParams();
529 button.setLayoutParams(params);
632 * it's a Contextual menu being displayed AND only a Cancel button
/frameworks/base/core/tests/coretests/src/android/widget/listview/
H A DListItemFocusableAboveUnfocusable.java42 return ListItemFactory.button(
H A DListInterleaveFocusables.java45 return ListItemFactory.button(
H A DListHeterogeneous.java46 return ListItemFactory.button(
/frameworks/base/core/tests/coretests/src/android/widget/layout/linear/
H A DLLEditTextThenButton.java41 mButton = (Button) findViewById(R.id.button);
/frameworks/base/tests/LowStorageTest/src/com/android/lowstoragetest/
H A DLowStorageTest.java57 Button button = (Button) findViewById(R.id.button_run);
58 button.setOnClickListener(mStartListener);
/frameworks/base/core/java/android/widget/
H A DRadioGroup.java30 * buttons. Checking one radio button that belongs to a radio group unchecks
31 * any previously checked radio button within the same group.</p>
34 * to uncheck a particular radio button, the radio group can be cleared to
37 * <p>The selection is identified by the unique id of the radio button as defined
77 // retrieve selected radio button as requested by the user in the
116 // checks the appropriate radio button as requested in the XML file
128 final RadioButton button = (RadioButton) child;
129 if (button.isChecked()) {
135 setCheckedId(button.getId());
143 * <p>Sets the selection to the radio button whos
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DLockPatternUtils.java670 * Sets the text on the emergency button to indicate what action will be taken.
671 * If there's currently a call in progress, the button will take them to the call
672 * @param button the button to update
674 public void updateEmergencyCallButtonState(Button button) { argument
681 button.setCompoundDrawablesWithIntrinsicBounds(phoneCallIcon, 0, 0, 0);
685 button.setCompoundDrawablesWithIntrinsicBounds(emergencyIcon, 0, 0, 0);
687 button.setText(textId);
691 * Resumes a call in progress. Typically launched from the EmergencyCall button

Completed in 1538 milliseconds