Giter Site home page Giter Site logo

screenshade's Introduction

ScreenShade

Current Design

Link to Play Store

ScreenShade is an app I created to experiment with overlays and animations. The effect is most pronounced on phones with OLED screens, which provide deeper blacks.

I implemented the TapTargetView library for guiding the user through the basic elements of the app.

Getting Started

To enable the overlay, single tap the floating button.

Once the overlay is covering the screen, double tap the screen or hit the back button to hide the overlay.

You can peek behind the shade overlay by tapping and holding the screen.

The floating button can be removed by dragging it to the bottom of the screen.

App Details

The minimum Android SDK version is 23.
The "draw over apps" permission is required to run.

How it works

Screen Shade is able to create Views that persist between apps by adding Views to the Window Manager system service. When the enable button in the main activity is clicked, a service is started that handles all of the logic and overlay creation.

The Window Manager

The WindowManager is an extension of the ViewManager, which has three methods available for use:

  • addView()
  • updateViewLayout()
  • removeView()

These methods provide no exception/error handling by themselves (ex: in the case of adding a view twice, or removing a view that is not yet added to the window manager). For this reason, I created an Overlay class that would handle these methods safely and abstract away functionality shared between the various overlays in this app.

OverlayService and OverlayManager

When the app is started, an instance of an OverlayService is created, which holds an instance of OverlayManager, which supervises the various overlays and handles their interactions.

screenshade's People

Contributors

armpatch avatar

Stargazers

Alex avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

tttt55

screenshade's Issues

Button Press

floating button should change state when it is being pressed, instead of when it starts to move

Landscape View Bug

Shade does not display correctly in landscape. the window height and width are flipped, and it only covers half of the screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.