title: On WebView long click highlight the selected text in Android
body: <p>I have loaded a local HTML file from assets folder into <code>WebView.Also</code> On <code>WebView</code> long click its open a custom dialog box. This is my code:</p>
  
  <pre><code> pageView.setOnLongClickListener(new View.OnLongClickListener() {
          @Override
          public boolean onLongClick(View view) {
              String names[] ={"Copy","Bookmark","Note"};
              final AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
              LayoutInflater inflater = getActivity().getLayoutInflater();
              View convertView = (View) inflater.inflate(R.layout.custom_dialog, null);
              alertDialog.setView(convertView);
              ListView lv = (ListView) convertView.findViewById(R.id.listView1);
              ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(getActivity(),android.R.layout.simple_list_item_1,names);
              lv.setAdapter(adapter);
              final AlertDialog ad=alertDialog.show();
              return false;
          }
      });
  </code></pre>
  
  <p>Now I want to add bookmark functionality on selected text. How is it possible?</p>