Android仿短信条目右上角的红色小圆球提示气泡
发布时间:2020-12-14 23:18:55 所属栏目:Java 来源:网络整理
导读:今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 可以重写View的onDraw完成该功能,也可以写布局文件完成该功能。现在使用布局文件完成。暂时先简单写一个TextView右上角的提示小红球,也可以根据需要
以下代码由PHP站长网 52php.cn收集自互联网 现在PHP站长网小编把它分享给大家,仅供参考 可以重写View的onDraw完成该功能,也可以写布局文件完成该功能。现在使用布局文件完成。暂时先简单写一个TextView右上角的提示小红球,也可以根据需要写一个ImageView右上角的小红球提示。 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:padding="2dip" android:layout_width="match_parent" android:layout_height="50dip" android:gravity="center" android:text="01234567890abcdefghijklmnopqrstuvwxyz!" /> <FrameLayout android:padding="1dip" android:layout_width="match_parent" android:layout_height="wrap_content" > <TextView android:layout_width="20dip" android:layout_height="20dip" android:layout_gravity="right" android:background="@drawable/tips_textview_bg" android:gravity="center" android:text="9" android:textSize="15dip" android:textStyle="bold" android:textColor="@android:color/white" /> </FrameLayout> </FrameLayout> <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android= "http://schemas.android.com/apk/res/android" android:shape= "oval" android:useLevel= "false" > <solid android:color= "#FF0000" /> </shape> 以上内容由PHP站长网【52php.cn】收集整理供大家参考研究 如果以上内容对您有帮助,欢迎收藏、点赞、推荐、分享。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |