I have selected the Text within a Webview. Once I typed the Word on 
Edittext Box then If i Clicked Search Button it will search the specific 
word within a Webview. After Searching the word, It will Highlight the 
specific selected text within a webview by using some color. 

It works fine in Android Emulator, versions are 2.2 and 4.0.3 but not 
working in Android Tablet version, 4.0.4.

My code :-

    Method m = WebView.class.getMethod("setFindIsUp", Boolean.TYPE);  
    m.invoke(wv, true);  

It is working in 2.2 Android Emulator but not in Android Tablet, version is 
4.0.4.

So, I tried this way, See below Code :-

Because, In android 4.0.3, seems the "setFindIsUp" is a private method. So 
above code won't work. As getMethod() method won't return the private 
methods. Following is a work-around to call the private method which works 
for 4.0.3.

 
     for(Method m : WebView.class.getDeclaredMethods())
         {
 if(m.getName().equals("setFindIsUp"))
         {
 m.setAccessible(true);
 m.invoke(wv, true);
 break;
         }
 }


This method is also not Working in Android Tablet Version, 4.0.4.

Why it is not highlighting the Selected Text in Android 4.0.4 Version in a 
Tablet?

Whats the reason for this ? Kindly can anyone tell me ?

kindly anyone suggest me how to make this working on Tablet ?

Any help/ suggestions would be highy appreciated, thanks !

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to