Search code examples
javaandroidpicasso

Android: How to insert images into edit text


I am trying to create a blog type app, at the moment I am using an image button to get replaced with an image using the picasso libaray. Although, how would I go about adding/inserting image(s) from my gallery to an edit text. I am not sure how to go about doing this:

Something like this


Solution

  • Although the image isn't very clear in describing your question, you can however use the below code to add a drawable in EditText.

    <EditText
    ...     
    android:drawableLeft="@drawable/some_drawable"
    android:drawablePadding="10dp"/>