具體操作:自定義消息通知內容布局;點擊界面中心的“點擊發送消息”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消息通知自定義消息通知內容布局-創新互聯
瀏覽地址:http://www.yijiale78.com/article48/ceicep.html
成都網站建設公司_創新互聯,為您提供搜索引擎優化、全網營銷推廣、手機網站建設、網站營銷、面包屑導航、網頁設計公司
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯