Java Code Examples for android.view.View.cancelLongPress()

The following are Jave code examples for showing how to use cancelLongPress() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: LaunchEnr   File: CellLayout.java   Source Code and License Vote up 5 votes
@Override
public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View child = getChildAt(i);
        child.cancelLongPress();
    }
}
 
Example 2
Project: LaunchEnr   File: ShortcutAndWidgetContainer.java   Source Code and License Vote up 5 votes
@Override
public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View child = getChildAt(i);
        child.cancelLongPress();
    }
}
 
Example 3
Project: LaunchEnr   File: PagedView.java   Source Code and License Vote up 5 votes
/**
 * {@inheritDoc}
 */
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
    if (disallowIntercept) {
        // We need to make sure to cancel our long press if
        // a scrollable widget takes over touch events
        final View currentPage = getPageAt(mCurrentPage);
        currentPage.cancelLongPress();
    }
    super.requestDisallowInterceptTouchEvent(disallowIntercept);
}
 
Example 4
Project: LaunchEnr   File: PagedView.java   Source Code and License Vote up 5 votes
protected void cancelCurrentPageLongPress() {
    // Try canceling the long press. It could also have been scheduled
    // by a distant descendant, so use the mAllowLongPress flag to block
    // everything
    final View currentPage = getPageAt(mCurrentPage);
    if (currentPage != null) {
        currentPage.cancelLongPress();
    }
}
 
Example 5
Project: FlickLauncher   File: CellLayout.java   Source Code and License Vote up 5 votes
@Override
public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View child = getChildAt(i);
        child.cancelLongPress();
    }
}
 
Example 6
Project: FlickLauncher   File: ShortcutAndWidgetContainer.java   Source Code and License Vote up 5 votes
@Override
public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View child = getChildAt(i);
        child.cancelLongPress();
    }
}
 
Example 7
Project: FlickLauncher   File: PagedView.java   Source Code and License Vote up 5 votes
/**
 * {@inheritDoc}
 */
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
    if (disallowIntercept) {
        // We need to make sure to cancel our long press if
        // a scrollable widget takes over touch events
        final View currentPage = getPageAt(mCurrentPage);
        currentPage.cancelLongPress();
    }
    super.requestDisallowInterceptTouchEvent(disallowIntercept);
}
 
Example 8
Project: FlickLauncher   File: PagedView.java   Source Code and License Vote up 5 votes
protected void cancelCurrentPageLongPress() {
    // Try canceling the long press. It could also have been scheduled
    // by a distant descendant, so use the mAllowLongPress flag to block
    // everything
    final View currentPage = getPageAt(mCurrentPage);
    if (currentPage != null) {
        currentPage.cancelLongPress();
    }
}
 
Example 9
Project: SimpleUILauncher   File: CellLayout.java   Source Code and License Vote up 5 votes
@Override
public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View child = getChildAt(i);
        child.cancelLongPress();
    }
}
 
Example 10
Project: SimpleUILauncher   File: ShortcutAndWidgetContainer.java   Source Code and License Vote up 5 votes
@Override
public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
        final View child = getChildAt(i);
        child.cancelLongPress();
    }
}
 
Example 11
Project: SimpleUILauncher   File: PagedView.java   Source Code and License Vote up 5 votes
/**
 * {@inheritDoc}
 */
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
    if (disallowIntercept) {
        // We need to make sure to cancel our long press if
        // a scrollable widget takes over touch events
        final View currentPage = getPageAt(mCurrentPage);
        currentPage.cancelLongPress();
    }
    super.requestDisallowInterceptTouchEvent(disallowIntercept);
}
 
Example 12
Project: SimpleUILauncher   File: PagedView.java   Source Code and License Vote up 5 votes
protected void cancelCurrentPageLongPress() {
    // Try canceling the long press. It could also have been scheduled
    // by a distant descendant, so use the mAllowLongPress flag to block
    // everything
    final View currentPage = getPageAt(mCurrentPage);
    if (currentPage != null) {
        currentPage.cancelLongPress();
    }
}
 
Example 13
Project: CSipSimple   File: SearchView.java   Source Code and License Vote up 4 votes
public boolean onKey(View v, int keyCode, KeyEvent event) {
    // guard against possible race conditions
    if (mSearchable == null) {
        return false;
    }

    if (DBG) {
        Log.d(LOG_TAG, "mTextListener.onKey(" + keyCode + "," + event + "), selection: "
                + mQueryTextView.getListSelection());
    }

    // If a suggestion is selected, handle enter, search key, and action keys
    // as presses on the selected suggestion
    if (mQueryTextView.isPopupShowing()
            && mQueryTextView.getListSelection() != ListView.INVALID_POSITION) {
        return onSuggestionsKey(v, keyCode, event);
    }

    // If there is text in the query box, handle enter, and action keys
    // The search key is handled by the dialog's onKeyDown().
    if (!mQueryTextView.isEmpty() && KeyEventCompat.hasNoModifiers(event)) {
        if (event.getAction() == KeyEvent.ACTION_UP) {
            if (keyCode == KeyEvent.KEYCODE_ENTER) {
                v.cancelLongPress();

                // Launch as a regular search.
                launchQuerySearch(KeyEvent.KEYCODE_UNKNOWN, null, mQueryTextView.getText()
                        .toString());
                return true;
            }
        }
        if (event.getAction() == KeyEvent.ACTION_DOWN) {
            // TODO SearchableInfo.ActionKeyInfo actionKey = mSearchable.findActionKey(keyCode);
            // TODO if ((actionKey != null) && (actionKey.getQueryActionMsg() != null)) {
            // TODO     launchQuerySearch(keyCode, actionKey.getQueryActionMsg(), mQueryTextView
            // TODO             .getText().toString());
            // TODO     return true;
            // TODO }
        }
    }
    return false;
}