Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8213473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:07:49+00:00 2026-06-07T11:07:49+00:00

Does anyone have any idea how this can be implemented? Some examples: https://play.google.com/store/apps/details?id=gpc.myweb.hinet.net.PopupVideo https://play.google.com/store/apps/details?id=com.milone.floatwidget

  • 0

Does anyone have any idea how this can be implemented?

Some examples:

  • https://play.google.com/store/apps/details?id=gpc.myweb.hinet.net.PopupVideo
  • https://play.google.com/store/apps/details?id=com.milone.floatwidget

Any idea? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:07:51+00:00Added an answer on June 7, 2026 at 11:07 am

    That is done using an overlay on top the existing activity regardless. You can find the source found here on my github to demonstrate the proof of concept that was on android’s stackexchange.com question in which someone who suffered from a disability and could not swipe the screen to scroll and was looking for a way to do this conveniently, in which I cobbled together the code to show ‘Page Up/Page Down’ with minimum movement, just by tapping on the text (really, its a button) which overlaid on top of a activity. But due to the way Android and security worked, the scrolling event could not be injected into the currently running activity.

    The way it works is this, from the onCreate activity there’s this

    WindowManager.LayoutParams layOutParams = new WindowManager.LayoutParams(
                    WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
                    WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
                    PixelFormat.TRANSLUCENT);
    

    The flag that is needed is WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY and WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH.

    The onus is to ensure that the touch is being handled which means watching out when the touch event ‘hits’ on a area and to act accordingly. By “listening” in on the View’s onTouch event, that is:

    LayoutInflater layOutInflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
    View myView = layOutInflater.inflate(R.layout.myview, null);
    
    myView.setOnTouchListener(new OnTouchListener(){
        @Override
        public boolean onTouch(View v, MotionEvent event) {
          ....
        }
    });
    

    For example, imagine a button within that myview layout, so using a button widget,

    Button myButton = (Button)myView.findViewById(R.id.myButton);
    Rect outRectHit = new Rect();
    myButton.getHitRect(outRectHit);
    

    Now we need to determine the ‘collision’ of the boundaries of the touch, which happens inside the onTouch handler:

    float x = event.getX();
    float y = event.getY();
    if (x > outRectHit.left && x < outRectHit.right &&
        y > outRectHit.top && y < outRectHit.bottom){
         ... Handle this accordingly
    }
    

    This brief summary explains how to do such a thing as an overlay on-top of any activity.

    Just to make sure, that the code gets debugged and does not interfere in any shape or form with any activity shown. For example, what happens if the activity is in fact a OpenGL game, what do you do?

    That is to illustrate what needs to be watched out for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any idea what this jQuery selector will do? object.find('td:eq(1) div div');
Does any one have any idea why this would be happening? This is some
Does anyone have any idea on how can you create a product filtering query
Does anyone have any idea if you can find source JARs on Maven repositories?
Does anyone have any idea how to change the thickness of the text pointer
Does anyone have any idea when Microsoft might be dropping another Silverlight 4 public
In datasets there was a method WriteXml or ReadXml Does anyone have any idea
I need to archive data from a CRM system. Does anyone have any idea
DOes anyone have any good information with regards to when to log, I was
Does anyone have any tips that could help speed up a process of breaking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.