title: showing some view in all activities without duplication of code in Android
body: <p>I have a condition when a specific event will  occur in background, I have to show a Floating Action Button in bottom of activity to notify the user if App in fore ground. No matter in what activity the  user is, if that event trigger by a service, I have to show a FAB not a dialog, I mean user can interact with activity and FAB both at the same time. How could I achieve this if I do not wanna repeat the same code in all activities of my app.</p>