Home » Android » Android: How to disable selection magnifier in ICS?

Android: How to disable selection magnifier in ICS?

Posted by: admin June 15, 2020 Leave a comment

Questions:

When selecting text in an EditText view in ICS, there’s a magnifier that appears over the selection. Anyone know how I can disable that?

enter image description here

How to&Answers:

As of my understanding we can handle Magnification Gestures by system settings, We do not have any method to override this functionality/behaviour.

You can refer below links for more about magnification gestures feature:

http://pauljadam.com/androida11y/#magnification

http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/en//help/hc/images/android/android_ug_42/Android-Quick-Start-Guide.pdf

Kindly let me know if i am wrong. Thanks

Answer:

After few days I finally found the solution.

I had a problem with a Dialog Window and inside I have an EditText.
When this magnifier was showing I don’t know why but after I closed the Dialog and try to open it again … it didn’t show on the front as usual…it was shown behind of Activity’s Window …strange thing … I guess is a bug…

The only solution I found for my problem was to set this property to my dialog window:

LayoutParams lp = dialog.getWindow().getAttributes();
lp.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
dialog.getWindow().setAttributes(lp);

and this magnifier tool is not showing anymore on this EditText.

I hope it can help someone.