开发者

How to give Magnifying glass effect in EditText in Android?

I want to give a magnifying glass effect to the 开发者_如何学JAVAEditText.As it gives on Searching view in iPhone. Is it possible to do in Android ? How can I do this? Please Help Me


Using an EditText you have this option:

Una opción usando el EditText es definiendo el icono, y usando la propiedad android:hint para el texto:

defining the icon with android:drawableLeft and the hint with android:hint

How to give Magnifying glass effect in EditText in Android?

But the rigth way is using the SearchView widget:

<SearchView
    android:id="@+id/searchProduct"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

How to give Magnifying glass effect in EditText in Android?


Should be do able. You can use getSelectionStart() to get where the cursor is , get the text & display a new textBox above the editText box with a larger text size .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜