0 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд

Screen Off Animation

Screen Off Animation

Add swipe gestures to any Android, no root

One handed mode

Make your phone easier to use with one hand, no root

XDA Forum App

The best way to access XDA on your phone

XDA Labs

An app store for independent developers

Hyperion Launcher

A sweet, feature-filled launcher with a beautiful UX.

Sites we like


XDA’s official marketplace for buying and selling tech




This module is an experiment to bring custom screen off animation to all ROMs without modifying native codes.
As of v1.2, it added screen on animation too.

• Ensure you have a custom recovery ready to flash Xposed-Disabler-Recovery.zip.
(If anything goes wrong while booting, you can always flash it, reboot & disable this module)
• Install ScreenOffAnimation
• Enable ScreenOffAnimation in Xposed Installer
• Reboot
• Turn off your ROM’s native screen off animation (if any)
• Turn off your ROM’s native screen on animation (if any)
• Change the settings in the module to your likings!

Note: All the animations are not ported (but recreated) from ROMs because the implementation is different, so there might be slight visual differences from the original.

Video is based on the pre-release version on v1.0. Improvements have been made to some animations.

In the Attachments

Source Code
This module is open-source, licensed under GPLv3. The source can be found here
• Developers: You may contribute by sending pull-requests or opening an issue on Github with coding tips.
• Translators: You may contribute your translations by sending pull-requests or posting the file in this thread.
(Do a search to see if others have already translated to your language before doing so).
The latest English version can be found here.

How Does It Work?

This module does the following for screen off animation:
• Before the screen off method, add our code
• Grab the screenshot
• Add a black view to the screen
• Add the screenshot we grabbed
• Animate the screenshot on the black view
• Once the screenshot is completely out of the screen, call the native code to turn off screen

This module does the following for screen on animation:
• After the screen on method, add a black screen
• Animate the black screen out

(This is simplified. You may see the actual source code to have a better understanding)

• Mirror Download: My Google Drive (If you want to mirror my files, I’m fine as long as you link back also to this original thread)

This should work on all ROMs on Android 4.0 to 4.4 except those mentioned below
Gingerbread Support?
I do not plan to add Gingerbread support. This module relies on native code (to screenshot the screen) which was only added in ICS & above
However, if anybody knows a simple way to screenshot the screen in Gingerbread, feel free to contact me.
Bugs with ROMs Screen On Animation doesn’t work properly on these ROMs
• TouchWiz
• Color OS
• Android 4.1.2 and below
Screen Off Animation doesn’t work properly on these ROMs
• TouchWiz (with S View Cover)Turning off the screen with the S View Cover closed will not turn off the screen until you open it again. More Info Here

Version 1.3 (22 October 2014 / 1705 / GMT+8)

• Main Changes + Fixes:
—> Prevent duplicated Screen On Animation
—> Fix screen on Fade Tiles restarting halfway (seen in Fade Tiles)
—> Try to disable native screen off animation on Android 4.2.1 and below
—> Add Vertu Sig. Touch Screen On + Off Animation
—> Add Android 5.0 Lollipop Fade Screen Off Animation

• Code Refactoring:
—> Simplify Animation Listener codes
—> Integrate interval codes into a new SeekBar class
—> Add helper methods to improve code readability
—> Tiny optimization to screenshot code

• Translations:
—> Update Polish translation (by @godlesplay)
—> Update Hungarian Translation (by @szunyi77)
—> Update French Translation (by [email protected] / @jose404)
—> Update Chinese (China & Taiwan) Translation (by @Pocket Fan)

Version 1.2 (16 June 2014 / 1535 / GMT+8)
• Main Changes:
—> Add Screen On Animation (see Note below)
—> Add Random Animation Option
—> Add new sliding ui for screen on animations
—> Prevent some cases of screen off animation when turning on screen + Possible fix for S View cover bug (not tested)

• Translations:
—> Update Polish translation (by @godlesplay)
—> Update Hungarian Translation (by @szunyi77)
—> Update French Translation (by [email protected])
—> Update Chinese (China) Translation

• Code Refactoring:
—> Rename the helper method to finish animation
—> Refactor screen off methods to make way for screen on methods
—> Move ScreenOff.Implementation out into another class
—> Reduce some errors
—> Small UI Changes
—> UI Changes to make way for screen on animation

Читать еще:  сообщение конфигурации

Version 1.1.1 (2 June 2014 / 1150 / GMT+8)
• Add FadeTiles Screen Off Animation
• Move interpolator out of scale_down.xml (Code Refactoring)
• Prevent duplicated animations when one is already showing
• Add Spanish Translations (by @badkill)
• Add German Translation (by @AssaSsiNMiLeS)
• Add Hungarian Translation (by @szunyi77)

Version 1.1.0 (31 May 2014 / 1050 / GMT+8)
• Fix a possible system crash
• Fix animation not showing for screen timeout on Android 4.2.1 & above
• Reduce excess logging to Xposed Installer
• Change minimum speed 100ms
• Change Speed Bar to intervals of 10ms
• Tweak CRT animations
• Add attempt to auto-disable native screen off animation for Android 4.2.1 & above
• Add French Translation (by @jose404)
• Add Italian Translation (by @teorouge)
• Add Portuguese (Portugal) Translation (by @mauam)
• Add Portuguese (Brazil) Translation (by @zanini007)
• Add Polish translation (by @godlesplay)

Version 1.0.3 (26 May 2014 / 1840 / GMT+8)
• Rewrote hooks (should fix some JB devices not loading at all)
• Improve Context retrieving (should fix Preview function not working)
• Improve hooks on Android 4.2.1 and below
• Tweak the delay before removing the black view (should fix flickering after animating)
• Fix Navigation Bar still showing while animating on Android 4.4
• Add Chinese (China+Taiwan) Translations (by @Pocket Fan)

Version 1.0 (25 May 2014 / 1340 / GMT+8)
• First Release

Это видео недоступно.

Очередь просмотра


  • Удалить все
  • Отключить

How to Change the Screen Off and On animation on Android Mobile Without ROOT

Хотите сохраните это видео?

  • Пожаловаться

Пожаловаться на видео?

Выполните вход, чтобы сообщить о неприемлемом контенте.

Понравилось видео?

Не понравилось?

Текст видео


You might have a smart mobile phone and you wanted to customize it as you become bored with the old looks of the phone so you must have changed the appearance of the phone and made it better but did you ever imagined or have a desire to change your screen ON and OFF animation as the default one is old looking and annoying so this video is for you.

If you are running an android phone that is lollipop or above then this trick will work without root.

Note that this only works with root access on Android 4.0.3 up to Android 4.4 . Download apk http://bit.ly/1yIOkVp

Hello friends today in this video tutorial i will be going to show you how to change the screen off and screen on animation in your android device without root.

Firstly download xposed installer for android 5 (lollipop or higher) https://goo.gl/Q5jCqV

Then install the latest framework and read the warning before carrying forward in some cases you mobile phone might not boot again so do this trick at your own risk. I am and will not be held responsible for any damage caused to your phone if any.

Then in the menu go to download and then search for screen off animation and install the first one that appear in front of you.

Then again go to the menu and head towards the modules section and turn screen off animation on by clicking on the check box.

Then open up the app by the app drawer and here you can see a lot of options to change the screen off and on animations.

So this is the simple trick to change the screen on and screen off animations.

So friends that’s all for today’s video i hope you enjoyed it so please don’t forget to LIKE this video SUBSCRIBE my channel and SHARE this video as much as you can and if you have any queries related to this trick please let me know in the COMMENTS below.

Выбираем приложение для управления android-устройством: smartWake, Smart Screen On/Off и DTSO (страница 2)

Страницы материала

Smart Screen On/Off


Начало работы

При первом запуске утилита Smart Screen On/Off запросит права администратора, разрешение на отрисовку элементов поверх системных и парочку других разрешений. Это, впрочем, стандартный процесс для подобного рода приложений, иначе у них не было бы таких возможностей по взаимодействию с системой и ее компонентами.


В основном разделе у нас располагаются следующие функции: «Shake Sensor», «Proximity Sensor», «Pocket Sensor» и «Smart Flip Cover». Думаю, по названиям вы уже поняли возможности каждой из них. Тем не менее, краткий рассказ не помешает.

Благодаря опции «Shake Sensor» мы сможем разблокировать и блокировать устройства встряской. Просто задаем количество «сотрясений» гаджета (от одного и до шести), и он выполняет указанное нами действие.


Помните, как в одной популярной рекламе показывали, что мы будем взаимодействовать с мобильным, не прикасаясь к его экрану? Хоть и отчасти, но это свершилось.

Теперь для разблокировки и блокировки дисплея достаточно провести ладонью над ним. Естественно, это становится возможным благодаря датчику приближения (возможно, в паре с датчиком освещения), который отслеживает и преобразует наши действия.

Еще есть опция «Pocket Sensor», позволяющая автоматически блокировать телефон ложа его в карман или экраном вниз. Это уже зависит от настроек и версии самого приложения.

«Smart Flip Cover» позволит использовать соответствующий чехол, «Double Tap Screen OFF» будет выключать экран по соответствующему жесту и далее по списку.

И чтобы процесс включения и выключения устройства не был таким однообразным, нам предлагается установить соответствующие анимации и звуковые эффекты. Это мне напомнило аналогичные параметры в старых прошивках CM. Очень необычно сейчас увидеть анимацию блокировки экрана в стиле выключения старого телевизора.

К сожалению, визуализировать вышеуказанное мне не удалось, поэтому стоит просто довериться моим словам, либо проверить сказанное уже на практике.


Настроек в приложении Smart Screen On/Off немного: автоматический запуск программы при включении устройства, активация уведомлений, вибрация при включении/выключении и пара дополнительных опций.

Читать еще:  Виртуальная реальность близко – обзор очков виртуальной реальности VR Shinecon



Проблем с использованием Smart Screen On/Off не фиксировалось. Программа довольно-таки правильно отвечала на встряску, магическое проведение ладошкой над экраном и прочие функции. К тому же, практически у каждого из параметров были настройки по корректированию действий, что добавляет точности при срабатывании.

Порадовал низкий расход аппаратных ресурсов: приложение потребляет около полусотни мегабайт ОЗУ, что, поверьте, не так уж и много для подобного рода решений. Но вот расход заряда АКБ… Если активировать все функции и активно пользоваться аппаратом, то программа в итоге будет расходовать 5-10%, как в случае со стендовым устройством. Многое зависит и от количества включений/выключений с ее использованием.


Smart Screen On/Off – интересная программа, предлагающая множество параметров для разблокировки/блокировки устройства и настроек работоспособности. Она стабильно и довольно точно распознает наши действия и не доставляет лишних проблем при использовании. И в этом отличается в лучшую сторону от своих аналогов.


Скачать Smart Screen On/Off
для android-устройств
из Google Play

Chuan Ji

Technical Notes

Disabling Screen-Off Animation In Android

I am impressed by the amazing progress Android’s UI has made since its inception. With each iteration, likewise in software as in hardware, its usability and aesthetics have steadily improved to the point where I can now confidently buy one for my mom to replace the iPhone I recommended to her only last year.

On the other hand, one particular «feature» I intensely dislike is the screen-off animation that emulates the brief white flash you see when an old CRT TV monitor is powering off. Introduced in Gingerbread (2.3), it seems not to bother most people as much as it bothers me, and even seems to be quite popular (e.g., this thread).

I was glad to learn though that a number of people find it as annoying as I do, for example in this thread and this bug.

As a CyanogenMod fan, I was quite happy with the straightforward checkbox in the Settings app in CyanogenMod 9 that toggled whether to play this animation. In CM10, this option was removed, but there was an easy hack involving changing window animation scale in the developer settings, as explained in the second link above.

So when I updated to CM10.1 M1, I was very unpleasantly surprised to find that this hack does not work any more either. I tried to immediately downgrade to CM10, but then discovered that doing so requires a full data wipe (of course…). A quick search pulled up this thread which proposes a simple prop edit, but the following posts in the thread suggest mixed results.

So, stuck with CM10.1, and really disgusted at this turn of events, I finally decided to put on my hax0r gloves and get this annoying «feature» out of my face once and for all.

Poking Around

I went to androidxref.com and started searching the Android source code for «screen off animation». (OK, I actually started out with grep, but it didn’t take me long to realize androidxref.com was about sixty million times faster — it’s really pretty cool.)

I quickly found why changing the window animation scale in Jelly Bean 4.1 (and CM10) disables the screen-off animation. The two snippets of of code implementing this behavior are at line 470 and line 2228 of PowerManagerService.java .

In Jelly Bean 4.2 (and CM10.1), however, these parts of the code have been completely refactored. The snippet of code that launches the screen-off animation is now found at line 704 of DisplayPowerController.java . Note that this new DisplayPowerController class has been factored out of the old PowerManagerService class, and both have moved into a separate power sub-directory.

The Hacking

Disclaimer: I am NOT responsible for anything that happens to your phone or you or your house or your relationship with your wife if you follow the instructions down here. If you don’t know what you’re doing and are scared of bricking your phone, just give up and go watch Superbowl. Please.

What did not change, I found, is that this code gets packaged into /system/framework/services.jar on the Android system. So, let’s take a look at this file as found in the CM10.1 image on my phone:

( apktool is a tool that extracts and disassembles Android APK/JAR files, and is available for Linux, Windows and OS X.) This produces a directory, services.jar.out , which contains the disassembled code of services.jar we just pulled from a connected phone. I dived into the DisplayPowerController code and edited the else clause at line 704 to essentially just say setScreenOn(false); directly instead of running the animation first. If you look at the dissassembled code, you’d realize Dalvik bytecode is really quite readable and easy to hack, especially since the line number hints allow you to directly map a line in the Java source code to the corresponding Dalvik instructions. I just had the Java source file on androidxref.com open in a browser tab for reference and killed instructions line by line. You can download my patch here and apply it like this:

(For CM10.1 nightlies (after the MR1.1 merge) and CM10.1 M2, use this patch instead. The same piece of code was shuffled around to line 777. For CM10.1 M3, use this patch instead.)

Now re-assemble the code and push it back on to the device:

When the phone reboots, it will say Android is upgrading and will rebuild Dalvik cache for each application, so it might take a while. But hey, it’s worth it.

Parting Words

The final product, if you just want to replace the services.jar on your phone, is here:

CyanogenMod 10.1 M1 — tested on Galaxy Nexus (maguro) and Nexus S (crespo), should work on other phones as well (can’t promise — let me know):

CyanogenMod 10.1 M2 — tested on Galaxy Nexus (maguro), should work on other phones as well (can’t promise — let me know):

Читать еще:  Обзор Vontar i8 — беспроводная мини клавиатура с хорошим списком возможностей

CyanogenMod 10.1 M3 — tested on Galaxy Nexus (maguro), should work on other phones as well (can’t promise — let me know):

CyanogenMod 10.1 RC1 — tested on Galaxy Nexus (maguro), should work on other phones as well (can’t promise — let me know):

Stock 4.2.2 (takju/JDQ39) — for «takju» factory image from Google

Note: use this to replace services.odex , not services.jar !

Stock 4.2.2 (yakju/JDQ39) — for «yakju» factory image from Google

Change Screen Off Animation on Android

Android being open source in nature has provided us with tons of customisation and personalisation features. And if you are using a rooted android device then there is probably nothing that you can’t customize. Many of the android users just love some aspects of a phone but you can’t get all the features of a phone to some another. Or can you? Here in this tutorial, we will be discussing one such customisation feature which you can integrate into your Android smartphones.

Some devices like the Nexus 5, Sony Xperia Z3 and LG G3 have awesome lock animations or, as many people say screen-off animation. And it is very simple to get the same on almost all the Android devices.

What will you need to Change the screen off animation:

  • Rooted android device. (Check out how to root your android device).
  • Xposed Framework (Xposed is a framework for modules that can change the behavior of the system and apps without actually changing any of the system files or existing apks).

How to change the screen off animation:

Step 1: First of all you need to download and install Xposed installer on your rooted Android smartphone.
(You can grab Xposed Framework from this website. Choose Xposed Installer in the ‘select a page’ drop down list.)

Step 2: Now you will need to go to the Framework menu and tap on Install/Update. You will get a warning before installing, just tap on OK and proceed.

Step 3: Grant Superuser request to the app and the installation will be done. Reboot the device and you’re good to go.

Step 4: Now in the download option in the Xposed application, search for “ScreenOffAnimation”.

Step 5: Download and install this module. In the Xposed app you need to go to the Modules option and select the ScreenOffAnimation module.

Step 6: Reboot your device for the last time for everything to work.

In screen off animation you have multiple options for screen off animation like the one in Nexus 5 and other fancy animations like CRT and fading tiles too.

Note: Xposed may not be currently supported on your device. So in case you are seeing a message that says so, you might have to wait.

Wasn’t changing screen off animation on your rooted android device easy? For more such tutorials subscribe to ReadMeNow. If you have any queries related to the tutorial, do let us know in the comments section below.

Think Android

Examples, Code, and Tutorials // jwei

Handling Screen OFF and Screen ON Intents

Haven’t posted in a while – sorry school has been busy. Any who, this little code snippet/example will be on how to deal with the Intent.ACTION_SCREEN_OFF and the Intent.ACTION_SCREEN_ON, which will come in nifty if you’re making an application that might need to save state or respond to the user’s screen going to sleep/waking up, etc.

First, unlike other broad casted intents, for Intent.ACTION_SCREEN_OFF and Intent.ACTION_SCREEN_ON you CANNOT declare them in your Android Manifest! I’m not sure exactly why, but they must be registered in an IntentFilter in your JAVA code. And so, for this example we are going to have a receiver called ScreenReceiver, and I’m going to walk you through the differences between implementing it in a Service vs. in an Activity.

So, the receiver will simply look like:

Now, the first example will be for an Activity. Because of the life-cycle of an Activity, an Activity is actually easier to deal with as right before the screen turns off onPause() is called and right when the screen turns on onResume() is called, and so naturally we will handle the screen on/off events here:

Now, note that in my onPause() and onResume() methods I run a check to see that the method was called DUE TO A SCREEN STATE CHANGE. This is important as often onPause() or onResume() will get called because of other reasons – i.e. a new activity is being started on top of this one, or an incoming call might be coming in, etc – and you want to make sure that your screen change logic is only called when the screen has actually changed.

Now, something to keep in mind, is that the order of events before the system screen turns off is:

Which is a little unintuitive as you’d think the receiver would get hit first – and so when you play around with setting booleans, etc, be aware of this little fact, and likewise when the screen turns on the order of events is:

And so again the order of events seems a little “backwards”.

Now, for a Service, it’s a little bit different since there is no onResume() or onPause() that gets called as the Service is always “running” in the background, and so instead what you’re going to have to do is modify your receiver a little to look like:

And your service will look like:

And so this is pretty self explanatory. When the screen state changes, it will notify your ScreenReceiver and from there you can set the state information into an Intent and send that data to your Service which can then handle it appropriately.

Hopefully this was useful. Let me know if you have questions.

Ссылка на основную публикацию
Статьи c упоминанием слов: