具体操作:自定义消息通知内容布局;点击界面中心的“点击发送消息”TextView控件,模拟发送通知消息,通知栏接收消息,点击几次则发送几次,点击通知栏消息,跳转到详情界面。
1.activity_main.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" tools:context=".MainActivity"> <TextView android:id="@+id/tv_show" android:text="点击发送消息" android:textSize="24sp" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout>
本文标题:Notification消息通知自定义消息通知内容布局-创新互联
浏览地址:https://www.cdcxhl.com/article48/ceicep.html
成都网站建设公司_创新互联,为您提供搜索引擎优化、全网营销推广、手机网站建设、网站营销、面包屑导航、网页设计公司
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联