Compare commits

...

8 Commits

@ -0,0 +1,356 @@
-- 菜单
CREATE TABLE `sys_menu` (
`menu_id` bigint NOT NULL AUTO_INCREMENT,
`parent_id` bigint COMMENT '父菜单ID一级菜单为0',
`name` varchar(50) COMMENT '菜单名称',
`url` varchar(200) COMMENT '菜单URL',
`perms` varchar(500) COMMENT '授权(多个用逗号分隔user:list,user:create)',
`type` int COMMENT '类型 0目录 1菜单 2按钮',
`icon` varchar(50) COMMENT '菜单图标',
`order_num` int COMMENT '排序',
PRIMARY KEY (`menu_id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='菜单管理';
-- 系统用户
CREATE TABLE `sys_user` (
`user_id` bigint NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL COMMENT '用户名',
`password` varchar(100) COMMENT '密码',
`salt` varchar(20) COMMENT '盐',
`email` varchar(100) COMMENT '邮箱',
`mobile` varchar(100) COMMENT '手机号',
`status` tinyint COMMENT '状态 0禁用 1正常',
`create_user_id` bigint(20) COMMENT '创建者ID',
`create_time` datetime COMMENT '创建时间',
PRIMARY KEY (`user_id`),
UNIQUE INDEX (`username`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统用户';
-- 系统用户Token
CREATE TABLE `sys_user_token` (
`user_id` bigint(20) NOT NULL,
`token` varchar(100) NOT NULL COMMENT 'token',
`expire_time` datetime DEFAULT NULL COMMENT '过期时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`user_id`),
UNIQUE KEY `token` (`token`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统用户Token';
-- 系统验证码
CREATE TABLE `sys_captcha` (
`uuid` char(36) NOT NULL COMMENT 'uuid',
`code` varchar(6) NOT NULL COMMENT '验证码',
`expire_time` datetime DEFAULT NULL COMMENT '过期时间',
PRIMARY KEY (`uuid`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统验证码';
-- 角色
CREATE TABLE `sys_role` (
`role_id` bigint NOT NULL AUTO_INCREMENT,
`role_name` varchar(100) COMMENT '角色名称',
`remark` varchar(100) COMMENT '备注',
`create_user_id` bigint(20) COMMENT '创建者ID',
`create_time` datetime COMMENT '创建时间',
PRIMARY KEY (`role_id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='角色';
-- 用户与角色对应关系
CREATE TABLE `sys_user_role` (
`id` bigint NOT NULL AUTO_INCREMENT,
`user_id` bigint COMMENT '用户ID',
`role_id` bigint COMMENT '角色ID',
PRIMARY KEY (`id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='用户与角色对应关系';
-- 角色与菜单对应关系
CREATE TABLE `sys_role_menu` (
`id` bigint NOT NULL AUTO_INCREMENT,
`role_id` bigint COMMENT '角色ID',
`menu_id` bigint COMMENT '菜单ID',
PRIMARY KEY (`id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='角色与菜单对应关系';
-- 系统配置信息
CREATE TABLE `sys_config` (
`id` bigint NOT NULL AUTO_INCREMENT,
`param_key` varchar(50) COMMENT 'key',
`param_value` varchar(2000) COMMENT 'value',
`status` tinyint DEFAULT 1 COMMENT '状态 0隐藏 1显示',
`remark` varchar(500) COMMENT '备注',
PRIMARY KEY (`id`),
UNIQUE INDEX (`param_key`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统配置信息表';
-- 系统日志
CREATE TABLE `sys_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(50) COMMENT '用户名',
`operation` varchar(50) COMMENT '用户操作',
`method` varchar(200) COMMENT '请求方法',
`params` varchar(5000) COMMENT '请求参数',
`time` bigint NOT NULL COMMENT '执行时长(毫秒)',
`ip` varchar(64) COMMENT 'IP地址',
`create_date` datetime COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统日志';
-- 文件上传
CREATE TABLE `sys_oss` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`url` varchar(200) COMMENT 'URL地址',
`create_date` datetime COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='文件上传';
-- 定时任务
CREATE TABLE `schedule_job` (
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务id',
`bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
`params` varchar(2000) DEFAULT NULL COMMENT '参数',
`cron_expression` varchar(100) DEFAULT NULL COMMENT 'cron表达式',
`status` tinyint(4) DEFAULT NULL COMMENT '任务状态 0正常 1暂停',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`job_id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务';
-- 定时任务日志
CREATE TABLE `schedule_job_log` (
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志id',
`job_id` bigint(20) NOT NULL COMMENT '任务id',
`bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
`params` varchar(2000) DEFAULT NULL COMMENT '参数',
`status` tinyint(4) NOT NULL COMMENT '任务状态 0成功 1失败',
`error` varchar(2000) DEFAULT NULL COMMENT '失败信息',
`times` int(11) NOT NULL COMMENT '耗时(单位:毫秒)',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `job_id` (`job_id`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务日志';
-- 用户表
CREATE TABLE `tb_user` (
`user_id` bigint NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL COMMENT '用户名',
`mobile` varchar(20) NOT NULL COMMENT '手机号',
`password` varchar(64) COMMENT '密码',
`create_time` datetime COMMENT '创建时间',
PRIMARY KEY (`user_id`),
UNIQUE INDEX (`username`)
) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='用户';
-- 初始数据
INSERT INTO `sys_user` (`user_id`, `username`, `password`, `salt`, `email`, `mobile`, `status`, `create_user_id`, `create_time`) VALUES ('1', 'admin', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', 'root@renren.io', '13612345678', '1', '1', '2016-11-11 11:11:11');
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (1, 0, '系统管理', NULL, NULL, 0, 'system', 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (2, 1, '管理员列表', 'sys/user', NULL, 1, 'admin', 1);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (3, 1, '角色管理', 'sys/role', NULL, 1, 'role', 2);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (4, 1, '菜单管理', 'sys/menu', NULL, 1, 'menu', 3);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (5, 1, 'SQL监控', 'http://localhost:8080/renren-fast/druid/sql.html', NULL, 1, 'sql', 4);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (6, 1, '定时任务', 'job/schedule', NULL, 1, 'job', 5);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (7, 6, '查看', NULL, 'sys:schedule:list,sys:schedule:info', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (8, 6, '新增', NULL, 'sys:schedule:save', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (9, 6, '修改', NULL, 'sys:schedule:update', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (10, 6, '删除', NULL, 'sys:schedule:delete', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (11, 6, '暂停', NULL, 'sys:schedule:pause', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (12, 6, '恢复', NULL, 'sys:schedule:resume', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (13, 6, '立即执行', NULL, 'sys:schedule:run', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (14, 6, '日志列表', NULL, 'sys:schedule:log', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (15, 2, '查看', NULL, 'sys:user:list,sys:user:info', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (16, 2, '新增', NULL, 'sys:user:save,sys:role:select', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (17, 2, '修改', NULL, 'sys:user:update,sys:role:select', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (18, 2, '删除', NULL, 'sys:user:delete', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (19, 3, '查看', NULL, 'sys:role:list,sys:role:info', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (20, 3, '新增', NULL, 'sys:role:save,sys:menu:list', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (21, 3, '修改', NULL, 'sys:role:update,sys:menu:list', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (22, 3, '删除', NULL, 'sys:role:delete', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (23, 4, '查看', NULL, 'sys:menu:list,sys:menu:info', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (24, 4, '新增', NULL, 'sys:menu:save,sys:menu:select', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (25, 4, '修改', NULL, 'sys:menu:update,sys:menu:select', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (26, 4, '删除', NULL, 'sys:menu:delete', 2, NULL, 0);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (27, 1, '参数管理', 'sys/config', 'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete', 1, 'config', 6);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (29, 1, '系统日志', 'sys/log', 'sys:log:list', 1, 'log', 7);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (30, 1, '文件上传', 'oss/oss', 'sys:oss:all', 1, 'oss', 6);
INSERT INTO `sys_config` (`param_key`, `param_value`, `status`, `remark`) VALUES ('CLOUD_STORAGE_CONFIG_KEY', '{\"aliyunAccessKeyId\":\"\",\"aliyunAccessKeySecret\":\"\",\"aliyunBucketName\":\"\",\"aliyunDomain\":\"\",\"aliyunEndPoint\":\"\",\"aliyunPrefix\":\"\",\"qcloudBucketName\":\"\",\"qcloudDomain\":\"\",\"qcloudPrefix\":\"\",\"qcloudSecretId\":\"\",\"qcloudSecretKey\":\"\",\"qiniuAccessKey\":\"NrgMfABZxWLo5B-YYSjoE8-AZ1EISdi1Z3ubLOeZ\",\"qiniuBucketName\":\"ios-app\",\"qiniuDomain\":\"http://7xqbwh.dl1.z0.glb.clouddn.com\",\"qiniuPrefix\":\"upload\",\"qiniuSecretKey\":\"uIwJHevMRWU0VLxFvgy0tAcOdGqasdtVlJkdy6vV\",\"type\":1}', '0', '云存储配置信息');
INSERT INTO `schedule_job` (`bean_name`, `params`, `cron_expression`, `status`, `remark`, `create_time`) VALUES ('testTask', 'renren', '0 0/30 * * * ?', '0', '参数测试', now());
-- 账号13612345678 密码admin
INSERT INTO `tb_user` (`username`, `mobile`, `password`, `create_time`) VALUES ('mark', '13612345678', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', '2017-03-23 22:37:41');
-- quartz自带表结构
CREATE TABLE QRTZ_JOB_DETAILS(
SCHED_NAME VARCHAR(120) NOT NULL,
JOB_NAME VARCHAR(200) NOT NULL,
JOB_GROUP VARCHAR(200) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
JOB_CLASS_NAME VARCHAR(250) NOT NULL,
IS_DURABLE VARCHAR(1) NOT NULL,
IS_NONCONCURRENT VARCHAR(1) NOT NULL,
IS_UPDATE_DATA VARCHAR(1) NOT NULL,
REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
JOB_NAME VARCHAR(200) NOT NULL,
JOB_GROUP VARCHAR(200) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
NEXT_FIRE_TIME BIGINT(13) NULL,
PREV_FIRE_TIME BIGINT(13) NULL,
PRIORITY INTEGER NULL,
TRIGGER_STATE VARCHAR(16) NOT NULL,
TRIGGER_TYPE VARCHAR(8) NOT NULL,
START_TIME BIGINT(13) NOT NULL,
END_TIME BIGINT(13) NULL,
CALENDAR_NAME VARCHAR(200) NULL,
MISFIRE_INSTR SMALLINT(2) NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
REPEAT_COUNT BIGINT(7) NOT NULL,
REPEAT_INTERVAL BIGINT(12) NOT NULL,
TIMES_TRIGGERED BIGINT(10) NOT NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_CRON_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
CRON_EXPRESSION VARCHAR(120) NOT NULL,
TIME_ZONE_ID VARCHAR(80),
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_SIMPROP_TRIGGERS
(
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
STR_PROP_1 VARCHAR(512) NULL,
STR_PROP_2 VARCHAR(512) NULL,
STR_PROP_3 VARCHAR(512) NULL,
INT_PROP_1 INT NULL,
INT_PROP_2 INT NULL,
LONG_PROP_1 BIGINT NULL,
LONG_PROP_2 BIGINT NULL,
DEC_PROP_1 NUMERIC(13,4) NULL,
DEC_PROP_2 NUMERIC(13,4) NULL,
BOOL_PROP_1 VARCHAR(1) NULL,
BOOL_PROP_2 VARCHAR(1) NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_BLOB_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
BLOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_CALENDARS (
SCHED_NAME VARCHAR(120) NOT NULL,
CALENDAR_NAME VARCHAR(200) NOT NULL,
CALENDAR BLOB NOT NULL,
PRIMARY KEY (SCHED_NAME,CALENDAR_NAME))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
SCHED_NAME VARCHAR(120) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_FIRED_TRIGGERS (
SCHED_NAME VARCHAR(120) NOT NULL,
ENTRY_ID VARCHAR(95) NOT NULL,
TRIGGER_NAME VARCHAR(200) NOT NULL,
TRIGGER_GROUP VARCHAR(200) NOT NULL,
INSTANCE_NAME VARCHAR(200) NOT NULL,
FIRED_TIME BIGINT(13) NOT NULL,
SCHED_TIME BIGINT(13) NOT NULL,
PRIORITY INTEGER NOT NULL,
STATE VARCHAR(16) NOT NULL,
JOB_NAME VARCHAR(200) NULL,
JOB_GROUP VARCHAR(200) NULL,
IS_NONCONCURRENT VARCHAR(1) NULL,
REQUESTS_RECOVERY VARCHAR(1) NULL,
PRIMARY KEY (SCHED_NAME,ENTRY_ID))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_SCHEDULER_STATE (
SCHED_NAME VARCHAR(120) NOT NULL,
INSTANCE_NAME VARCHAR(200) NOT NULL,
LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
CHECKIN_INTERVAL BIGINT(13) NOT NULL,
PRIMARY KEY (SCHED_NAME,INSTANCE_NAME))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE QRTZ_LOCKS (
SCHED_NAME VARCHAR(120) NOT NULL,
LOCK_NAME VARCHAR(40) NOT NULL,
PRIMARY KEY (SCHED_NAME,LOCK_NAME))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME);
CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE);
CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME);
CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY);
CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP);
CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="net.micode.notes"
android:versionCode="1"
android:versionName="0.1">
<uses-sdk android:minSdkVersion="33" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:icon="@drawable/icon_app"
android:label="@string/app_name">
<activity
android:name=".ui.SplashActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false"
android:label="@string/title_activity_splash"
android:theme="@style/Theme.Notesmaster.Fullscreen" />
<activity
android:name=".ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
<intent-filter
android:scheme="http"
tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/text_note" />
<data android:mimeType="vnd.android.cursor.item/call_note" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.INSERT_OR_EDIT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/text_note" />
<data android:mimeType="vnd.android.cursor.item/call_note" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<provider
android:name=".data.NotesProvider"
android:authorities="micode_notes"
android:multiprocess="true" />
<receiver
android:name=".widget.NoteWidgetProvider_2x"
android:exported="true"
android:label="@string/app_widget2x2">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_2x_info" />
</receiver>
<receiver
android:name=".widget.NoteWidgetProvider_4x"
android:exported="true"
android:label="@string/app_widget4x4">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_4x_info" />
</receiver>
<receiver
android:name=".ui.AlarmInitReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name=".ui.AlarmReceiver"
android:exported="true"
android:process=":remote"></receiver>
<activity
android:name=".ui.AlarmAlertActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"></activity>
<activity
android:name=".ui.NotesPreferenceActivity"
android:label="@string/preferences_title"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Holo.Light"></activity>
<service
android:name=".gtask.remote.GTaskSyncService"
android:exported="false"></service>
<meta-data
android:name="android.app.default_searchable"
android:value=".ui.NoteEditActivity" />
</application>
</manifest>

@ -0,0 +1,87 @@
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* 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 net.micode.notes.ui;
import android.content.Context;
import android.database.Cursor;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns;
public class FoldersListAdapter extends CursorAdapter {
//CursorAdapter是Cursor和ListView的接口
//FoldersListAdapter继承了CursorAdapter的类
//主要作用是便签数据库和用户的交互
//这里就是用folder文件夹的形式展现给用户
public static final String [] PROJECTION = {
NoteColumns.ID,
NoteColumns.SNIPPET
};//调用数据库中便签的ID和片段
public static final int ID_COLUMN = 0;
public static final int NAME_COLUMN = 1;
public FoldersListAdapter(Context context, Cursor c) {
super(context, c);
// TODO Auto-generated constructor stub
}//数据库操作
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
//ViewGroup是容器
return new FolderListItem(context);
}//创建一个文件夹,对于各文件夹中子标签的初始化
@Override
public void bindView(View view, Context context, Cursor cursor) {
if (view instanceof FolderListItem) {
String folderName = (cursor.getLong(ID_COLUMN) == Notes.ID_ROOT_FOLDER) ? context
.getString(R.string.menu_move_parent_folder) : cursor.getString(NAME_COLUMN);
((FolderListItem) view).bind(folderName);
}//将各个布局文件绑定起来
}
public String getFolderName(Context context, int position) {
Cursor cursor = (Cursor) getItem(position);
return (cursor.getLong(ID_COLUMN) == Notes.ID_ROOT_FOLDER) ? context
.getString(R.string.menu_move_parent_folder) : cursor.getString(NAME_COLUMN);
}//根据数据库中标签的ID得到标签的各项内容
private class FolderListItem extends LinearLayout {
private TextView mName;
public FolderListItem(Context context) {
super(context);
//操作数据库
inflate(context, R.layout.folder_list_item, this);
//根据布局文件的名字等信息将其找出来
mName = (TextView) findViewById(R.id.tv_folder_name);
}
public void bind(String name) {
mName.setText(name);
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,217 @@
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* 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 net.micode.notes.ui;
import android.content.Context;
import android.graphics.Rect;
import android.text.Layout;
import android.text.Selection;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.URLSpan;
import android.util.AttributeSet;
import android.util.Log;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.MotionEvent;
import android.widget.EditText;
import net.micode.notes.R;
import java.util.HashMap;
import java.util.Map;
public class NoteEditText extends EditText {
private static final String TAG = "NoteEditText";
private int mIndex;
private int mSelectionStartBeforeDelete;
private static final String SCHEME_TEL = "tel:" ;
private static final String SCHEME_HTTP = "http:" ;
private static final String SCHEME_EMAIL = "mailto:" ;
private static final Map<String, Integer> sSchemaActionResMap = new HashMap<String, Integer>();
static {
sSchemaActionResMap.put(SCHEME_TEL, R.string.note_link_tel);
sSchemaActionResMap.put(SCHEME_HTTP, R.string.note_link_web);
sSchemaActionResMap.put(SCHEME_EMAIL, R.string.note_link_email);
}
/**
* Call by the {@link NoteEditActivity} to delete or add edit text
*/
public interface OnTextViewChangeListener {
/**
* Delete current edit text when {@link KeyEvent#KEYCODE_DEL} happens
* and the text is null
*/
void onEditTextDelete(int index, String text);
/**
* Add edit text after current edit text when {@link KeyEvent#KEYCODE_ENTER}
* happen
*/
void onEditTextEnter(int index, String text);
/**
* Hide or show item option when text change
*/
void onTextChange(int index, boolean hasText);
}
private OnTextViewChangeListener mOnTextViewChangeListener;
public NoteEditText(Context context) {
super(context, null);
mIndex = 0;
}
public void setIndex(int index) {
mIndex = index;
}
public void setOnTextViewChangeListener(OnTextViewChangeListener listener) {
mOnTextViewChangeListener = listener;
}
public NoteEditText(Context context, AttributeSet attrs) {
super(context, attrs, android.R.attr.editTextStyle);
}
public NoteEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
int x = (int) event.getX();
int y = (int) event.getY();
x -= getTotalPaddingLeft();
y -= getTotalPaddingTop();
x += getScrollX();
y += getScrollY();
Layout layout = getLayout();
int line = layout.getLineForVertical(y);
int off = layout.getOffsetForHorizontal(line, x);
Selection.setSelection(getText(), off);
break;
}
return super.onTouchEvent(event);
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_ENTER:
if (mOnTextViewChangeListener != null) {
return false;
}
break;
case KeyEvent.KEYCODE_DEL:
mSelectionStartBeforeDelete = getSelectionStart();
break;
default:
break;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
switch(keyCode) {
case KeyEvent.KEYCODE_DEL:
if (mOnTextViewChangeListener != null) {
if (0 == mSelectionStartBeforeDelete && mIndex != 0) {
mOnTextViewChangeListener.onEditTextDelete(mIndex, getText().toString());
return true;
}
} else {
Log.d(TAG, "OnTextViewChangeListener was not seted");
}
break;
case KeyEvent.KEYCODE_ENTER:
if (mOnTextViewChangeListener != null) {
int selectionStart = getSelectionStart();
String text = getText().subSequence(selectionStart, length()).toString();
setText(getText().subSequence(0, selectionStart));
mOnTextViewChangeListener.onEditTextEnter(mIndex + 1, text);
} else {
Log.d(TAG, "OnTextViewChangeListener was not seted");
}
break;
default:
break;
}
return super.onKeyUp(keyCode, event);
}
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
if (mOnTextViewChangeListener != null) {
if (!focused && TextUtils.isEmpty(getText())) {
mOnTextViewChangeListener.onTextChange(mIndex, false);
} else {
mOnTextViewChangeListener.onTextChange(mIndex, true);
}
}
super.onFocusChanged(focused, direction, previouslyFocusedRect);
}
@Override
protected void onCreateContextMenu(ContextMenu menu) {
if (getText() instanceof Spanned) {
int selStart = getSelectionStart();
int selEnd = getSelectionEnd();
int min = Math.min(selStart, selEnd);
int max = Math.max(selStart, selEnd);
final URLSpan[] urls = ((Spanned) getText()).getSpans(min, max, URLSpan.class);
if (urls.length == 1) {
int defaultResId = 0;
for(String schema: sSchemaActionResMap.keySet()) {
if(urls[0].getURL().indexOf(schema) >= 0) {
defaultResId = sSchemaActionResMap.get(schema);
break;
}
}
if (defaultResId == 0) {
defaultResId = R.string.note_link_other;
}
menu.add(0, 0, 0, defaultResId).setOnMenuItemClickListener(
new OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
// goto a new intent
urls[0].onClick(NoteEditText.this);
return true;
}
});
}
}
super.onCreateContextMenu(menu);
}
}

@ -0,0 +1,9 @@
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
project.properties
.settings/
.classpath
.project

@ -0,0 +1,2 @@
#Sun Sep 24 22:29:27 CST 2023
gradle.version=8.0

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WizardSettings">
<option name="children">
<map>
<entry key="imageWizard">
<value>
<PersistentState />
</value>
</entry>
</map>
</option>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\唯恋初音miku\.android\avd\Pixel_2_API_UpsideDownCakePrivacySandbox_2.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-10-20T03:02:09.126401900Z" />
</component>
</project>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="jbr-17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidLintNfcTechWhitespace" enabled="false" level="ERROR" enabled_by_default="false" />
</profile>
</component>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

@ -0,0 +1,9 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$/app/src/main/Android" vcs="Git" />
</component>
</project>

@ -0,0 +1,36 @@
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* 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 net.micode.notes.ui;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class AlarmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
intent.setClass(context, AlarmAlertActivity.class);
//启动AlarmAlertActivity
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
/*activity要存在于activity的栈中而非activity的途径启动activity时必然不存在一个activity的栈*/
//所以要新起一个栈装入启动的activity
context.startActivity(intent);
}
}
//这是实现alarm这个功能最接近用户层的包基于上面的两个包
////作用还需要深究但是对于setClass和addFlags的

@ -0,0 +1,508 @@
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* 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 net.micode.notes.ui;
import java.text.DateFormatSymbols;
import java.util.Calendar;
import net.micode.notes.R;
import android.content.Context;
import android.text.format.DateFormat;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.NumberPicker;
public class DateTimePicker extends FrameLayout {
//FrameLayout是布局模板之一
//所有的子元素全部在屏幕的右上方
private static final boolean DEFAULT_ENABLE_STATE = true;
private static final int HOURS_IN_HALF_DAY = 12;
private static final int HOURS_IN_ALL_DAY = 24;
private static final int DAYS_IN_ALL_WEEK = 7;
private static final int DATE_SPINNER_MIN_VAL = 0;
private static final int DATE_SPINNER_MAX_VAL = DAYS_IN_ALL_WEEK - 1;
private static final int HOUR_SPINNER_MIN_VAL_24_HOUR_VIEW = 0;
private static final int HOUR_SPINNER_MAX_VAL_24_HOUR_VIEW = 23;
private static final int HOUR_SPINNER_MIN_VAL_12_HOUR_VIEW = 1;
private static final int HOUR_SPINNER_MAX_VAL_12_HOUR_VIEW = 12;
private static final int MINUT_SPINNER_MIN_VAL = 0;
private static final int MINUT_SPINNER_MAX_VAL = 59;
private static final int AMPM_SPINNER_MIN_VAL = 0;
private static final int AMPM_SPINNER_MAX_VAL = 1;
//初始化控件
private final NumberPicker mDateSpinner;
private final NumberPicker mHourSpinner;
private final NumberPicker mMinuteSpinner;
private final NumberPicker mAmPmSpinner;
//NumberPicker是数字选择器
//这里定义的四个变量全部是在设置闹钟时需要选择的变量(如日期、时、分、上午或者下午)
private Calendar mDate;
//定义了Calendar类型的变量mDate用于操作时间
private String[] mDateDisplayValues = new String[DAYS_IN_ALL_WEEK];
private boolean mIsAm;
private boolean mIs24HourView;
private boolean mIsEnabled = DEFAULT_ENABLE_STATE;
private boolean mInitialising;
private OnDateTimeChangedListener mOnDateTimeChangedListener;
private NumberPicker.OnValueChangeListener mOnDateChangedListener = new NumberPicker.OnValueChangeListener() {
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
mDate.add(Calendar.DAY_OF_YEAR, newVal - oldVal);
updateDateControl();
onDateTimeChanged();
}
};//OnValueChangeListener这是时间改变监听器这里主要是对日期的监听
//将现在日期的值传递给mDateupdateDateControl是同步操作
private NumberPicker.OnValueChangeListener mOnHourChangedListener = new NumberPicker.OnValueChangeListener() {
//这里是对 小时Hour 的监听
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
boolean isDateChanged = false;
Calendar cal = Calendar.getInstance();
//声明一个Calendar的变量cal便于后续的操作
if (!mIs24HourView) {
if (!mIsAm && oldVal == HOURS_IN_HALF_DAY - 1 && newVal == HOURS_IN_HALF_DAY) {
cal.setTimeInMillis(mDate.getTimeInMillis());
cal.add(Calendar.DAY_OF_YEAR, 1);
isDateChanged = true;
//这里是对于12小时制时晚上11点和12点交替时对日期的更改
} else if (mIsAm && oldVal == HOURS_IN_HALF_DAY && newVal == HOURS_IN_HALF_DAY - 1) {
cal.setTimeInMillis(mDate.getTimeInMillis());
cal.add(Calendar.DAY_OF_YEAR, -1);
isDateChanged = true;
}
//这里是对于12小时制时凌晨11点和12点交替时对日期的更改
if (oldVal == HOURS_IN_HALF_DAY - 1 && newVal == HOURS_IN_HALF_DAY ||
oldVal == HOURS_IN_HALF_DAY && newVal == HOURS_IN_HALF_DAY - 1) {
mIsAm = !mIsAm;
updateAmPmControl();
}//这里是对于12小时制时中午11点和12点交替时对AM和PM的更改
} else {
if (oldVal == HOURS_IN_ALL_DAY - 1 && newVal == 0) {
cal.setTimeInMillis(mDate.getTimeInMillis());
cal.add(Calendar.DAY_OF_YEAR, 1);
isDateChanged = true;
//这里是对于24小时制时晚上11点和12点交替时对日期的更改
} else if (oldVal == 0 && newVal == HOURS_IN_ALL_DAY - 1) {
cal.setTimeInMillis(mDate.getTimeInMillis());
cal.add(Calendar.DAY_OF_YEAR, -1);
isDateChanged = true;
}
}//这里是对于12小时制时凌晨11点和12点交替时对日期的更改
int newHour = mHourSpinner.getValue() % HOURS_IN_HALF_DAY + (mIsAm ? 0 : HOURS_IN_HALF_DAY);
//通过数字选择器对newHour的赋值
mDate.set(Calendar.HOUR_OF_DAY, newHour);
//通过set函数将新的Hour值传给mDate
onDateTimeChanged();
if (isDateChanged) {
setCurrentYear(cal.get(Calendar.YEAR));
setCurrentMonth(cal.get(Calendar.MONTH));
setCurrentDay(cal.get(Calendar.DAY_OF_MONTH));
}
}
};
private NumberPicker.OnValueChangeListener mOnMinuteChangedListener = new NumberPicker.OnValueChangeListener() {
@Override
//这里是对 分钟Minute改变的监听
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
int minValue = mMinuteSpinner.getMinValue();
int maxValue = mMinuteSpinner.getMaxValue();
int offset = 0;
//设置offset作为小时改变的一个记录数据
if (oldVal == maxValue && newVal == minValue) {
offset += 1;
} else if (oldVal == minValue && newVal == maxValue) {
offset -= 1;
}
//如果原值为59新值为0则offset加1
//如果原值为0新值为59则offset减1
if (offset != 0) {
mDate.add(Calendar.HOUR_OF_DAY, offset);
mHourSpinner.setValue(getCurrentHour());
updateDateControl();
int newHour = getCurrentHourOfDay();
if (newHour >= HOURS_IN_HALF_DAY) {
mIsAm = false;
updateAmPmControl();
} else {
mIsAm = true;
updateAmPmControl();
}
}
mDate.set(Calendar.MINUTE, newVal);
onDateTimeChanged();
}
};
private NumberPicker.OnValueChangeListener mOnAmPmChangedListener = new NumberPicker.OnValueChangeListener() {
//对AM和PM的监听
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
mIsAm = !mIsAm;
if (mIsAm) {
mDate.add(Calendar.HOUR_OF_DAY, -HOURS_IN_HALF_DAY);
} else {
mDate.add(Calendar.HOUR_OF_DAY, HOURS_IN_HALF_DAY);
}
updateAmPmControl();
onDateTimeChanged();
}
};
public interface OnDateTimeChangedListener {
void onDateTimeChanged(DateTimePicker view, int year, int month,
int dayOfMonth, int hourOfDay, int minute);
}
public DateTimePicker(Context context) {
this(context, System.currentTimeMillis());
}//通过对数据库的访问,获取当前的系统时间
public DateTimePicker(Context context, long date) {
this(context, date, DateFormat.is24HourFormat(context));
}//上面函数的得到的是一个天文数字1970至今的秒数需要DateFormat将其变得有意义
public DateTimePicker(Context context, long date, boolean is24HourView) {
super(context);
//获取系统时间
mDate = Calendar.getInstance();
mInitialising = true;
mIsAm = getCurrentHourOfDay() >= HOURS_IN_HALF_DAY;
inflate(context, R.layout.datetime_picker, this);
//如果当前Activity里用到别的layout比如对话框layout
//还要设置这个layout上的其他组件的内容就必须用inflate()方法先将对话框的layout找出来
//然后再用findViewById()找到它上面的其它组件
mDateSpinner = (NumberPicker) findViewById(R.id.date);
mDateSpinner.setMinValue(DATE_SPINNER_MIN_VAL);
mDateSpinner.setMaxValue(DATE_SPINNER_MAX_VAL);
mDateSpinner.setOnValueChangedListener(mOnDateChangedListener);
mHourSpinner = (NumberPicker) findViewById(R.id.hour);
mHourSpinner.setOnValueChangedListener(mOnHourChangedListener);
mMinuteSpinner = (NumberPicker) findViewById(R.id.minute);
mMinuteSpinner.setMinValue(MINUT_SPINNER_MIN_VAL);
mMinuteSpinner.setMaxValue(MINUT_SPINNER_MAX_VAL);
mMinuteSpinner.setOnLongPressUpdateInterval(100);
mMinuteSpinner.setOnValueChangedListener(mOnMinuteChangedListener);
String[] stringsForAmPm = new DateFormatSymbols().getAmPmStrings();
mAmPmSpinner = (NumberPicker) findViewById(R.id.amPm);
mAmPmSpinner.setMinValue(AMPM_SPINNER_MIN_VAL);
mAmPmSpinner.setMaxValue(AMPM_SPINNER_MAX_VAL);
mAmPmSpinner.setDisplayedValues(stringsForAmPm);
mAmPmSpinner.setOnValueChangedListener(mOnAmPmChangedListener);
// update controls to initial state
updateDateControl();
updateHourControl();
updateAmPmControl();
set24HourView(is24HourView);
// set to current time
setCurrentDate(date);
setEnabled(isEnabled());
// set the content descriptions
mInitialising = false;
}
@Override
public void setEnabled(boolean enabled) {
if (mIsEnabled == enabled) {
return;
}
super.setEnabled(enabled);
mDateSpinner.setEnabled(enabled);
mMinuteSpinner.setEnabled(enabled);
mHourSpinner.setEnabled(enabled);
mAmPmSpinner.setEnabled(enabled);
mIsEnabled = enabled;
}
//存在疑问setEnabled的作用
//下面的代码通过原程序的注释已经比较清晰,另外可以通过函数名来判断
//下面的各函数主要是对上面代码引用到的各函数功能的实现
@Override
public boolean isEnabled() {
return mIsEnabled;
}
/**
* Get the current date in millis
*
* @return the current date in millis
*/
public long getCurrentDateInTimeMillis(){
return mDate.getTimeInMillis();
}//实现函数——得到当前的秒数
/**
* Set the current date
*
* @param date The current date in millis
*/
public void setCurrentDate(long date) {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(date);
setCurrentDate(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH),
cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
}//实现函数功能——设置当前的时间参数是date
/**
* Set the current date
*
* @param year The current year
* @param month The current month
* @param dayOfMonth The current dayOfMonth
* @param hourOfDay The current hourOfDay
* @param minute The current minute
*/
public void setCurrentDate(int year, int month,
int dayOfMonth, int hourOfDay, int minute) {
setCurrentYear(year);
setCurrentMonth(month);
setCurrentDay(dayOfMonth);
setCurrentHour(hourOfDay);
setCurrentMinute(minute);
}//实现函数功能——设置当前的时间,参数是各详细的变量
/**
* Get current year
*
* @return The current year
*/
//下面是得到year、month、day等值
public int getCurrentYear() {
return mDate.get(Calendar.YEAR);
}
/**
* Set current year
*
* @param year The current year
*/
public void setCurrentYear(int year) {
if (!mInitialising && year == getCurrentYear()) {
return;
}
mDate.set(Calendar.YEAR, year);
updateDateControl();
onDateTimeChanged();
}
/**
* Get current month in the year
*
* @return The current month in the year
*/
public int getCurrentMonth() {
return mDate.get(Calendar.MONTH);
}
/**
* Set current month in the year
*
* @param month The month in the year
*/
public void setCurrentMonth(int month) {
if (!mInitialising && month == getCurrentMonth()) {
return;
}
mDate.set(Calendar.MONTH, month);
updateDateControl();
onDateTimeChanged();
}
/**
* Get current day of the month
*
* @return The day of the month
*/
public int getCurrentDay() {
return mDate.get(Calendar.DAY_OF_MONTH);
}
/**
* Set current day of the month
*
* @param dayOfMonth The day of the month
*/
public void setCurrentDay(int dayOfMonth) {
if (!mInitialising && dayOfMonth == getCurrentDay()) {
return;
}
mDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
updateDateControl();
onDateTimeChanged();
}
/**
* Get current hour in 24 hour mode, in the range (0~23)
* @return The current hour in 24 hour mode
*/
public int getCurrentHourOfDay() {
return mDate.get(Calendar.HOUR_OF_DAY);
}
private int getCurrentHour() {
if (mIs24HourView){
return getCurrentHourOfDay();
} else {
int hour = getCurrentHourOfDay();
if (hour > HOURS_IN_HALF_DAY) {
return hour - HOURS_IN_HALF_DAY;
} else {
return hour == 0 ? HOURS_IN_HALF_DAY : hour;
}
}
}
/**
* Set current hour in 24 hour mode, in the range (0~23)
*
* @param hourOfDay
*/
public void setCurrentHour(int hourOfDay) {
if (!mInitialising && hourOfDay == getCurrentHourOfDay()) {
return;
}
mDate.set(Calendar.HOUR_OF_DAY, hourOfDay);
if (!mIs24HourView) {
if (hourOfDay >= HOURS_IN_HALF_DAY) {
mIsAm = false;
if (hourOfDay > HOURS_IN_HALF_DAY) {
hourOfDay -= HOURS_IN_HALF_DAY;
}
} else {
mIsAm = true;
if (hourOfDay == 0) {
hourOfDay = HOURS_IN_HALF_DAY;
}
}
updateAmPmControl();
}
mHourSpinner.setValue(hourOfDay);
onDateTimeChanged();
}
/**
* Get currentMinute
*
* @return The Current Minute
*/
public int getCurrentMinute() {
return mDate.get(Calendar.MINUTE);
}
/**
* Set current minute
*/
public void setCurrentMinute(int minute) {
if (!mInitialising && minute == getCurrentMinute()) {
return;
}
mMinuteSpinner.setValue(minute);
mDate.set(Calendar.MINUTE, minute);
onDateTimeChanged();
}
/**
* @return true if this is in 24 hour view else false.
*/
public boolean is24HourView () {
return mIs24HourView;
}
/**
* Set whether in 24 hour or AM/PM mode.
*
* @param is24HourView True for 24 hour mode. False for AM/PM mode.
*/
public void set24HourView(boolean is24HourView) {
if (mIs24HourView == is24HourView) {
return;
}
mIs24HourView = is24HourView;
mAmPmSpinner.setVisibility(is24HourView ? View.GONE : View.VISIBLE);
int hour = getCurrentHourOfDay();
updateHourControl();
setCurrentHour(hour);
updateAmPmControl();
}
private void updateDateControl() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(mDate.getTimeInMillis());
cal.add(Calendar.DAY_OF_YEAR, -DAYS_IN_ALL_WEEK / 2 - 1);
mDateSpinner.setDisplayedValues(null);
for (int i = 0; i < DAYS_IN_ALL_WEEK; ++i) {
cal.add(Calendar.DAY_OF_YEAR, 1);
mDateDisplayValues[i] = (String) DateFormat.format("MM.dd EEEE", cal);
}
mDateSpinner.setDisplayedValues(mDateDisplayValues);
mDateSpinner.setValue(DAYS_IN_ALL_WEEK / 2);
mDateSpinner.invalidate();
}// 对于星期几的算法
private void updateAmPmControl() {
if (mIs24HourView) {
mAmPmSpinner.setVisibility(View.GONE);
} else {
int index = mIsAm ? Calendar.AM : Calendar.PM;
mAmPmSpinner.setValue(index);
mAmPmSpinner.setVisibility(View.VISIBLE);
}
}// 对于上下午操作的算法
private void updateHourControl() {
if (mIs24HourView) {
mHourSpinner.setMinValue(HOUR_SPINNER_MIN_VAL_24_HOUR_VIEW);
mHourSpinner.setMaxValue(HOUR_SPINNER_MAX_VAL_24_HOUR_VIEW);
} else {
mHourSpinner.setMinValue(HOUR_SPINNER_MIN_VAL_12_HOUR_VIEW);
mHourSpinner.setMaxValue(HOUR_SPINNER_MAX_VAL_12_HOUR_VIEW);
}// 对与小时的算法
}
/**
* Set the callback that indicates the 'Set' button has been pressed.
* @param callback the callback, if null will do nothing
*/
public void setOnDateTimeChangedListener(OnDateTimeChangedListener callback) {
mOnDateTimeChangedListener = callback;
}
private void onDateTimeChanged() {
if (mOnDateTimeChangedListener != null) {
mOnDateTimeChangedListener.onDateTimeChanged(this, getCurrentYear(),
getCurrentMonth(), getCurrentDay(), getCurrentHourOfDay(), getCurrentMinute());
}
}
}

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.micode.notes"
android:versionCode="1"
android:versionName="0.1" >
<uses-sdk android:minSdkVersion="14" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:icon="@drawable/icon_app"
android:label="@string/app_name" >
<activity
android:name=".ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:theme="@style/NoteTheme" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/text_note" />
<data android:mimeType="vnd.android.cursor.item/call_note" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.INSERT_OR_EDIT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/text_note" />
<data android:mimeType="vnd.android.cursor.item/call_note" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<provider
android:name="net.micode.notes.data.NotesProvider"
android:authorities="micode_notes"
android:multiprocess="true" />
<receiver
android:name=".widget.NoteWidgetProvider_2x"
android:label="@string/app_widget2x2" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_2x_info" />
</receiver>
<receiver
android:name=".widget.NoteWidgetProvider_4x"
android:label="@string/app_widget4x4" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_4x_info" />
</receiver>
<receiver android:name=".ui.AlarmInitReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name="net.micode.notes.ui.AlarmReceiver"
android:process=":remote" >
</receiver>
<activity
android:name=".ui.AlarmAlertActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
</activity>
<activity
android:name="net.micode.notes.ui.NotesPreferenceActivity"
android:label="@string/preferences_title"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Holo.Light" >
</activity>
<service
android:name="net.micode.notes.gtask.remote.GTaskSyncService"
android:exported="false" >
</service>
<meta-data
android:name="android.app.default_searchable"
android:value=".ui.NoteEditActivity" />
</application>
</manifest>

@ -0,0 +1,190 @@
Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

@ -0,0 +1,23 @@
[中文]
1. MiCode便签是小米便签的社区开源版由MIUI团队(www.miui.com) 发起并贡献第一批代码遵循NOTICE文件所描述的开源协议
今后为MiCode社区(www.micode.net) 拥有,并由社区发布和维护。
2. Bug反馈和跟踪请访问Github,
https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open
3. 功能建议和综合讨论请访问MiCode,
http://micode.net/forum.php?mod=forumdisplay&fid=38
[English]
1. MiCode Notes is open source edition of XM notepad, it's first initiated and sponsored by MIUI team (www.miui.com).
It's opened under license described by NOTICE file. It's owned by the MiCode community (www.micode.net). In future,
the MiCode community will release and maintain this project.
2. Regarding issue tracking, please visit Github,
https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open
3. Regarding feature request and general discussion, please visit Micode forum,
http://micode.net/forum.php?mod=forumdisplay&fid=38

@ -0,0 +1,27 @@
apply plugin: 'com.android.application'
android {
namespace "net.micode.notes"
compileSdkVersion 30
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "net.micode.notes"
minSdkVersion 30
targetSdkVersion 30
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
}

@ -0,0 +1,80 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class AccountDialogTitleBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
@NonNull
public final TextView accountDialogSubtitle;
@NonNull
public final TextView accountDialogTitle;
private AccountDialogTitleBinding(@NonNull LinearLayout rootView,
@NonNull TextView accountDialogSubtitle, @NonNull TextView accountDialogTitle) {
this.rootView = rootView;
this.accountDialogSubtitle = accountDialogSubtitle;
this.accountDialogTitle = accountDialogTitle;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static AccountDialogTitleBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static AccountDialogTitleBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.account_dialog_title, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static AccountDialogTitleBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.account_dialog_subtitle;
TextView accountDialogSubtitle = ViewBindings.findChildViewById(rootView, id);
if (accountDialogSubtitle == null) {
break missingId;
}
id = R.id.account_dialog_title;
TextView accountDialogTitle = ViewBindings.findChildViewById(rootView, id);
if (accountDialogTitle == null) {
break missingId;
}
return new AccountDialogTitleBinding((LinearLayout) rootView, accountDialogSubtitle,
accountDialogTitle);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,113 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class ActivitySplashBinding implements ViewBinding {
@NonNull
private final FrameLayout rootView;
@NonNull
public final Button dummyButton;
@NonNull
public final TextView fullscreenContent;
@NonNull
public final LinearLayout fullscreenContentControls;
@NonNull
public final TextView textView;
@NonNull
public final TextView textView5;
private ActivitySplashBinding(@NonNull FrameLayout rootView, @NonNull Button dummyButton,
@NonNull TextView fullscreenContent, @NonNull LinearLayout fullscreenContentControls,
@NonNull TextView textView, @NonNull TextView textView5) {
this.rootView = rootView;
this.dummyButton = dummyButton;
this.fullscreenContent = fullscreenContent;
this.fullscreenContentControls = fullscreenContentControls;
this.textView = textView;
this.textView5 = textView5;
}
@Override
@NonNull
public FrameLayout getRoot() {
return rootView;
}
@NonNull
public static ActivitySplashBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static ActivitySplashBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.activity_splash, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static ActivitySplashBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.dummy_button;
Button dummyButton = ViewBindings.findChildViewById(rootView, id);
if (dummyButton == null) {
break missingId;
}
id = R.id.fullscreen_content;
TextView fullscreenContent = ViewBindings.findChildViewById(rootView, id);
if (fullscreenContent == null) {
break missingId;
}
id = R.id.fullscreen_content_controls;
LinearLayout fullscreenContentControls = ViewBindings.findChildViewById(rootView, id);
if (fullscreenContentControls == null) {
break missingId;
}
id = R.id.textView;
TextView textView = ViewBindings.findChildViewById(rootView, id);
if (textView == null) {
break missingId;
}
id = R.id.textView5;
TextView textView5 = ViewBindings.findChildViewById(rootView, id);
if (textView5 == null) {
break missingId;
}
return new ActivitySplashBinding((FrameLayout) rootView, dummyButton, fullscreenContent,
fullscreenContentControls, textView, textView5);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,52 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.widget.LinearLayout;
import java.lang.NullPointerException;
import java.lang.Override;
import net.micode.notes.R;
public final class AddAccountTextBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
private AddAccountTextBinding(@NonNull LinearLayout rootView) {
this.rootView = rootView;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static AddAccountTextBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static AddAccountTextBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.add_account_text, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static AddAccountTextBinding bind(@NonNull View rootView) {
if (rootView == null) {
throw new NullPointerException("rootView");
}
return new AddAccountTextBinding((LinearLayout) rootView);
}
}

@ -0,0 +1,99 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.LinearLayout;
import android.widget.NumberPicker;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class DatetimePickerBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
@NonNull
public final NumberPicker amPm;
@NonNull
public final NumberPicker date;
@NonNull
public final NumberPicker hour;
@NonNull
public final NumberPicker minute;
private DatetimePickerBinding(@NonNull LinearLayout rootView, @NonNull NumberPicker amPm,
@NonNull NumberPicker date, @NonNull NumberPicker hour, @NonNull NumberPicker minute) {
this.rootView = rootView;
this.amPm = amPm;
this.date = date;
this.hour = hour;
this.minute = minute;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static DatetimePickerBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static DatetimePickerBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.datetime_picker, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static DatetimePickerBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.amPm;
NumberPicker amPm = ViewBindings.findChildViewById(rootView, id);
if (amPm == null) {
break missingId;
}
id = R.id.date;
NumberPicker date = ViewBindings.findChildViewById(rootView, id);
if (date == null) {
break missingId;
}
id = R.id.hour;
NumberPicker hour = ViewBindings.findChildViewById(rootView, id);
if (hour == null) {
break missingId;
}
id = R.id.minute;
NumberPicker minute = ViewBindings.findChildViewById(rootView, id);
if (minute == null) {
break missingId;
}
return new DatetimePickerBinding((LinearLayout) rootView, amPm, date, hour, minute);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,58 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.widget.EditText;
import java.lang.NullPointerException;
import java.lang.Override;
import net.micode.notes.R;
public final class DialogEditTextBinding implements ViewBinding {
@NonNull
private final EditText rootView;
@NonNull
public final EditText etFolerName;
private DialogEditTextBinding(@NonNull EditText rootView, @NonNull EditText etFolerName) {
this.rootView = rootView;
this.etFolerName = etFolerName;
}
@Override
@NonNull
public EditText getRoot() {
return rootView;
}
@NonNull
public static DialogEditTextBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static DialogEditTextBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.dialog_edit_text, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static DialogEditTextBinding bind(@NonNull View rootView) {
if (rootView == null) {
throw new NullPointerException("rootView");
}
EditText etFolerName = (EditText) rootView;
return new DialogEditTextBinding((EditText) rootView, etFolerName);
}
}

@ -0,0 +1,68 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class FolderListItemBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
@NonNull
public final TextView tvFolderName;
private FolderListItemBinding(@NonNull LinearLayout rootView, @NonNull TextView tvFolderName) {
this.rootView = rootView;
this.tvFolderName = tvFolderName;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static FolderListItemBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static FolderListItemBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.folder_list_item, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static FolderListItemBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.tv_folder_name;
TextView tvFolderName = ViewBindings.findChildViewById(rootView, id);
if (tvFolderName == null) {
break missingId;
}
return new FolderListItemBinding((LinearLayout) rootView, tvFolderName);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,371 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
import net.micode.notes.ui.NoteEditText;
public final class NoteEditBinding implements ViewBinding {
@NonNull
private final FrameLayout rootView;
@NonNull
public final ImageButton addImgBtn;
@NonNull
public final ImageView btnSetBgColor;
@NonNull
public final LinearLayout fontSizeSelector;
@NonNull
public final ImageView ivAlertIcon;
@NonNull
public final ImageView ivBgBlue;
@NonNull
public final ImageView ivBgBlueSelect;
@NonNull
public final ImageView ivBgGreen;
@NonNull
public final ImageView ivBgGreenSelect;
@NonNull
public final ImageView ivBgRed;
@NonNull
public final ImageView ivBgRedSelect;
@NonNull
public final ImageView ivBgWhite;
@NonNull
public final ImageView ivBgWhiteSelect;
@NonNull
public final ImageView ivBgYellow;
@NonNull
public final ImageView ivBgYellowSelect;
@NonNull
public final ImageView ivLargeSelect;
@NonNull
public final ImageView ivMediumSelect;
@NonNull
public final ImageView ivSmallSelect;
@NonNull
public final ImageView ivSuperSelect;
@NonNull
public final FrameLayout llFontLarge;
@NonNull
public final FrameLayout llFontNormal;
@NonNull
public final FrameLayout llFontSmall;
@NonNull
public final FrameLayout llFontSuper;
@NonNull
public final LinearLayout noteBgColorSelector;
@NonNull
public final LinearLayout noteEditList;
@NonNull
public final NoteEditText noteEditView;
@NonNull
public final LinearLayout noteTitle;
@NonNull
public final LinearLayout svNoteEdit;
@NonNull
public final TextView tvAlertDate;
@NonNull
public final TextView tvModifiedDate;
private NoteEditBinding(@NonNull FrameLayout rootView, @NonNull ImageButton addImgBtn,
@NonNull ImageView btnSetBgColor, @NonNull LinearLayout fontSizeSelector,
@NonNull ImageView ivAlertIcon, @NonNull ImageView ivBgBlue,
@NonNull ImageView ivBgBlueSelect, @NonNull ImageView ivBgGreen,
@NonNull ImageView ivBgGreenSelect, @NonNull ImageView ivBgRed,
@NonNull ImageView ivBgRedSelect, @NonNull ImageView ivBgWhite,
@NonNull ImageView ivBgWhiteSelect, @NonNull ImageView ivBgYellow,
@NonNull ImageView ivBgYellowSelect, @NonNull ImageView ivLargeSelect,
@NonNull ImageView ivMediumSelect, @NonNull ImageView ivSmallSelect,
@NonNull ImageView ivSuperSelect, @NonNull FrameLayout llFontLarge,
@NonNull FrameLayout llFontNormal, @NonNull FrameLayout llFontSmall,
@NonNull FrameLayout llFontSuper, @NonNull LinearLayout noteBgColorSelector,
@NonNull LinearLayout noteEditList, @NonNull NoteEditText noteEditView,
@NonNull LinearLayout noteTitle, @NonNull LinearLayout svNoteEdit,
@NonNull TextView tvAlertDate, @NonNull TextView tvModifiedDate) {
this.rootView = rootView;
this.addImgBtn = addImgBtn;
this.btnSetBgColor = btnSetBgColor;
this.fontSizeSelector = fontSizeSelector;
this.ivAlertIcon = ivAlertIcon;
this.ivBgBlue = ivBgBlue;
this.ivBgBlueSelect = ivBgBlueSelect;
this.ivBgGreen = ivBgGreen;
this.ivBgGreenSelect = ivBgGreenSelect;
this.ivBgRed = ivBgRed;
this.ivBgRedSelect = ivBgRedSelect;
this.ivBgWhite = ivBgWhite;
this.ivBgWhiteSelect = ivBgWhiteSelect;
this.ivBgYellow = ivBgYellow;
this.ivBgYellowSelect = ivBgYellowSelect;
this.ivLargeSelect = ivLargeSelect;
this.ivMediumSelect = ivMediumSelect;
this.ivSmallSelect = ivSmallSelect;
this.ivSuperSelect = ivSuperSelect;
this.llFontLarge = llFontLarge;
this.llFontNormal = llFontNormal;
this.llFontSmall = llFontSmall;
this.llFontSuper = llFontSuper;
this.noteBgColorSelector = noteBgColorSelector;
this.noteEditList = noteEditList;
this.noteEditView = noteEditView;
this.noteTitle = noteTitle;
this.svNoteEdit = svNoteEdit;
this.tvAlertDate = tvAlertDate;
this.tvModifiedDate = tvModifiedDate;
}
@Override
@NonNull
public FrameLayout getRoot() {
return rootView;
}
@NonNull
public static NoteEditBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static NoteEditBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.note_edit, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static NoteEditBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.add_img_btn;
ImageButton addImgBtn = ViewBindings.findChildViewById(rootView, id);
if (addImgBtn == null) {
break missingId;
}
id = R.id.btn_set_bg_color;
ImageView btnSetBgColor = ViewBindings.findChildViewById(rootView, id);
if (btnSetBgColor == null) {
break missingId;
}
id = R.id.font_size_selector;
LinearLayout fontSizeSelector = ViewBindings.findChildViewById(rootView, id);
if (fontSizeSelector == null) {
break missingId;
}
id = R.id.iv_alert_icon;
ImageView ivAlertIcon = ViewBindings.findChildViewById(rootView, id);
if (ivAlertIcon == null) {
break missingId;
}
id = R.id.iv_bg_blue;
ImageView ivBgBlue = ViewBindings.findChildViewById(rootView, id);
if (ivBgBlue == null) {
break missingId;
}
id = R.id.iv_bg_blue_select;
ImageView ivBgBlueSelect = ViewBindings.findChildViewById(rootView, id);
if (ivBgBlueSelect == null) {
break missingId;
}
id = R.id.iv_bg_green;
ImageView ivBgGreen = ViewBindings.findChildViewById(rootView, id);
if (ivBgGreen == null) {
break missingId;
}
id = R.id.iv_bg_green_select;
ImageView ivBgGreenSelect = ViewBindings.findChildViewById(rootView, id);
if (ivBgGreenSelect == null) {
break missingId;
}
id = R.id.iv_bg_red;
ImageView ivBgRed = ViewBindings.findChildViewById(rootView, id);
if (ivBgRed == null) {
break missingId;
}
id = R.id.iv_bg_red_select;
ImageView ivBgRedSelect = ViewBindings.findChildViewById(rootView, id);
if (ivBgRedSelect == null) {
break missingId;
}
id = R.id.iv_bg_white;
ImageView ivBgWhite = ViewBindings.findChildViewById(rootView, id);
if (ivBgWhite == null) {
break missingId;
}
id = R.id.iv_bg_white_select;
ImageView ivBgWhiteSelect = ViewBindings.findChildViewById(rootView, id);
if (ivBgWhiteSelect == null) {
break missingId;
}
id = R.id.iv_bg_yellow;
ImageView ivBgYellow = ViewBindings.findChildViewById(rootView, id);
if (ivBgYellow == null) {
break missingId;
}
id = R.id.iv_bg_yellow_select;
ImageView ivBgYellowSelect = ViewBindings.findChildViewById(rootView, id);
if (ivBgYellowSelect == null) {
break missingId;
}
id = R.id.iv_large_select;
ImageView ivLargeSelect = ViewBindings.findChildViewById(rootView, id);
if (ivLargeSelect == null) {
break missingId;
}
id = R.id.iv_medium_select;
ImageView ivMediumSelect = ViewBindings.findChildViewById(rootView, id);
if (ivMediumSelect == null) {
break missingId;
}
id = R.id.iv_small_select;
ImageView ivSmallSelect = ViewBindings.findChildViewById(rootView, id);
if (ivSmallSelect == null) {
break missingId;
}
id = R.id.iv_super_select;
ImageView ivSuperSelect = ViewBindings.findChildViewById(rootView, id);
if (ivSuperSelect == null) {
break missingId;
}
id = R.id.ll_font_large;
FrameLayout llFontLarge = ViewBindings.findChildViewById(rootView, id);
if (llFontLarge == null) {
break missingId;
}
id = R.id.ll_font_normal;
FrameLayout llFontNormal = ViewBindings.findChildViewById(rootView, id);
if (llFontNormal == null) {
break missingId;
}
id = R.id.ll_font_small;
FrameLayout llFontSmall = ViewBindings.findChildViewById(rootView, id);
if (llFontSmall == null) {
break missingId;
}
id = R.id.ll_font_super;
FrameLayout llFontSuper = ViewBindings.findChildViewById(rootView, id);
if (llFontSuper == null) {
break missingId;
}
id = R.id.note_bg_color_selector;
LinearLayout noteBgColorSelector = ViewBindings.findChildViewById(rootView, id);
if (noteBgColorSelector == null) {
break missingId;
}
id = R.id.note_edit_list;
LinearLayout noteEditList = ViewBindings.findChildViewById(rootView, id);
if (noteEditList == null) {
break missingId;
}
id = R.id.note_edit_view;
NoteEditText noteEditView = ViewBindings.findChildViewById(rootView, id);
if (noteEditView == null) {
break missingId;
}
id = R.id.note_title;
LinearLayout noteTitle = ViewBindings.findChildViewById(rootView, id);
if (noteTitle == null) {
break missingId;
}
id = R.id.sv_note_edit;
LinearLayout svNoteEdit = ViewBindings.findChildViewById(rootView, id);
if (svNoteEdit == null) {
break missingId;
}
id = R.id.tv_alert_date;
TextView tvAlertDate = ViewBindings.findChildViewById(rootView, id);
if (tvAlertDate == null) {
break missingId;
}
id = R.id.tv_modified_date;
TextView tvModifiedDate = ViewBindings.findChildViewById(rootView, id);
if (tvModifiedDate == null) {
break missingId;
}
return new NoteEditBinding((FrameLayout) rootView, addImgBtn, btnSetBgColor, fontSizeSelector,
ivAlertIcon, ivBgBlue, ivBgBlueSelect, ivBgGreen, ivBgGreenSelect, ivBgRed, ivBgRedSelect,
ivBgWhite, ivBgWhiteSelect, ivBgYellow, ivBgYellowSelect, ivLargeSelect, ivMediumSelect,
ivSmallSelect, ivSuperSelect, llFontLarge, llFontNormal, llFontSmall, llFontSuper,
noteBgColorSelector, noteEditList, noteEditView, noteTitle, svNoteEdit, tvAlertDate,
tvModifiedDate);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,80 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
import net.micode.notes.ui.NoteEditText;
public final class NoteEditListItemBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
@NonNull
public final CheckBox cbEditItem;
@NonNull
public final NoteEditText etEditText;
private NoteEditListItemBinding(@NonNull LinearLayout rootView, @NonNull CheckBox cbEditItem,
@NonNull NoteEditText etEditText) {
this.rootView = rootView;
this.cbEditItem = cbEditItem;
this.etEditText = etEditText;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static NoteEditListItemBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static NoteEditListItemBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.note_edit_list_item, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static NoteEditListItemBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.cb_edit_item;
CheckBox cbEditItem = ViewBindings.findChildViewById(rootView, id);
if (cbEditItem == null) {
break missingId;
}
id = R.id.et_edit_text;
NoteEditText etEditText = ViewBindings.findChildViewById(rootView, id);
if (etEditText == null) {
break missingId;
}
return new NoteEditListItemBinding((LinearLayout) rootView, cbEditItem, etEditText);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,119 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.CheckBox;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class NoteItemBinding implements ViewBinding {
@NonNull
private final FrameLayout rootView;
@NonNull
public final CheckBox checkbox;
@NonNull
public final ImageView ivAlertIcon;
@NonNull
public final FrameLayout noteItem;
@NonNull
public final TextView tvName;
@NonNull
public final TextView tvTime;
@NonNull
public final TextView tvTitle;
private NoteItemBinding(@NonNull FrameLayout rootView, @NonNull CheckBox checkbox,
@NonNull ImageView ivAlertIcon, @NonNull FrameLayout noteItem, @NonNull TextView tvName,
@NonNull TextView tvTime, @NonNull TextView tvTitle) {
this.rootView = rootView;
this.checkbox = checkbox;
this.ivAlertIcon = ivAlertIcon;
this.noteItem = noteItem;
this.tvName = tvName;
this.tvTime = tvTime;
this.tvTitle = tvTitle;
}
@Override
@NonNull
public FrameLayout getRoot() {
return rootView;
}
@NonNull
public static NoteItemBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static NoteItemBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.note_item, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static NoteItemBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = android.R.id.checkbox;
CheckBox checkbox = ViewBindings.findChildViewById(rootView, id);
if (checkbox == null) {
break missingId;
}
id = R.id.iv_alert_icon;
ImageView ivAlertIcon = ViewBindings.findChildViewById(rootView, id);
if (ivAlertIcon == null) {
break missingId;
}
FrameLayout noteItem = (FrameLayout) rootView;
id = R.id.tv_name;
TextView tvName = ViewBindings.findChildViewById(rootView, id);
if (tvName == null) {
break missingId;
}
id = R.id.tv_time;
TextView tvTime = ViewBindings.findChildViewById(rootView, id);
if (tvTime == null) {
break missingId;
}
id = R.id.tv_title;
TextView tvTitle = ViewBindings.findChildViewById(rootView, id);
if (tvTitle == null) {
break missingId;
}
return new NoteItemBinding((FrameLayout) rootView, checkbox, ivAlertIcon, noteItem, tvName,
tvTime, tvTitle);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,91 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class NoteListBinding implements ViewBinding {
@NonNull
private final FrameLayout rootView;
@NonNull
public final Button btnNewNote;
@NonNull
public final ListView notesList;
@NonNull
public final TextView tvTitleBar;
private NoteListBinding(@NonNull FrameLayout rootView, @NonNull Button btnNewNote,
@NonNull ListView notesList, @NonNull TextView tvTitleBar) {
this.rootView = rootView;
this.btnNewNote = btnNewNote;
this.notesList = notesList;
this.tvTitleBar = tvTitleBar;
}
@Override
@NonNull
public FrameLayout getRoot() {
return rootView;
}
@NonNull
public static NoteListBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static NoteListBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.note_list, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static NoteListBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.btn_new_note;
Button btnNewNote = ViewBindings.findChildViewById(rootView, id);
if (btnNewNote == null) {
break missingId;
}
id = R.id.notes_list;
ListView notesList = ViewBindings.findChildViewById(rootView, id);
if (notesList == null) {
break missingId;
}
id = R.id.tv_title_bar;
TextView tvTitleBar = ViewBindings.findChildViewById(rootView, id);
if (tvTitleBar == null) {
break missingId;
}
return new NoteListBinding((FrameLayout) rootView, btnNewNote, notesList, tvTitleBar);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,75 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.Button;
import android.widget.LinearLayout;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class NoteListDropdownMenuBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
@NonNull
public final LinearLayout navigationBar;
@NonNull
public final Button selectionMenu;
private NoteListDropdownMenuBinding(@NonNull LinearLayout rootView,
@NonNull LinearLayout navigationBar, @NonNull Button selectionMenu) {
this.rootView = rootView;
this.navigationBar = navigationBar;
this.selectionMenu = selectionMenu;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static NoteListDropdownMenuBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static NoteListDropdownMenuBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.note_list_dropdown_menu, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static NoteListDropdownMenuBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
LinearLayout navigationBar = (LinearLayout) rootView;
id = R.id.selection_menu;
Button selectionMenu = ViewBindings.findChildViewById(rootView, id);
if (selectionMenu == null) {
break missingId;
}
return new NoteListDropdownMenuBinding((LinearLayout) rootView, navigationBar, selectionMenu);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,51 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import java.lang.NullPointerException;
import java.lang.Override;
import net.micode.notes.R;
public final class NoteListFooterBinding implements ViewBinding {
@NonNull
private final View rootView;
private NoteListFooterBinding(@NonNull View rootView) {
this.rootView = rootView;
}
@Override
@NonNull
public View getRoot() {
return rootView;
}
@NonNull
public static NoteListFooterBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static NoteListFooterBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.note_list_footer, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static NoteListFooterBinding bind(@NonNull View rootView) {
if (rootView == null) {
throw new NullPointerException("rootView");
}
return new NoteListFooterBinding(rootView);
}
}

@ -0,0 +1,81 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class SettingsHeaderBinding implements ViewBinding {
@NonNull
private final LinearLayout rootView;
@NonNull
public final TextView prefenereceSyncStatusTextview;
@NonNull
public final Button preferenceSyncButton;
private SettingsHeaderBinding(@NonNull LinearLayout rootView,
@NonNull TextView prefenereceSyncStatusTextview, @NonNull Button preferenceSyncButton) {
this.rootView = rootView;
this.prefenereceSyncStatusTextview = prefenereceSyncStatusTextview;
this.preferenceSyncButton = preferenceSyncButton;
}
@Override
@NonNull
public LinearLayout getRoot() {
return rootView;
}
@NonNull
public static SettingsHeaderBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static SettingsHeaderBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.settings_header, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static SettingsHeaderBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.prefenerece_sync_status_textview;
TextView prefenereceSyncStatusTextview = ViewBindings.findChildViewById(rootView, id);
if (prefenereceSyncStatusTextview == null) {
break missingId;
}
id = R.id.preference_sync_button;
Button preferenceSyncButton = ViewBindings.findChildViewById(rootView, id);
if (preferenceSyncButton == null) {
break missingId;
}
return new SettingsHeaderBinding((LinearLayout) rootView, prefenereceSyncStatusTextview,
preferenceSyncButton);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,80 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class Widget2xBinding implements ViewBinding {
@NonNull
private final FrameLayout rootView;
@NonNull
public final ImageView widgetBgImage;
@NonNull
public final TextView widgetText;
private Widget2xBinding(@NonNull FrameLayout rootView, @NonNull ImageView widgetBgImage,
@NonNull TextView widgetText) {
this.rootView = rootView;
this.widgetBgImage = widgetBgImage;
this.widgetText = widgetText;
}
@Override
@NonNull
public FrameLayout getRoot() {
return rootView;
}
@NonNull
public static Widget2xBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static Widget2xBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.widget_2x, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static Widget2xBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.widget_bg_image;
ImageView widgetBgImage = ViewBindings.findChildViewById(rootView, id);
if (widgetBgImage == null) {
break missingId;
}
id = R.id.widget_text;
TextView widgetText = ViewBindings.findChildViewById(rootView, id);
if (widgetText == null) {
break missingId;
}
return new Widget2xBinding((FrameLayout) rootView, widgetBgImage, widgetText);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,80 @@
// Generated by view binder compiler. Do not edit!
package net.micode.notes.databinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.viewbinding.ViewBinding;
import android.viewbinding.ViewBindings;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import net.micode.notes.R;
public final class Widget4xBinding implements ViewBinding {
@NonNull
private final FrameLayout rootView;
@NonNull
public final ImageView widgetBgImage;
@NonNull
public final TextView widgetText;
private Widget4xBinding(@NonNull FrameLayout rootView, @NonNull ImageView widgetBgImage,
@NonNull TextView widgetText) {
this.rootView = rootView;
this.widgetBgImage = widgetBgImage;
this.widgetText = widgetText;
}
@Override
@NonNull
public FrameLayout getRoot() {
return rootView;
}
@NonNull
public static Widget4xBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static Widget4xBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.widget_4x, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static Widget4xBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.widget_bg_image;
ImageView widgetBgImage = ViewBindings.findChildViewById(rootView, id);
if (widgetBgImage == null) {
break missingId;
}
id = R.id.widget_text;
TextView widgetText = ViewBindings.findChildViewById(rootView, id);
if (widgetText == null) {
break missingId;
}
return new Widget4xBinding((FrameLayout) rootView, widgetBgImage, widgetText);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}

@ -0,0 +1,10 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package net.micode.notes.test;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "net.micode.notes.test";
public static final String BUILD_TYPE = "debug";
}

@ -0,0 +1,12 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package net.micode.notes;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "net.micode.notes";
public static final String BUILD_TYPE = "debug";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "0.1";
}

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "net.micode.notes",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "0.1",
"outputFile": "app-debug.apk"
}
],
"elementType": "File"
}

@ -0,0 +1,2 @@
#- File Locator -
listingFile=../../apk/debug/output-metadata.json

@ -0,0 +1,2 @@
#- File Locator -
listingFile=../../../outputs/apk/androidTest/debug/output-metadata.json

@ -0,0 +1,2 @@
appMetadataVersion=1.1
androidGradlePluginVersion=7.4.2

@ -0,0 +1,10 @@
{
"version": 3,
"artifactType": {
"type": "COMPATIBLE_SCREEN_MANIFEST",
"kind": "Directory"
},
"applicationId": "net.micode.notes",
"variantName": "debug",
"elements": []
}

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="account_dialog_title" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\account_dialog_title.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout"><Targets><Target tag="layout/account_dialog_title_0" view="LinearLayout"><Expressions/><location startLine="17" startOffset="0" endLine="42" endOffset="14"/></Target><Target id="@+id/account_dialog_title" view="TextView"><Expressions/><location startLine="23" startOffset="4" endLine="32" endOffset="45"/></Target><Target id="@+id/account_dialog_subtitle" view="TextView"><Expressions/><location startLine="34" startOffset="4" endLine="40" endOffset="33"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="activity_splash" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\activity_splash.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.FrameLayout"><Targets><Target tag="layout/activity_splash_0" view="FrameLayout"><Expressions/><location startLine="1" startOffset="0" endLine="63" endOffset="13"/></Target><Target id="@+id/textView5" view="TextView"><Expressions/><location startLine="13" startOffset="4" endLine="17" endOffset="44"/></Target><Target id="@+id/fullscreen_content" view="TextView"><Expressions/><location startLine="19" startOffset="4" endLine="28" endOffset="34"/></Target><Target id="@+id/textView" view="TextView"><Expressions/><location startLine="37" startOffset="8" endLine="41" endOffset="35"/></Target><Target id="@+id/fullscreen_content_controls" view="LinearLayout"><Expressions/><location startLine="43" startOffset="8" endLine="60" endOffset="22"/></Target><Target id="@+id/dummy_button" view="Button"><Expressions/><location startLine="52" startOffset="12" endLine="58" endOffset="53"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="add_account_text" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\add_account_text.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout"><Targets><Target tag="layout/add_account_text_0" view="LinearLayout"><Expressions/><location startLine="17" startOffset="0" endLine="31" endOffset="14"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="datetime_picker" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\datetime_picker.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout"><Targets><Target tag="layout/datetime_picker_0" view="LinearLayout"><Expressions/><location startLine="15" startOffset="0" endLine="55" endOffset="14"/></Target><Target id="@+id/date" view="NumberPicker"><Expressions/><location startLine="21" startOffset="4" endLine="27" endOffset="9"/></Target><Target id="@+id/hour" view="NumberPicker"><Expressions/><location startLine="29" startOffset="4" endLine="36" endOffset="9"/></Target><Target id="@+id/minute" view="NumberPicker"><Expressions/><location startLine="38" startOffset="4" endLine="45" endOffset="9"/></Target><Target id="@+id/amPm" view="NumberPicker"><Expressions/><location startLine="47" startOffset="4" endLine="54" endOffset="9"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="dialog_edit_text" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\dialog_edit_text.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.EditText" rootNodeViewId="@+id/et_foler_name"><Targets><Target id="@+id/et_foler_name" tag="layout/dialog_edit_text_0" view="EditText"><Expressions/><location startLine="17" startOffset="0" endLine="22" endOffset="41"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="folder_list_item" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\folder_list_item.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout"><Targets><Target tag="layout/folder_list_item_0" view="LinearLayout"><Expressions/><location startLine="17" startOffset="0" endLine="28" endOffset="14"/></Target><Target id="@+id/tv_folder_name" view="TextView"><Expressions/><location startLine="22" startOffset="4" endLine="27" endOffset="67"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="note_edit" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\note_edit.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.FrameLayout"><Targets><Target tag="layout/note_edit_0" view="FrameLayout"><Expressions/><location startLine="17" startOffset="0" endLine="411" endOffset="13"/></Target><Target id="@+id/note_title" view="LinearLayout"><Expressions/><location startLine="28" startOffset="8" endLine="66" endOffset="22"/></Target><Target id="@+id/tv_modified_date" view="TextView"><Expressions/><location startLine="33" startOffset="12" endLine="40" endOffset="77"/></Target><Target id="@+id/iv_alert_icon" view="ImageView"><Expressions/><location startLine="42" startOffset="12" endLine="47" endOffset="60"/></Target><Target id="@+id/tv_alert_date" view="TextView"><Expressions/><location startLine="49" startOffset="12" endLine="56" endOffset="77"/></Target><Target id="@+id/sv_note_edit" view="LinearLayout"><Expressions/><location startLine="68" startOffset="8" endLine="119" endOffset="22"/></Target><Target id="@+id/note_edit_view" view="net.micode.notes.ui.NoteEditText"><Expressions/><location startLine="93" startOffset="20" endLine="103" endOffset="61"/></Target><Target id="@+id/note_edit_list" view="LinearLayout"><Expressions/><location startLine="105" startOffset="20" endLine="111" endOffset="51"/></Target><Target id="@+id/btn_set_bg_color" view="ImageView"><Expressions/><location startLine="122" startOffset="4" endLine="127" endOffset="44"/></Target><Target id="@+id/note_bg_color_selector" view="LinearLayout"><Expressions/><location startLine="129" startOffset="4" endLine="241" endOffset="18"/></Target><Target id="@+id/iv_bg_yellow" view="ImageView"><Expressions/><location startLine="144" startOffset="12" endLine="147" endOffset="54"/></Target><Target id="@+id/iv_bg_yellow_select" view="ImageView"><Expressions/><location startLine="149" startOffset="12" endLine="157" endOffset="50"/></Target><Target id="@+id/iv_bg_blue" view="ImageView"><Expressions/><location startLine="165" startOffset="12" endLine="168" endOffset="54"/></Target><Target id="@+id/iv_bg_blue_select" view="ImageView"><Expressions/><location startLine="170" startOffset="12" endLine="178" endOffset="50"/></Target><Target id="@+id/iv_bg_white" view="ImageView"><Expressions/><location startLine="186" startOffset="12" endLine="189" endOffset="54"/></Target><Target id="@+id/iv_bg_white_select" view="ImageView"><Expressions/><location startLine="191" startOffset="12" endLine="199" endOffset="50"/></Target><Target id="@+id/iv_bg_green" view="ImageView"><Expressions/><location startLine="207" startOffset="12" endLine="210" endOffset="54"/></Target><Target id="@+id/iv_bg_green_select" view="ImageView"><Expressions/><location startLine="212" startOffset="12" endLine="219" endOffset="50"/></Target><Target id="@+id/iv_bg_red" view="ImageView"><Expressions/><location startLine="227" startOffset="12" endLine="230" endOffset="54"/></Target><Target id="@+id/iv_bg_red_select" view="ImageView"><Expressions/><location startLine="232" startOffset="12" endLine="239" endOffset="50"/></Target><Target id="@+id/font_size_selector" view="LinearLayout"><Expressions/><location startLine="243" startOffset="4" endLine="402" endOffset="18"/></Target><Target id="@+id/ll_font_small" view="FrameLayout"><Expressions/><location startLine="251" startOffset="8" endLine="287" endOffset="21"/></Target><Target id="@+id/iv_small_select" view="ImageView"><Expressions/><location startLine="277" startOffset="12" endLine="286" endOffset="50"/></Target><Target id="@+id/ll_font_normal" view="FrameLayout"><Expressions/><location startLine="289" startOffset="8" endLine="325" endOffset="21"/></Target><Target id="@+id/iv_medium_select" view="ImageView"><Expressions/><location startLine="315" startOffset="12" endLine="324" endOffset="50"/></Target><Target id="@+id/ll_font_large" view="FrameLayout"><Expressions/><location startLine="327" startOffset="8" endLine="363" endOffset="21"/></Target><Target id="@+id/iv_large_select" view="ImageView"><Expressions/><location startLine="353" startOffset="12" endLine="362" endOffset="50"/></Target><Target id="@+id/ll_font_super" view="FrameLayout"><Expressions/><location startLine="365" startOffset="8" endLine="401" endOffset="21"/></Target><Target id="@+id/iv_super_select" view="ImageView"><Expressions/><location startLine="391" startOffset="12" endLine="400" endOffset="50"/></Target><Target id="@+id/add_img_btn" view="ImageButton"><Expressions/><location startLine="403" startOffset="4" endLine="410" endOffset="57"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="note_edit_list_item" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\note_edit_list_item.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout"><Targets><Target tag="layout/note_edit_list_item_0" view="LinearLayout"><Expressions/><location startLine="17" startOffset="0" endLine="38" endOffset="14"/></Target><Target id="@+id/cb_edit_item" view="CheckBox"><Expressions/><location startLine="22" startOffset="4" endLine="28" endOffset="43"/></Target><Target id="@+id/et_edit_text" view="net.micode.notes.ui.NoteEditText"><Expressions/><location startLine="30" startOffset="4" endLine="37" endOffset="36"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="note_item" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\note_item.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.FrameLayout" rootNodeViewId="@+id/note_item"><Targets><Target id="@+id/note_item" tag="layout/note_item_0" view="FrameLayout"><Expressions/><location startLine="17" startOffset="0" endLine="77" endOffset="13"/></Target><Target id="@+id/tv_name" view="TextView"><Expressions/><location startLine="35" startOffset="12" endLine="41" endOffset="43"/></Target><Target id="@+id/tv_title" view="TextView"><Expressions/><location startLine="48" startOffset="16" endLine="53" endOffset="47"/></Target><Target id="@+id/tv_time" view="TextView"><Expressions/><location startLine="55" startOffset="16" endLine="59" endOffset="81"/></Target><Target id="@android:id/checkbox" view="CheckBox"><Expressions/><location startLine="63" startOffset="8" endLine="69" endOffset="39"/></Target><Target id="@+id/iv_alert_icon" view="ImageView"><Expressions/><location startLine="72" startOffset="4" endLine="76" endOffset="43"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="note_list" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\note_list.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.FrameLayout"><Targets><Target tag="layout/note_list_0" view="FrameLayout"><Expressions/><location startLine="17" startOffset="0" endLine="60" endOffset="13"/></Target><Target id="@+id/tv_title_bar" view="TextView"><Expressions/><location startLine="29" startOffset="8" endLine="38" endOffset="61"/></Target><Target id="@+id/notes_list" view="ListView"><Expressions/><location startLine="40" startOffset="8" endLine="48" endOffset="63"/></Target><Target id="@+id/btn_new_note" view="Button"><Expressions/><location startLine="52" startOffset="4" endLine="58" endOffset="41"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="note_list_dropdown_menu" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\note_list_dropdown_menu.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout" rootNodeViewId="@+id/navigation_bar"><Targets><Target id="@+id/navigation_bar" tag="layout/note_list_dropdown_menu_0" view="LinearLayout"><Expressions/><location startLine="17" startOffset="0" endLine="31" endOffset="14"/></Target><Target id="@+id/selection_menu" view="Button"><Expressions/><location startLine="24" startOffset="4" endLine="30" endOffset="57"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="note_list_footer" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\note_list_footer.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.view.View"><Targets><Target tag="layout/note_list_footer_0" view="View"><Expressions/><location startLine="17" startOffset="0" endLine="23" endOffset="51"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="settings_header" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\settings_header.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.LinearLayout"><Targets><Target tag="layout/settings_header_0" view="LinearLayout"><Expressions/><location startLine="17" startOffset="0" endLine="40" endOffset="14"/></Target><Target id="@+id/preference_sync_button" view="Button"><Expressions/><location startLine="23" startOffset="4" endLine="31" endOffset="67"/></Target><Target id="@+id/prefenerece_sync_status_textview" view="TextView"><Expressions/><location startLine="33" startOffset="4" endLine="38" endOffset="34"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="widget_2x" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\widget_2x.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.FrameLayout"><Targets><Target tag="layout/widget_2x_0" view="FrameLayout"><Expressions/><location startLine="17" startOffset="0" endLine="36" endOffset="13"/></Target><Target id="@+id/widget_bg_image" view="ImageView"><Expressions/><location startLine="21" startOffset="4" endLine="24" endOffset="45"/></Target><Target id="@+id/widget_text" view="TextView"><Expressions/><location startLine="25" startOffset="4" endLine="35" endOffset="45"/></Target></Targets></Layout>

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Layout layout="widget_4x" modulePackage="net.micode.notes" filePath="app\src\main\res\layout\widget_4x.xml" directory="layout" isMerge="false" isBindingData="false" rootNodeType="android.widget.FrameLayout"><Targets><Target tag="layout/widget_4x_0" view="FrameLayout"><Expressions/><location startLine="17" startOffset="0" endLine="38" endOffset="13"/></Target><Target id="@+id/widget_bg_image" view="ImageView"><Expressions/><location startLine="22" startOffset="4" endLine="25" endOffset="45"/></Target><Target id="@+id/widget_text" view="TextView"><Expressions/><location startLine="27" startOffset="4" endLine="37" endOffset="45"/></Target></Targets></Layout>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save