Questions tagged [button]

Buttons are simple elements in graphical user interfaces that take mouse clicks or finger taps (on touch devices) as input.

In computing, a button (sometimes known as a command button or push button) is a user interface element that provides the user a simple way to trigger an event, like executing a query on a search engine or to interact with dialog boxes to confirm an action.

When asking questions specific to a particular framework or language, it's best to use the appropriate tag instead (if it's available). For example, the HTML <button> element should be tagged with , iOS buttons should be tagged with , and Java Swing buttons should be tagged with .

40417 questions
186
votes
8 answers

Android: ListView elements with multiple clickable buttons

I've a ListView where every element in the list contains a TextView and two different Buttons. Something like this: ListView -------------------- [Text] [Button 1][Button 2] -------------------- [Text] [Button 1][Button 2] -------------------- ...…
znq
  • 44,613
  • 41
  • 116
  • 144
183
votes
13 answers

Remove border from buttons

I tried to create buttons and insert my own images instead of the standard button images. However, the gray border from the standard buttons still remains, showing on the outside of my black button images. Does anyone know how to remove this gray…
JamesonW
  • 1,863
  • 2
  • 12
  • 7
179
votes
6 answers

Disable submit button when form invalid with AngularJS

I have my form like this:
As you may see, the button is disabled if the input is empty but it…
ali
  • 10,927
  • 20
  • 89
  • 138
174
votes
10 answers

Android AlertDialog Single Button

I'd like to have an AlertDialog builder that only has one button that says OK or Done or something, instead of the default yes and no. Can that be done with the standard AlertDialog, or would I have to use something else?
Elec0
  • 2,232
  • 3
  • 19
  • 25
171
votes
19 answers

Wrapping a react-router Link in an html button

Using suggested method: This is the result: A link in the button, Code in between comment lines I was wondering if there is a way to wrap a Link element from 'react-router' in an HTML button tag using react. I currently have Link components to…
Jose Rivera
  • 1,821
  • 2
  • 12
  • 8
170
votes
19 answers

How to bring view in front of everything?

I have activity and a lot of widgets on it, some of them have animations and because of the animations some of the widgets are moving (translating) one over another. For example the text view is moving over some buttons . . . Now the thing is I want…
Lukap
  • 31,523
  • 64
  • 157
  • 244
169
votes
6 answers

How to make an input type=button act like a hyperlink and redirect using a get request?

How do I make a act like a hyperlink and redirect using a GET request?
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
163
votes
10 answers

How to programmatically click a button in WPF?

Since there's no button.PerformClick() method in WPF, is there a way to click a WPF button programmatically?
tghoang
  • 2,025
  • 3
  • 15
  • 10
163
votes
18 answers

Button that refreshes the page on click

I need a button that will refresh the page on the user's click. I tried this: or But neither worked.
Stefan Đorđević
  • 1,781
  • 3
  • 15
  • 14
163
votes
11 answers

How do I make an HTML button not reload the page

I have a button (). When it is clicked the page reloads. Since I have some jQuery hide() functions that are called on page load, this causes these elements to be hidden again. How do I make the button do nothing, so I can still…
Ankur
  • 50,282
  • 110
  • 242
  • 312
163
votes
11 answers

Put buttons at bottom of screen with LinearLayout?

I have the following code, how do I make it so that the 3 buttons are at the bottom?
thedeepfield
  • 6,138
  • 25
  • 72
  • 107
160
votes
13 answers

How to make a circular ripple on a button when it's being clicked?

Background On the dialer app of Android, when you start searching for something, and you click the arrow button on the left of the EditText, you get a circular ripple effect on it : The problem I've tried to have it too, but I got a rectangular…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
155
votes
3 answers

Difference between and

There are many legends about them. I want to know the truth. What are the differences between the two following examples?
James
  • 42,081
  • 53
  • 136
  • 161
150
votes
3 answers

How to add a custom button state

For instance, the default button has the following dependencies between its states and background images:
Vit Khudenko
  • 28,288
  • 10
  • 63
  • 91
149
votes
29 answers

How to center icon and text in a android button with width set to "fill parent"

I want to have an Android Button with icon+text centered inside it. I'm using the drawableLeft attribute to set the image, this works well if the button has a width of "wrap_content" but I need to stretch to max width so I use width "fill_parent".…
jloriente
  • 1,521
  • 2
  • 10
  • 8