More icon and alert window changes.
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 155 KiB |
@ -35,15 +35,18 @@ public class AlarmAlertActivity extends Activity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
Window window = getWindow();
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
|
||||||
|
| WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
|
||||||
|
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
|
||||||
|
| WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||||
|
);
|
||||||
setContentView(R.layout.alarm_alert);
|
setContentView(R.layout.alarm_alert);
|
||||||
|
|
||||||
// Disable any current notifications
|
// Disable any current notifications
|
||||||
stopService(new Intent(getApplicationContext(), AlarmNotify.class));
|
stopService(new Intent(getApplicationContext(), AlarmNotify.class));
|
||||||
|
|
||||||
Window window = getWindow();
|
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
|
|
||||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON |
|
|
||||||
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON );
|
|
||||||
|
|
||||||
// Turn off the alert activity, and switch to a notification
|
// Turn off the alert activity, and switch to a notification
|
||||||
timer.schedule(new TimerTask() {
|
timer.schedule(new TimerTask() {
|
||||||
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 64 KiB |
@ -1,37 +1,40 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".AlarmNotificationActivity">
|
tools:context=".AlarmNotificationActivity">
|
||||||
|
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:id="@+id/cancel_dialog_imageView"
|
<ImageView
|
||||||
android:src="@drawable/hypoalarm"
|
android:layout_width="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:id="@+id/cancel_dialog_imageView"
|
||||||
android:layout_marginTop="60dp"/>
|
android:src="@drawable/hypoalarm"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="60dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:text="HypoAlarm!"
|
android:text="HypoAlarm!"
|
||||||
android:id="@+id/cancel_dialog_title"
|
android:id="@+id/cancel_dialog_title"
|
||||||
android:layout_below="@+id/cancel_dialog_imageView"
|
android:layout_below="@+id/cancel_dialog_imageView"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="25dp" />
|
android:layout_marginTop="25dp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="I'm awake"
|
android:text="I'm awake"
|
||||||
android:id="@+id/cancel_dialog_button"
|
android:id="@+id/cancel_dialog_button"
|
||||||
android:layout_marginTop="25dp"
|
android:layout_marginTop="25dp"
|
||||||
android:layout_below="@+id/cancel_dialog_title"
|
android:layout_below="@+id/cancel_dialog_title"
|
||||||
android:layout_centerHorizontal="true" />
|
android:layout_centerHorizontal="true" />
|
||||||
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</FrameLayout>
|