Implementation method of textview display inserted picture in Android

This article describes the implementation method of textview display and insertion picture in Android. Share with you for your reference, as follows:

By default, the Android system provides textview with three ways to insert pictures:

1、ImageSpan 2、Html. ImageGetter 3、TextView. setCompoundDrawables(left,top,right,bottom)

1. Textview displays pictures using imagespan

PS: for other span related to spannablestring, see: [Android tutorial] textview using spannablestring to set compound text

2. Use HTML Imagegetter displays the pictures in the web page

View Article: [Android tutorial] textview displays HTML class parsed web pages, pictures and custom tags

3. Show pictures around textview

More readers interested in Android related content can view the special topics of this site: introduction and advanced tutorial of Android development, summary of Android multimedia operation skills (audio, video, recording, etc.), summary of Android basic components usage, summary of Android view technology, summary of Android layout skills and summary of Android control usage

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>