Example usage for android.app Activity openContextMenu

List of usage examples for android.app Activity openContextMenu

Introduction

In this page you can find the example usage for android.app Activity openContextMenu.

Prototype

public void openContextMenu(View view) 

Source Link

Document

Programmatically opens the context menu for a particular view .

Usage

From source file:net.nightwhistler.pageturner.fragment.ReadingFragment.java

@Override
public void onWordLongPressed(int startOffset, int endOffset, CharSequence word) {

    this.selectedWord = new SelectedWord(startOffset, endOffset, word);

    Activity activity = getActivity();

    if (activity != null) {
        activity.openContextMenu(bookView);
    }// w w  w  .  jav a  2 s  .co  m
}

From source file:net.zorgblub.typhon.fragment.ReadingFragment.java

@Override
public void onWordLongPressed(SelectedWord word) {
    if (!config.isRikaiEnabled()) {
        Activity activity = getActivity();

        if (activity != null) {
            activity.openContextMenu(bookView);
        }//  ww w .  j  a v a  2 s  . c  om
    }
}

From source file:com.aujur.ebookreader.activity.ReadingFragment.java

@Override
public void onWordLongPressed(int startOffset, int endOffset, CharSequence word) {

    this.selectedWord = new BookView.SelectedWord(startOffset, endOffset, word);

    Activity activity = getActivity();

    if (activity != null) {
        activity.openContextMenu(bookView);
    }//  w w  w  .ja  v  a 2s.co  m
}