Questions tagged [pressed]

This tag is extremely ambiguous, broad, and is not very useful. Please do not use it.

This tag is extremely ambiguous, broad, and is not very useful. Please do not use it.

130 questions
36
votes
3 answers

How can I keep a button as pressed after clicking on it?

Possible Duplicate: Android. How do I keep a button displayed as PRESSED until the action created by that button is finished? I have a button, and I want that when I press it, it stays as pressed (with the green color on Froyo). Any…
Nikitas
  • 649
  • 4
  • 9
  • 18
28
votes
3 answers

How to detect when button pressed and released on android

I would like to start a timer that begins when a button is first pressed and ends when it is released (basically I want to measure how long a button is held down). I'll be using the System.nanoTime() method at both of those times, then subtract the…
Andy Thompson
  • 299
  • 1
  • 3
  • 9
9
votes
3 answers

Prevent Buttons From Hiding Soft Keyboard On Android

I have a WebView and some buttons in my layout. There is a large tag in my WebView. This app is used to edit text files. The buttons are used to effect the textarea inside my WebView. When the user presses a button (Such as an Arrow Button to Move…
dhoodlum
  • 1,103
  • 2
  • 9
  • 18
9
votes
7 answers

Apply Different Style to Button When Pressed

Is there a way to apply a style to a button when the button is pressed? If I have a style in style.xml: a selector in…
user440308
  • 271
  • 2
  • 4
  • 7
8
votes
1 answer

QPushButton() should react as long as it is pressed

I am using QPushButton() in my programme. With these buttons I rotate my object. Works fine so far. The only Problem is that i have to click multiple times to rotate the object a little further. This is a bit annoying. Isnt there a possibility that…
buddy
  • 821
  • 2
  • 12
  • 30
7
votes
2 answers

TextView state_pressed/state_focused/state_selected style change

I'm trying to change a TextView style based on its state. My styles.xml contains: