1

I want to make a button that float on homescreen and also work if any other activity is in running. i have tricked many ideas and also google vary much but i can't get still any solution..

for example i have tried to make my application transparent and full screen and as a system alert flag from this stackoverflow question: Creating a system overlay window (always on top)

@Override

protected void onStop(){

    super.onStop();
    Intent intent = new Intent(this, ClassNameOfYourActivity.class);
    startActivity(intent);
}

and also tried to start my activity at every movement but it is very bad idea like this: can't get any idea of doing this...Hopefully requested to share me any idea or example if you have experienced about this... thanzzzz in advance..

Community
  • 1
  • 1
WonderSoftwares
  • 2,620
  • 1
  • 12
  • 19
  • In iOS we just add a view to the window, so that it is visible on every view controller. I think there should be same kind of work around for Android. I am also searching for this for a while now. – Salman Khakwani Aug 19 '13 at 13:18
  • I would use one `MainActivity` which will hold the button and add / remove Fragments for other "windows" of your application. – hardartcore Aug 19 '13 at 13:21
  • 1
    @SalmanKhakwani thnx... i don't know about ios but your suggestion may be useful to get new ideas... – WonderSoftwares Aug 21 '13 at 05:05
  • @user2452189 my pleasure :) – Salman Khakwani Aug 21 '13 at 05:06
  • @Android-Developer fragment is also good idea..thnx for that but i would like to know is can this fragment class use for **whole system???** I mean can we see and use this fragment either on homescreen or any of another application are running??? See this is demo application what i need (https://play.google.com/store/apps/details?id=com.shere.easytouch) – WonderSoftwares Aug 21 '13 at 05:27

0 Answers0