Code example for ExtractedText

0
	 * @param flags 	Additional options to control the client, either 0 or GET_EXTRACTED_TEXT_MONITOR. 
	 * @returns Returns an ExtractedText object describing the state of the text view and containing the extracted text itself.  
	 * */ 
	@Override public ExtractedText getExtractedText(ExtractedTextRequest request, int flags){
		//I assume the ExtractedText is a value object, a snapshot of the text. 
		ExtractedText et=new ExtractedText();
		//flags 
		//partialEndOffset 
		//partialStartOffset 
		et.selectionEnd=this.editText.getSelectionEnd();
		et.selectionStart=this.editText.getSelectionStart();
		et.startOffset=0;
		et.text=this.editText.getText();
		return et;
	} 
 
	/** Get n characters of text after the current cursor position. 
	 *  
	 * This method may fail either if the input connection has become invalid  
	 * (such as its process crashing) or the client is taking too long to respond  
Contextual code suggestions in your IDE  Get Codota for Java