0

I wanted to create a custom text view. A little bit advance just as the text editor found here in StackOverflow, I can insert text and even images. I wanted to name this as WordView and create this as a library so I can reuse this across multiple projects.

Unfortunately I am not so sure if the base class allows this. I need a way to insert/paste images directly in the EditText. I am planning to write a custom View, although it seems laborious, I am not quite certain if this is possible at all and if I am going into the right track.

Have anyone tried similar before?

Satyavrat
  • 469
  • 1
  • 7
  • 24
Neon Warge
  • 1,817
  • 6
  • 29
  • 53

2 Answers2

1

According to the Android Documentation for a TextView You can have a drawable object inside the TextView in the following ways

  1. DrawableBottom
  2. DrawableEnd
  3. DrawableLeft
  4. DrawableRight
  5. DrawableStart
  6. DrawableTop

There are other methods you can use, check out:
1. Programmatically set left drawable in a TextView
2. How to programmatically set drawableLeft on Android button?
3. http://androidsbs.blogspot.co.za/2013/12/androiddrawableleft-set-drawable-to.html

Community
  • 1
  • 1
Quintin Balsdon
  • 5,484
  • 10
  • 54
  • 95
1

You could possibly implement this using HTML. I'm not sure about the paste functionality but generally it might work.

Community
  • 1
  • 1
wkarl
  • 781
  • 1
  • 8
  • 19
  • Wow this is a very useful link. I've been looking for this kind of concept for ages. I have to make assessment first on this one. Thanks! – Neon Warge Oct 03 '15 at 11:37