Method of developing custom textview ellipsis style for Android

This article describes the method of developing custom textview ellipsis style for Android. Share with you for your reference, as follows:

After setting the Android: maxlines = "2" Android: ellipsize = "end" field of textview in the layout XML, textview will automatically compress the number of lines and display the compressed part with. If you don't want to use... But want to use... Or... You need to customize the style of this ellipsis without customizing the control. The method is as follows.

The first is the layout file

Code control of 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 debugging skills and common problem solving methods, summary of Android basic component usage, summary of Android view skills, 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
分享
二维码
< <上一篇
下一篇>>