|
|
@ -46,11 +46,14 @@ public class AlarmAlertActivity extends Activity implements OnClickListener, OnD
|
|
|
|
private static final int SNIPPET_PREW_MAX_LEN = 60;
|
|
|
|
private static final int SNIPPET_PREW_MAX_LEN = 60;
|
|
|
|
MediaPlayer mPlayer;
|
|
|
|
MediaPlayer mPlayer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 创建提醒窗口实现方法
|
|
|
|
|
|
|
|
* @param savedInstanceState Bundle 类型的数据与 Map 类型的数据相似,都是以 key-value 的形式存储数据的
|
|
|
|
|
|
|
|
* saveInstanceState 是用来保存 Activity 的状态的
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
|
|
|
|
|
|
|
|
// Bundle类型的数据与Map类型的数据相似,都是以key-value的形式存储数据的
|
|
|
|
|
|
|
|
// saveInstanceState是用来保存Activity的状态的
|
|
|
|
|
|
|
|
super.onCreate(savedInstanceState); // 能从onCreate的参数saveInstanceState中获得状态数据
|
|
|
|
super.onCreate(savedInstanceState); // 能从onCreate的参数saveInstanceState中获得状态数据
|
|
|
|
requestWindowFeature(Window.FEATURE_NO_TITLE); // 显示无标题界面
|
|
|
|
requestWindowFeature(Window.FEATURE_NO_TITLE); // 显示无标题界面
|
|
|
|
|
|
|
|
|
|
|
@ -76,7 +79,7 @@ public class AlarmAlertActivity extends Activity implements OnClickListener, OnD
|
|
|
|
: mSnippet;
|
|
|
|
: mSnippet;
|
|
|
|
// 判断标签片段是否达到符合长度
|
|
|
|
// 判断标签片段是否达到符合长度
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace(); // 输出异常信息
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|