亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? statusbarnotifications.java

?? Android Source Code. An gallary program.
?? JAVA
字號:
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package com.example.android.apis.app;import com.example.android.apis.R;import android.app.Activity;import android.app.Notification;import android.app.NotificationManager;import android.app.PendingIntent;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.RemoteViews;/** * Demonstrates adding notifications to the status bar */public class StatusBarNotifications extends Activity {    private NotificationManager mNotificationManager;    // Use our layout id for a unique identifier    private static int MOOD_NOTIFICATIONS = R.layout.status_bar_notifications;    @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.status_bar_notifications);        Button button;        // Get the notification manager serivce.        mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);        button = (Button) findViewById(R.id.happy);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMood(R.drawable.stat_happy, R.string.status_bar_notifications_happy_message,                        false);            }        });        button = (Button) findViewById(R.id.neutral);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMood(R.drawable.stat_neutral, R.string.status_bar_notifications_ok_message,                        false);            }        });        button = (Button) findViewById(R.id.sad);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMood(R.drawable.stat_sad, R.string.status_bar_notifications_sad_message, false);            }        });        button = (Button) findViewById(R.id.happyMarquee);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMood(R.drawable.stat_happy, R.string.status_bar_notifications_happy_message,                        true);            }        });        button = (Button) findViewById(R.id.neutralMarquee);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMood(R.drawable.stat_neutral, R.string.status_bar_notifications_ok_message, true);            }        });        button = (Button) findViewById(R.id.sadMarquee);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMood(R.drawable.stat_sad, R.string.status_bar_notifications_sad_message, true);            }        });        button = (Button) findViewById(R.id.happyViews);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMoodView(R.drawable.stat_happy, R.string.status_bar_notifications_happy_message);            }        });        button = (Button) findViewById(R.id.neutralViews);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMoodView(R.drawable.stat_neutral, R.string.status_bar_notifications_ok_message);            }        });        button = (Button) findViewById(R.id.sadViews);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setMoodView(R.drawable.stat_sad, R.string.status_bar_notifications_sad_message);            }        });                button = (Button) findViewById(R.id.defaultSound);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setDefault(Notification.DEFAULT_SOUND);            }        });                button = (Button) findViewById(R.id.defaultVibrate);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setDefault(Notification.DEFAULT_VIBRATE);            }        });                button = (Button) findViewById(R.id.defaultAll);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                setDefault(Notification.DEFAULT_ALL);            }        });                button = (Button) findViewById(R.id.clear);        button.setOnClickListener(new Button.OnClickListener() {            public void onClick(View v) {                mNotificationManager.cancel(R.layout.status_bar_notifications);            }        });    }    private void setMood(int moodId, int textId, boolean showTicker) {        // In this sample, we'll use the same text for the ticker and the expanded notification        CharSequence text = getText(textId);        // choose the ticker text        String tickerText = showTicker ? getString(textId) : null;        // Set the icon, scrolling text and timestamp        Notification notification = new Notification(moodId, tickerText,                System.currentTimeMillis());        // The PendingIntent to launch our activity if the user selects this notification        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,                new Intent(this, StatusBarNotifications.class), 0);        // Set the info for the views that show in the notification panel.        notification.setLatestEventInfo(this, getText(R.string.status_bar_notifications_mood_title),                       text, contentIntent);        // Send the notification.        // We use a layout id because it is a unique number.  We use it later to cancel.        mNotificationManager.notify(R.layout.status_bar_notifications, notification);    }    private void setMoodView(int moodId, int textId) {        // Instead of the normal constructor, we're going to use the one with no args and fill        // in all of the data ourselves.  The normal one uses the default layout for notifications.        // You probably want that in most cases, but if you want to do something custom, you        // can set the contentView field to your own RemoteViews object.        Notification notif = new Notification();        // This is who should be launched if the user selects our notification.        notif.contentIntent = PendingIntent.getActivity(this, 0,                new Intent(this, StatusBarNotifications.class), 0);        // In this sample, we'll use the same text for the ticker and the expanded notification        CharSequence text = getText(textId);        notif.tickerText = text;        // the icon for the status bar        notif.icon = moodId;        // our custom view        RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.status_bar_balloon);        contentView.setTextViewText(R.id.text, text);        contentView.setImageViewResource(R.id.icon, moodId);        notif.contentView = contentView;        // we use a string id because is a unique number.  we use it later to cancel the        // notification        mNotificationManager.notify(R.layout.status_bar_notifications, notif);    }        private void setDefault(int defaults) {                // This method sets the defaults on the notification before posting it.                // This is who should be launched if the user selects our notification.        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,                new Intent(this, StatusBarNotifications.class), 0);        // In this sample, we'll use the same text for the ticker and the expanded notification        CharSequence text = getText(R.string.status_bar_notifications_happy_message);        final Notification notification = new Notification(                R.drawable.stat_happy,       // the icon for the status bar                text,                        // the text to display in the ticker                System.currentTimeMillis()); // the timestamp for the notification        notification.setLatestEventInfo(                this,                        // the context to use                getText(R.string.status_bar_notifications_mood_title),                                             // the title for the notification                text,                        // the details to display in the notification                contentIntent);              // the contentIntent (see above)        notification.defaults = defaults;                mNotificationManager.notify(                   R.layout.status_bar_notifications, // we use a string id because it is a unique                                                      // number.  we use it later to cancel the                   notification);                     // notification    }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕乱码亚洲精品一区| 国产精品久久久久久久久久免费看 | 久久久久久久久久久99999| 国产日韩视频一区二区三区| 亚洲成人精品一区| 91网站在线观看视频| 久久嫩草精品久久久久| 日韩中文欧美在线| 欧美亚洲愉拍一区二区| 国产精品视频免费| 国产一区二区三区综合| 91精品婷婷国产综合久久竹菊| 国产精品久久久久久久久免费樱桃 | av一本久道久久综合久久鬼色| 欧美日韩精品专区| 亚洲精品视频在线观看网站| 福利一区二区在线观看| 久久综合色8888| 免费视频一区二区| 91精品麻豆日日躁夜夜躁| 亚洲一区在线免费观看| 99精品一区二区三区| 国产精品剧情在线亚洲| 成人一区二区视频| 国产日韩av一区| 国产成人免费在线观看| 欧美激情一区二区在线| 国产a久久麻豆| 久久精品这里都是精品| 国产麻豆一精品一av一免费| 久久综合九色综合欧美98| 精品无码三级在线观看视频| 精品国产免费一区二区三区四区| 蜜桃av一区二区在线观看| 日韩三级视频中文字幕| 精品在线亚洲视频| 久久久久久久久久美女| 成人免费福利片| 亚洲丰满少妇videoshd| 色婷婷狠狠综合| 亚洲免费在线观看视频| 欧美午夜精品久久久久久孕妇 | 久久久综合视频| 国产传媒日韩欧美成人| 国产精品女人毛片| 日本韩国一区二区三区视频| 亚洲一线二线三线久久久| 欧美日韩激情一区| 精品一区二区三区欧美| 中文一区二区完整视频在线观看| 91片黄在线观看| 日韩在线a电影| 久久综合色综合88| 94-欧美-setu| 图片区小说区区亚洲影院| 91精品国产综合久久精品| 黄页视频在线91| 中文字幕在线视频一区| 欧美裸体bbwbbwbbw| 国内不卡的二区三区中文字幕| 国产精品乱人伦中文| 欧美日韩国产经典色站一区二区三区| 日本女优在线视频一区二区| 久久无码av三级| 欧美伊人久久大香线蕉综合69 | eeuss影院一区二区三区| 亚洲一区二区在线免费看| 日韩你懂的电影在线观看| 成人app在线| 秋霞成人午夜伦在线观看| 国产精品婷婷午夜在线观看| 精品污污网站免费看| 国产精品123| 手机精品视频在线观看| 中文字幕不卡一区| 日韩一区二区在线看| 99精品黄色片免费大全| 激情小说欧美图片| 亚洲电影欧美电影有声小说| 中文字幕成人在线观看| 日韩欧美资源站| 91丝袜国产在线播放| 秋霞成人午夜伦在线观看| 伊人性伊人情综合网| 性欧美疯狂xxxxbbbb| 日本一区二区三区久久久久久久久不 | 91在线码无精品| 韩日精品视频一区| 亚洲高清三级视频| 亚洲欧美韩国综合色| 久久精品一区二区三区不卡牛牛 | 蜜乳av一区二区| 亚洲一区二区精品久久av| 中文字幕一区在线观看视频| 欧美精品一区二区三区蜜臀| 欧美久久一二区| 欧美视频一区二区三区在线观看| 成人av动漫网站| 国产成人精品影视| 国产在线视频一区二区| 日韩va欧美va亚洲va久久| 亚洲午夜久久久久久久久电影院 | 蜜桃精品在线观看| 日本在线不卡视频| 三级精品在线观看| 五月婷婷久久综合| 亚洲与欧洲av电影| 亚洲伊人色欲综合网| 亚洲精品视频在线| 亚洲综合精品自拍| 亚洲一二三四区不卡| 亚洲一区二区三区国产| 亚洲在线免费播放| 亚洲国产视频网站| 亚洲电影第三页| 亚洲18女电影在线观看| 石原莉奈在线亚洲二区| 奇米精品一区二区三区四区| 蜜臀久久99精品久久久画质超高清| 香蕉久久夜色精品国产使用方法| 亚洲妇女屁股眼交7| 日韩成人精品视频| 九九**精品视频免费播放| 国产毛片一区二区| 99亚偷拍自图区亚洲| 色婷婷av一区| 欧美日韩在线播放三区| 国产网红主播福利一区二区| 中文字幕av资源一区| ...av二区三区久久精品| 亚洲精品国产a久久久久久 | 国产精品久久久久影院色老大| 国产精品成人免费在线| 亚洲综合成人在线视频| 日本亚洲最大的色成网站www| 久久精品国产99| 懂色av一区二区夜夜嗨| 一本久久精品一区二区| 7777精品久久久大香线蕉| 精品福利视频一区二区三区| 欧美国产禁国产网站cc| 亚洲综合免费观看高清完整版 | 色综合久久精品| 欧美日韩一区中文字幕| 久久一区二区视频| 亚洲欧美一区二区三区国产精品| 亚洲超丰满肉感bbw| 国产激情精品久久久第一区二区 | 成人爱爱电影网址| 欧美日韩五月天| 久久人人爽人人爽| 亚洲影视在线观看| 国产乱人伦偷精品视频免下载| 91麻豆免费看| 26uuu久久天堂性欧美| 亚洲欧美日韩综合aⅴ视频| 免费人成精品欧美精品| 99re热视频这里只精品| 精品国一区二区三区| 一区二区欧美视频| 国产精品亚洲第一区在线暖暖韩国 | 2021国产精品久久精品| 亚洲国产精品一区二区尤物区| 国模无码大尺度一区二区三区| 在线一区二区三区| 国产色产综合色产在线视频| 亚洲chinese男男1069| k8久久久一区二区三区 | 国产又粗又猛又爽又黄91精品| 色先锋资源久久综合| 国产拍欧美日韩视频二区| 日日夜夜精品视频免费| 色综合久久中文字幕综合网| 亚洲精品午夜久久久| 国精产品一区一区三区mba桃花 | 国产精品三级在线观看| 日本欧美韩国一区三区| 欧洲国产伦久久久久久久| 国产女人18毛片水真多成人如厕 | 色综合天天综合给合国产| 久久久亚洲精品石原莉奈| 日韩精品1区2区3区| 欧美偷拍一区二区| 亚洲欧洲精品一区二区精品久久久| 国产做a爰片久久毛片 | 欧美系列日韩一区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美乱熟臀69xxxxxx| 一区二区三区丝袜| 91国偷自产一区二区开放时间 | 国产女主播视频一区二区| 九九精品视频在线看| 精品欧美乱码久久久久久1区2区| 婷婷开心激情综合| 欧美日韩国产天堂| 日韩av一级电影| 91精品国产免费| 美国av一区二区| 久久这里只有精品视频网| 国产精品一区不卡|