title: Floating view inside an app
body: <p>I am trying to achieve a floating draggable view that will be displayed across all the activities of a single app.<br>
  Meaning there will be a view of 30% height and 50% width of the screen that the user will be able to drag on the screen and it will be drawn above any activity in the app. When the user will switch to another activity within the same app the floating view should remain in the same place.  </p>
  
  <p>I know it is possible using <code>SYSTEM_ALERT_WINDOW</code> permission, which I want to avoid because this view is only required to be displayed within the app and I don't want the users to be asked to approve such permission.</p>
  
  <p>Another important point:<br>
  This view is going to be part of an SDK.<br>
  Meaning that I am not responsible for the activities/fragments/layouts of the app.<br>
  I can have/assume:</p>
  
  <ul>
  <li>Base Application that the hosting app will subclass</li>
  <li>All the root layouts have some identifier and are of some specific type (e.g. all the root layouts are <code>RelativeLayout</code> and have an id <code>root_layout</code>)</li>
  </ul>
  
  <p>Similar questions that was asked 4-6 years ago with 0 satisfying answers:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/21465614/floating-view-over-the-whole-application">Floating view over the whole application</a> </li>
  <li><a href="https://stackoverflow.com/questions/11045746/android-floating-view-across-activities">Android floating view across activities</a></li>
  </ul>