Questions tagged [long-click]

In touch based user interfaces a long-click (aka long-press and tap-and-hold) refers to pressing a control for a prolonged time in order to achieve additional functionality.

In touch based user interfaces a long-click (aka long-press and tap-and-hold) refers to pressing a control for a prolonged time in order to achieve additional functionality.

97 questions
1
vote
2 answers

Android LongClick in a ListView of Clickable Elements

If I have a fragment containing a ListView where each row is a series of clickable elements (say, 3 buttons) filling all available space on the row, can I possibly have a long click callback for the entire row? I want the user to be able to click on…
Jeff L.
  • 226
  • 1
  • 3
  • 13
1
vote
3 answers

Google now won't let my app detect headset button long click

I want my app to do some specific actions when user long clicks (press and hold) headset button. I use a BroadcastReceiver for MEDIA_BUTTON and it works fine in phones who doesn't run Google now app for sound actions for long press. But in the…
Mehrdad
  • 708
  • 1
  • 17
  • 38
1
vote
0 answers

Select All/Cut/Copy bar not showing for EditText

When I long click the EditText I want to be able to do the normal things you would expect (Select all/Cut/Copy/Paste) but currently it only lets me paste. Here is the XML from the layout file.
Raging Software
  • 741
  • 1
  • 8
  • 9
1
vote
3 answers

Android onCreateContextMenu Fatal Exception by longclick on ListView item

I try to create Context Menu for my List View, but when i do "long-click" on List item, application shut down with this trace: FATAL EXCEPTION: main java.lang.NullPointerException at…
Tiraniel
  • 11
  • 3
1
vote
1 answer

Disable Contextual Action Bar and long click copy/paste

i've searched a lot for this, but can't find any advice... I'm providing my own implementation of the classic Action Bar so I declare in all the activities requestWindowFeature(Window.FEATURE_NO_TITLE) but i want to get rid of the Contextual Action…
vinzdef
  • 1,717
  • 2
  • 12
  • 22
1
vote
1 answer

list view context menu with list child item focusable android

I have implemented an custom list view with base adapter that contains focusable item like button. so i have disabled the focusable and clickable in xml. My problem is , added context menu for list item in list view using register for context menu.…
user1526671
  • 817
  • 4
  • 16
  • 33
1
vote
5 answers

setonlongclicklistener for several buttons at once

I want that button1,2,3 respond to a longclick, the user will be prompt to enter the text's button. Inside of onCreate I wrote: Button botonEditable; Context context; @Override public void onCreate(Bundle savedInstanceState) { …
JoeCoolman
  • 512
  • 3
  • 8
  • 27
1
vote
1 answer

Android - Manage click and longclick in listview

I am currently coding a new android Application, and I need to use both OnItemClickListener and OnItemLongClickListener on a listview. Each listener launch a different actionmode on the actionbar. The problem is that the actionmode associated with…
sam
  • 3,441
  • 2
  • 33
  • 42
0
votes
2 answers

Dynamically adding items to listview

I am making an android application that needs to use a ListView. Once a user presses a menubutton, it pops up a popupwindow containing a TextView, EditText and two Buttons, "Ok" and "Cancel". Once the user presses "Ok", the text inside the EditText…
user1183066
  • 115
  • 2
  • 6
  • 20
0
votes
1 answer

How to create Shortcut-Context-Menu-Handler for Android

When clicking on a file in the filesystem in Android (long click) a popup menu appears, just like the Windows-right-click-menu. Is there any way to add a menu item, referencing my app? For Windows it would look like…
0
votes
1 answer

Add longclick to a card in lazycolumn in kotlin

I have a lazycolumn with a card in Jetpack Compose - I added a clickable modifier to it and it works Card(colors = CardDefaults.cardColors( containerColor = Color(0xFF7DCEA0), Color.Black ), elevation =…
0
votes
1 answer

Long Press Click Event Handler Vuejs3

I need to handle an long press click on my vuejs3 app, but I have not found any viable way that is not from 3 years ago with critical severity vulnerability I need something like:
0
votes
5 answers

Android: using AlertDialog when an item from a listview is long pressed

I have a list of items, created by a listview. I would like to long press one of the items on the list and an alert dialog to open up and depending on yes or no key on that dialog box I wan to set a global variable. The code that I am using is…
TJ1
  • 7,578
  • 19
  • 76
  • 119
0
votes
0 answers

change the toolbar menu in android when the recycle view items are longClicked

I have implemented a recycle view and add images to the view by the camera. It is working fine. Now what i am going to do is, when the user long clicks on a recycle view item change the toolbar menu. I am getting the following error. Process:…
udi
  • 3,672
  • 2
  • 12
  • 33
0
votes
1 answer

WKWebView not responding to long click

I have a reader on which I was using UIWebView to display HTML content, similar to the kobo and iBooks. I am transitioning now to WKWebView as it seems that UIWebView is deprecated. I am facing the problem that WKWebView doesn't recognize at all…
coder
  • 5,200
  • 3
  • 20
  • 45