diff --git a/calculatorpp/res/layout/overlay_footer.xml b/calculatorpp/res/layout/overlay_footer.xml
new file mode 100644
index 00000000..408d9eb4
--- /dev/null
+++ b/calculatorpp/res/layout/overlay_footer.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/calculatorpp/res/layout/overlay_header.xml b/calculatorpp/res/layout/overlay_header.xml
new file mode 100644
index 00000000..33eb693a
--- /dev/null
+++ b/calculatorpp/res/layout/overlay_header.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/calculatorpp/res/layout/overlay_layout.xml b/calculatorpp/res/layout/overlay_layout.xml
index 0d5bb932..d13759a6 100644
--- a/calculatorpp/res/layout/overlay_layout.xml
+++ b/calculatorpp/res/layout/overlay_layout.xml
@@ -4,6 +4,8 @@
a:orientation="vertical"
style="@style/cpp_widget_main_layout_style">
+
+
+
+
\ No newline at end of file
diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/overlay/CalculatorOverlayService.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/overlay/CalculatorOverlayService.java
index db14013d..5d67bb6c 100644
--- a/calculatorpp/src/main/java/org/solovyev/android/calculator/overlay/CalculatorOverlayService.java
+++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/overlay/CalculatorOverlayService.java
@@ -68,6 +68,13 @@ public class CalculatorOverlayService extends Service implements ExternalCalcula
}
}
+ view.findViewById(R.id.overlay_close_button).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ stopService(new Intent(getApplicationContext(), CalculatorOverlayService.class));
+ }
+ });
+
final WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
wm.addView(view, params);