好文档 - 专业文书写作范文服务资料分享网站

《Android项目开发实训》项目总结报告

天下 分享 时间: 加入收藏 我要投稿 点赞

页眉内容

第五章 详细设计

5.1 添加闹铃功能模块

具体实现代码如下: /*

* Copyright (C) 2009 The Android Open Source Project *

* Licensed under the Apache License, Version 2.0 (the \ * 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 \

* 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.android.superdeskclock;

import java.text.DateFormatSymbols; import java.util.Calendar;

import android.content.Context; import android.database.Cursor; import android.media.RingtoneManager; import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; import android.provider.BaseColumns;

public final class Alarm implements Parcelable {

////////////////////////////// // Parcelable apis //////////////////////////////

public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public Alarm createFromParcel(Parcel p) { return new Alarm(p); } 毕业生个人求职简历

页眉内容

public Alarm[] newArray(int size) { return new Alarm[size]; } };

public int describeContents() { return 0; }

public void writeToParcel(Parcel p, int flags) { p.writeInt(id);

p.writeInt(enabled ? 1 : 0); p.writeInt(hour); p.writeInt(minutes);

p.writeInt(daysOfWeek.getCoded()); p.writeLong(time); p.writeInt(vibrate ? 1 : 0); p.writeString(label); p.writeParcelable(alert, flags); p.writeInt(silent ? 1 : 0); //新增 p.writeInt(times); 毕业生个人求职简历

页眉内容

p.writeInt(interval); }

////////////////////////////// // end Parcelable apis //////////////////////////////

////////////////////////////// // Column definitions //////////////////////////////

public static class Columns implements BaseColumns { /**

* The content:// style URL for this table */

public static final Uri CONTENT_URI =

Uri.parse(\ /**

* Hour in 24-hour localtime 0 - 23. *

Type: INTEGER

*/

public static final String HOUR = \ /**

* Minutes in localtime 0 - 59 *

Type: INTEGER

毕业生个人求职简历

页眉内容

*/

public static final String MINUTES = \ /**

* Days of week coded as integer *

Type: INTEGER

*/

public static final String DAYS_OF_WEEK = \ /**

* Alarm time in UTC milliseconds from the epoch. *

Type: INTEGER

*/

public static final String ALARM_TIME = \ /**

* True if alarm is active *

Type: BOOLEAN

*/

public static final String ENABLED = \ /**

* True if alarm should vibrate *

Type: BOOLEAN

*/

毕业生个人求职简历

《Android项目开发实训》项目总结报告

页眉内容第五章详细设计5.1添加闹铃功能模块具体实现代码如下:/**Copyright(C)2009TheAndroidOpenSourceProject**LicensedundertheApacheLicense,Version2.0
推荐度:
点击下载文档文档为doc格式
7cavm0v26x6rgfk15sw18xzko02xoc00fz2
领取福利

微信扫码领取福利

微信扫码分享