Are you tired of constantly pressing the physical power button on Xiaomi Redmi to lock the screen? Or has it started to jam after a year of active use? Adding a virtual lock button to the home screen or notification panel can save time and extend the life of mechanical keys. In this article, we will examine all the working methods, from standard MIUI functions to hidden features that are not written in the official manuals.
It's important to understand that the methods vary depending on the firmware version. For example, in MIUI 13 and later, some of the functions are moved to the Special Features section, and in older versions they can be in Settings β Screen. We tested the instructions on the Redmi Note 10 Pro, Redmi 9T and POCO X3 Pro models - all of the methods work stably if you follow the exact steps.
If you use custom firmware like LineageOS or Pixel Experience, some menu items may be missing, in which case we recommend skipping the standard settings section and jumping right to alternative solutions.
1. Standard method: lock widget in MIUI
The easiest method is to use the built-in Screen Lock widget, which is available in MIUI since version 12, which is added as a regular widget to the home screen and works without root rights or additional applications.
To activate it:
- Press and hold the empty space on the main screen.
- At the bottom of the screen, a menu will appear β select Widgets.
- Scroll through the list to the Tools section and find the Lock widget (lock icon).
- Drag it to a free space on the screen.
Now, if you click on this widget, the screen will lock instantly. Please note that the widget only works on the home screen and in folders, but not in the notification panel or on the lock screen.
The widget is displayed on the screen|When pressed, the screen is locked.|No delay in blocking|The widget does not disappear after the reboot-->
β οΈ Note: On some models (Redmi) 8A, Redmi 7) widget may be missing. This is due to optimization MIUI For budget devices, then move on to the next method.
2 Quick Ball β Hidden MIUI function
Quick Ball is a floating button that appears on top of any application and allows you to quickly perform actions, including locking the screen. It is hidden in special features settings, but works on all Xiaomi and Redmi devices with MIUI 10 and above.
It's activated like this:
- Open Settings β Special Opportunities β Physical Opportunities β Fast Ball.
- Switch the slider to the position on.
- Click on Quick Ball Settings and select βBlockβ in the action list.
- Set the position of the ball on the screen (left or right) and its transparency.
Now, if you tap the floating ball, you'll see a menu where you can lock the device with one tap, and the advantage of this method is that the button is available from any application, even in full screen mode.
| Advantages | Deficiencies |
|---|---|
| It works on top of all applications. | Takes up screen space. |
| Doesn't require root rights | Maybe accidentally click in games. |
| Customizable appearance | Not present on some custom firmware |
Physical power button|Widget on the main screen|Quick Ball (floating button)|Gesture or double-press|Other-->
3. Gesture blocking: double touch or swipe
If you don't want to load the screen with extra elements, you can set up the lock with gestures. MIUI has two built-in options:
- π Double touch β locking when double pressing on the empty space of the main screen.
- π Swipe down β locking when holding two fingers from the top edge of the screen down (similar to closing the notification curtain, but with locking).
To activate the double touch:
- Go to Settings β Screen β Double touch to lock.
- Turn on the option and select the delay (recommended Average for balance between speed and random positives).
To set up the swipe:
- Open Settings β Lock and Protection β Additional settings β Lock gesture.
- Select βSwipe downβ and save the settings.
β οΈ Note: The swipe gesture may conflict with some launchers (like Nova Launcher or Apex Launcher).If the lock doesn't work, go back to the standard launcher. MIUI.
π‘
If double-tapping works too often, increase the delay in settings or turn off the feature for specific applications (such as games or readers).
4. Third-party applications for screen locking
If the built-in methods donβt work, you can use apps from Google Play, which offer additional features, such as:
- π TapTap Lock β Double-press lock anywhere on the screen, including games.
- π±οΈ Gravity Screen - automatic lock when putting the phone in your pocket or on the table (using a proximity sensor).
- π± Lock Screen Widget β Widget with advanced settings (for example, locking by timer).
Installation of TapTap Lock (the most popular solution):
- Download the app from Google Play.
- Run it and grant permission for Special Features (required to work on top of other applications).
- In the settings, select βDouble Pressβ and adjust the sensitivity.
- Add the app to autoboot so that it works after the device is restarted.
Third-party apps have the advantage of being flexible, for example, in Gravity Screen you can set up locking when you:
- Putting the phone in your pocket (according to the proximity sensor).
- Delay the screen down to the surface.
- Connecting to a Bluetooth device (e.g., a car).
How to disable advertising in free versions of applications?
5. Advanced method: blocking through ADB (no root)
If youβre ready to dive a little into the technical details, you can add a lock button to the notification bar via ADB. This method doesnβt require root rights, but will require connecting the phone to a computer.
Instructions:
- Turn on USB Debugging on your phone: Settings β About Phone β MIUI Version (click 7 times to become a developer) β Settings β Additional β Developers β Debugging on USB.
- Connect the phone to the PC and confirm the debugging permission.
- Download ADB Tools and open the command line in the folder with adb.exe.
- Enter the command: adb shell settings put global settings_system_navigation_bar_buttons "$(settings get global settings_system_navigation_bar_buttons),lockscreen"
- Reboot the phone.
Then the notification bar will have a lock button. To remove it, use the command:
adb shell settings put global settings_system_navigation_bar_buttons "$(settings get global settings_system_navigation_bar_buttons | sed 's/,lockscreen//')"β οΈ Attention: Misuse of the right ADB This may cause system failures. Before executing commands, back up your data through Settings. β Additionally. β Backup and reset.
π‘
The ADB method is suitable for power users and allows you to add a lock button to the notification curtain without installing additional applications.
6. Lock on custom firmware (LineageOS, Pixel Experience)
If you're using informal firmware, standard MIUI methods won't work, and there are two options:
- π§ Built-in firmware settings β many custom OSes (like LineageOS) have their own lock options in Settings β System system β Gestures.
- π± Root-enabled apps β If you have root access, you can use Tasker or MacroDroid to create automatic lock rules.
Example of settings in LineageOS 20:
- Go to Settings β System β Gestures β Lock gesture.
- Select βDouble tapβ or βSwipe downβ.
- Set up sensitivity and exceptions for specific applications.
For Tasker (root required):
- Create a new task (Task) and add the action Display β Lock Device.
- Set up a trigger (such as double tapping the screen or shaking the phone).
- Save the profile and activate it.
7. Problem Solving: Why the Lock Button Doesn't Work
If none of the methods worked, check the following points:
| Problem. | Reason. | Decision |
|---|---|---|
| The widget disappears after the reboot | Limitations on energy conservation | Add widget to exceptions: Settings β Battery β Battery Optimization β All apps β Lock widget β No restrictions |
| Quick Ball doesn't appear | Conflict with other floating buttons | Disable other services like Facebook Chat Heads or Assistive Touch |
| Gestures don't work in games | The game blocks system gestures | Use third-party apps like TapTap Lock or configure exceptions in Settings β Applications β Special Access β Game Mode |
If the problem persists, try:
- π Reset the launcher settings: clamping the empty space on the screen β Screen settings β Reset the settings.
- π± Update MIUI: Sometimes bugs are fixed in new versions of the firmware.
- π οΈ Clear the system cache: Settings β Additionally. β Backup and reset β Clear the cache.