Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating bodyless activity

Currently I am trying to make an activity that can be moved on the screen , in other words this activity can float on the screen. I know I am missing something that should be added to achieve this functionality.

What should I do to achieve floating activity which can be moved around anywhere on the screen?

like image 413
Umer Farooq Avatar asked Aug 20 '13 17:08

Umer Farooq


1 Answers

If you're looking to do something similar to the Facebook chat circles (where you have a view on top of other apps) then take a look here: http://www.cloudinfy.com/2013/06/android-chat-head-view-like-in-facebook.html

Basically you need to start a service and add a view to the window manager.


If you're looking to simply create an activity to look like a dialog then have a look here: Android Activity as a dialog

This is very similar to a normal activity but the theme is set to Theme.Dialog

like image 102
Randy Avatar answered Oct 01 '22 18:10

Randy