Loading core/java/android/widget/ListPopupWindow.java +4 −2 Original line number Diff line number Diff line Loading @@ -974,10 +974,12 @@ public class ListPopupWindow { * currently touched list item. * <p> * Example usage: * <pre>ListPopupWindow myPopup = new ListPopupWindow(context); * <pre> * ListPopupWindow myPopup = new ListPopupWindow(context); * myPopup.setAnchor(myAnchor); * OnTouchListener dragListener = myPopup.createDragToOpenListener(myAnchor); * myAnchor.setOnTouchListener(dragListener);</pre> * myAnchor.setOnTouchListener(dragListener); * </pre> * * @param src the view on which the resulting listener will be set * @return a touch listener that controls drag-to-open behavior Loading core/java/android/widget/PopupMenu.java +4 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,10 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { * currently touched list item. * <p> * Example usage: * <pre>PopupMenu myPopup = new PopupMenu(context, myAnchor); * myAnchor.setOnTouchListener(myPopup.getDragToOpenListener());</pre> * <pre> * PopupMenu myPopup = new PopupMenu(context, myAnchor); * myAnchor.setOnTouchListener(myPopup.getDragToOpenListener()); * </pre> * * @return a touch listener that controls drag-to-open behavior */ Loading Loading
core/java/android/widget/ListPopupWindow.java +4 −2 Original line number Diff line number Diff line Loading @@ -974,10 +974,12 @@ public class ListPopupWindow { * currently touched list item. * <p> * Example usage: * <pre>ListPopupWindow myPopup = new ListPopupWindow(context); * <pre> * ListPopupWindow myPopup = new ListPopupWindow(context); * myPopup.setAnchor(myAnchor); * OnTouchListener dragListener = myPopup.createDragToOpenListener(myAnchor); * myAnchor.setOnTouchListener(dragListener);</pre> * myAnchor.setOnTouchListener(dragListener); * </pre> * * @param src the view on which the resulting listener will be set * @return a touch listener that controls drag-to-open behavior Loading
core/java/android/widget/PopupMenu.java +4 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,10 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { * currently touched list item. * <p> * Example usage: * <pre>PopupMenu myPopup = new PopupMenu(context, myAnchor); * myAnchor.setOnTouchListener(myPopup.getDragToOpenListener());</pre> * <pre> * PopupMenu myPopup = new PopupMenu(context, myAnchor); * myAnchor.setOnTouchListener(myPopup.getDragToOpenListener()); * </pre> * * @return a touch listener that controls drag-to-open behavior */ Loading