资源简介
仿三星桌面widget备忘录,支持多个备忘录
代码片段和文件信息
package com.edl.note;
import java.io.File;
import java.io.FileWriter;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.Timer;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.database.Cursor;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.PowerManager;
import android.telephony.TelephonyManager;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.View;
import android.view.View.onclickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
public class AlarmAlert extends Activity {
private static String TAG = “AlarmAlert“;
private static File ALARM_FLAG_FILE1 = new File(“/productinfo/alarm_flag“);
public static final String STOP_ALARM = “com.edl.note.STOP_ALARM“;
public static final String ALARM_DONE = “com.android.deskclock.ALARM_DONE“;
private AlarmManager am;
int TIMEOUT = 55;// 闹铃响时长(s)
private int _id;
private String action;
private long mStartTime;
private Handler mHandler = new Handler();
private final Timer timer = new Timer();
private NotificationManager nm;
private int Notification_ID = 100000010;
private String dispalycontent;
private PowerManager pm;
private PowerManager.WakeLock wakeLock;
// 声明键盘管理器
KeyguardManager mKeyguardManager = null;
// 声明键盘锁
private KeyguardLock mKeyguardLock = null;
protected static final String SCREEN_OFF = “screen_off“;
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
// requestWindowFeature(android.view.Window.FEATURE_NO_title);
requestWindowFeature(Window.FEATURE_CUSTOM_title);
setContentView(R.layout.dialog_alarm_alert);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_title
R.layout.dialog_alarm_alert_title);
getWindow().setBackgroundDrawableResource(R.color.halftransparent);
// 设置title右边为闹铃时间
Context mContext = AlarmAlert.this;
TextView alarm_time = (TextView) findViewById(R.id.title_right);
Calendar clnd = Calendar.getInstance();
int theHour = clnd.get(Calendar.HOUR_OF_DAY);
int theMinute = clnd.get(Calendar.MINUTE);
alarm_time.setText(theHour + “:“ + format(theMinute));
TextView content = (TextView) findViewById(R.id.tv_note_content);
Button cancelBtn = (Button) findViewById(R.id.cancel_alarm);
cancelBtn.setonclickListener(new onclickListener() {
@Override
public void onclick(View v) {
closeMedi
相关资源
- ListView点击跳转Intent传值
- 带查看原图功能的图像浏览器
- 豆瓣网安卓源代码
- Win8漂亮备忘录源码20121102
- 手机红外遥控器 布局 数据库访问
- 瀑布流ListView源码
- 音乐视频播放器
- 基于安卓的中国象棋游戏app
- 小人吐笑脸案例源代码
- 老人看护系统
- 手机蓝牙遥控开关安卓APP参考工程
- 安卓eclipse计算器,可以直接导入运行
- 蓝牙实现视频文本传输
- Understand-3.1.670-Linux-64bit.tgz2 part22-2
- 基于物联网的农业大棚应用
- Genymotion-ARM-Translation_for_8.0
-
ijkpla
yer2019最新版本so库 - 安全的即时通信软件.zip
- LayoutsPro控件 避免输入焦点被虚拟键盘
- SearchTextDemo.zip
- 人脸识别以及考勤
- Broadcast广播实现强制下线功能
- gaobo.zip 供大家参考
- 使用百度地图开发,搜索附近美食
- 实现蓝牙传输文件源代码
- 安卓比较复杂的weex
- 购物车的实现
- ExamCase.zip
- download-manage
- PhotoDemo.zip
评论
共有 条评论