-
Android 在状态栏添加Notification信息图标及提示
这个例子演示Android 在状态栏添加Notification信息图标及提示,相信大家对这个功能已经不陌生了,手机中安装的APP,一般都会在后台运行,时不时会在手机顶部的状态栏中显示应用的图标,滑出状态栏会看到详细的信息,本例子就是模拟实现了此功能:
Intent i = new Intent(Sample_6_10.this, NotifiedActivity.class);
PendingIntent pi = PendingIntent.getActivity(Sample_6_10.this, 0, i, 0);
Notification myNotification = new Notification();//创建一个Notification对象
myNotification.icon=R.drawable.header;//Notification的图标
myNotification.tickerText=getResources().getString(R.string.notification);
myNotification.defaults=Notification.DEFAULT_SOUND;
myNotification.setLatestEventInfo(Sample_6_10.this, "示例", "点击查看", pi);
NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(0, myNotification);//发送Notification
- 2022-06-26 12:21:22下载
- 积分:1
-
将音乐列表做成3D球状
将音乐列表做成3D球状,将音乐列表做成3D球状,将音乐列表做成3D球状,将音乐列表做成3D球状,将音乐列表做成3D球状
- 2022-09-13 11:40:03下载
- 积分:1
-
Android 屏幕旋转(改变屏幕方向)
Android 屏幕旋转实例,改变屏幕方向,这个和平时的锁定屏幕方向有关联,其基本的实现思路如下:
public void onConfigurationChanged(Configuration newConfig) {
Toast.makeText(this, "系统的屏幕方向发生改变", Toast.LENGTH_LONG).show();
updateEditText();//更新EditText显示的内容
super.onConfigurationChanged(newConfig);
}
public void updateEditText(){
int o = getRequestedOrientation();//获取屏幕朝向
switch(o){ //判断屏幕当前朝向
case ActivityInfo.SCREEN_ORIENTATION_PORTRAIT:
et.setText("当前屏幕朝向为:PORTRAIT");
break;
case ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE:
et.setText("当前屏幕朝向为:LANDSCAPE");
break;
}
}
- 2023-09-06 06:05:03下载
- 积分:1
-
4LU电机控制
【实例简介】控制电机
- 2021-09-12 00:31:01下载
- 积分:1
-
Bluetooth
安卓蓝牙通信功能测试 自己做的能实现蓝牙聊天室 比较简单的适合新手(Andrews Bluetooth communication function is relatively simple to test myself to achieve Bluetooth chat rooms for novice)
- 2012-09-14 10:12:18下载
- 积分:1
-
Android.chm
这个是在网上看到的android帮助文档 看了一些觉得还是挺有用的 所以上传共享下 (android can help you to easy understand )
- 2011-05-14 21:02:56下载
- 积分:1
-
Android 在线阅读器及翻书特效源码
用android制作的翻书效果,这其实是Android应用案例开发大全一书的一个例子,这个翻书效果来源于这个在线阅读程序中,这个阅读程序可以下载图书、在线阅读,当阅读内容时,用手触及右下角向上滑,即可掀页,或许这个效果对大家是有很好的帮助作用的,希望大家喜欢哦。
- 2023-06-08 19:45:04下载
- 积分:1
-
meitu
Android团购信息源代码 仿照美团 界面设计 ( Android buy information source)
- 2013-06-21 14:14:37下载
- 积分:1
-
高仿微信服务器端和android客户端源码
高仿微信服务器端和android客户端源码
- 2015-06-06下载
- 积分:1
-
android校园一卡通系统
android校园一卡通系统,经典案例
android校园一卡通系统,经典案例
android校园一卡通系统,经典案例
android校园一卡通系统,经典案例
android校园一卡通系统,经典案例
- 2022-11-07 16:55:08下载
- 积分:1