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
But the rigth way is using the SearchView widget:
<SearchView
android:id="@+id/searchProduct"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
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 .
精彩评论