android - How to create context menu on double click? -
i need create context menu on double click on long tapping. how can done?
i mean oncreatecontextmenu
called when user press long tap on widget. in case need same when user double clicks on widget.
added
i know it's not nice option, since it's not normal android ui. primary problem solve ui bugs devices of vendors - namely htc (look post). have seemingly resolved described issue, still have problems context menus. last resort thought avoid tapping through double click. thanx understanding...
from gather, have context-sensitive actions want tied edittext
, , htc's changes android interfering that.
first, reconsider using context menus in general, not particularly discoverable, of users never find them.
second, in case of edittext
, odds of users discovering double-tap bring context menu on par odds earth have extinction-level asteroid strike today.
:: looks in sky ::
rather double-tap, 1 option put small imagebutton
adjacent edittext
, downward-facing arrowhead (akin spinner
), , tie imagebutton
popupmenu
(ideal, api level 11), popupwindow
, or alertdialog
. or, in pinch, have imagebutton
display context menu when clicked via showcontextmenu()
. non-standard ux, @ least more discoverable, users used things popping when pressing down-arrow buttons, both android , other oses.
if absolutely convinced need double-tap, afaik not recognized touch event, need handle low-level touch events yourself, determine when double-tap occurs, , in way not interfere usage of edittext
(e.g., setting cursor position).
Comments
Post a Comment