Calculator Overlay

This commit is contained in:
Sergey Solovyev
2012-11-21 12:16:33 +04:00
parent 3dd73efaea
commit 75b60e7390
4 changed files with 41 additions and 0 deletions

View File

@@ -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);