I m developing an application where i need to insert image buttons inside edit text window. On clicking particular image button it should get inserted at cursor of edit text.
How can i do this? Thanks in advance .
I m developing an application where i need to insert image buttons inside edit text window. On clicking particular image button it should get inserted at cursor of edit text.
How can i do this? Thanks in advance .
You can do something like this:
EditText text = (EditText)findViewById(R.id.text);
text.setCompoundDrawables(null, null, getResources().getDrawable(R.drawable.xyz), null);
Or something like android:drawableRight
in the layout as explained here