如何更具需要自定义损失函数_如何使用更多选项自定义Android的“关机”菜单...

如何更具需要自定义损失函数

如何更具需要自定义损失函数

Screenshot_20160810-175701-cropped

When you press and hold the power button on your Android device, the power menu appears. Unfortunately, on a lot of devices, it only has one option: Power Off.

按住Android设备上的电源按钮时,将显示电源菜单。 不幸的是,在许多设备上,它只有一个选择:关闭电源。

It’d be a lot more useful to have some other options there–like reboot, reboot into recovery, or even an option to take a screenshot. And thanks to a little tweak called NeoPowerMenu, it’s totally possible. NeoPowerMenu is an Xposed module that allows you to both customize the power menu’s visual appearance and add a lot more options. Here’s how to set it up.

那里有一些其他选项(例如重新启动,重新启动到恢复,甚至是拍摄屏幕截图的选项)会更加有用。 并感谢一个称为NeoPowerMenu的小调整,这完全有可能。 NeoPowerMenu是Xposed模块,它使您既可以自定义电源菜单的视觉外观,又可以添加更多选项。 设置方法如下。

第一步:安装Xposed框架 (Step One: Install the Xposed Framework)

Let’s start with the obvious: you will need to be rooted for this. While there are some tweaks you can make to your device while unrooted, this one is unavoidable. Go check out our in-depth explanation on how to install Xposed (perhaps using the new systemless method for Marshmallow), and then come back here for the rest of the instructions.

让我们从显而易见的事情开始:您需要为此扎根 。 尽管您可以在无root的情况下对设备进行一些调整 ,但这是不可避免的。 查看我们关于如何安装Xposed的深入说明(可能使用棉花糖的新的无系统方法 ),然后返回此处获取其余说明。

Also, remember to back up your device before getting started. You don’t want to tinker with system files unless you have a backup in case something goes wrong.

另外,请记住在开始之前备份设备 。 您不希望修改系统文件,除非您有备份以防万一出问题。

第二步:安装NeoPowerMenu模块 (Step Two: Install the NeoPowerMenu Module)

With the Xposed Framework installed, find the Xposed Installer app in your app drawer and open it. Then, Click on Download.

安装Xposed Framework之后,在应用程序抽屉中找到Xposed Installer应用程序并将其打开。 然后,单击下载。

3

Click on the magnifying glass icon at the top.

单击顶部的放大镜图标。

4

Then search for NeoPowerMenu.

然后搜索NeoPowerMenu。

5

Tap on that and you’ll be taken to the Description page. Swipe to the left to go over to the Versions page.

点击该按钮,您将转到“描述”页面。 向左滑动即可转到“版本”页面。

6

Then tap Download for the most recent version.

然后点击下载以获取最新版本。

7

Once it’s downloaded, tap Install in the lower right corner.

下载完成后,点击右下角的安装。

8

After that, you should get a notification that says “Activate and Reboot”–press that. If you don’t see the notification, you can always manually activate it under the Modules section of Xposed and then reboot.

之后,您将收到一条提示“激活并重新引导”的通知-按下该通知。 如果看不到该通知,则始终可以在Xposed的“模块”部分下手动将其激活,然后重新启动。

9

第三步:根据自己的喜好自定义菜单 (Step Three: Customize the Menu to Your Liking)

When you first look at your power menu after rebooting, it might look a little something like this:

重新启动后第一次查看电源菜单时,可能看起来像这样:

10

If you don’t like this look, don’t worry! It’s super customizable. Just look for the NeoPowerMenu app in your app drawer and open it.

如果您不喜欢这种外观,请不要担心! 超级可定制。 只需在应用程序抽屉中查找NeoPowerMenu应用程序并将其打开。

11

You’ll first be presented with a list of permissions that the app needs. It offers a little explanation for each permission, but if you don’t plan on using a particular feature (like Torch) you don’t need to approve its corresponding permission (in this instance, Camera).

首先,您会看到该应用所需的权限列表。 它为每种权限提供了一些解释,但是,如果您不打算使用特定功能(例如Torch),则无需批准其相应的权限(在本例中为Camera)。

12

Because permissions were revamped in Marshmallow, you’ll have to approve each of these individually.

由于在Marshmallow中对权限进行了修改 ,因此您必须分别批准每个许可

13

After that, you’ll finally be at the app’s main screen. There’s currently only one Style, and that’s Material. Most of the visual changes are made under Theme, where you can adjust the colors for everything.

之后,您最终将进入应用程序的主屏幕。 当前只有一种样式,那就是材质。 大多数视觉更改是在主题下进行的,您可以在其中调整所有颜色。

Screenshot_20160810-172646

The “Reveal colors” are the colors that make up the animation as the power menu pop-up appears and the background color behind it. If you’d rather it not have a background, you can just make the colors transparent.

“显示颜色”是显示电源菜单弹出窗口时构成动画的颜色以及其后面的背景颜色。 如果您不希望它有背景,则可以使颜色透明。

“Dialog colors” affects the actual look of the pop-up, and all the options below that are for the colors of the different dialogs you’ll see after activating something. For instance, your “Powering off…” screen could be a different color than your “Rebooting…” screen.

“对话框颜色”会影响弹出窗口的实际外观,下面的所有选项都是激活某项后将看到的不同对话框的颜色。 例如,您的“ Powering off…”屏幕可能与“ Rebooting…”屏幕的颜色不同。

You can preview any of your changes at any time by tapping the Preview button in the upper right (or by holding the power button).

您可以随时点击右上角的“预览”按钮(或按住电源按钮)来预览所有更改。

In the Graphics section, you can set custom icons or images for the circles that appear next to each option in the power menu. By default, it’s set to display the first letter of the option (like T for Torch), but you can change it to use graphics instead under Advanced Settings.

在“图形”部分中,可以为出现在电源菜单中每个选项旁边的圆圈设置自定义图标或图像。 默认情况下,它设置为显示该选项的第一个字母(例如T代表Torch),但是您可以将其更改为在“高级设置”下使用图形。

15

In the Visibility and Order section, you can add the real functionality by customizing how your options appear and which options are there. Just grab the three-line icon on the left to rearrange them, or add options with the buttons along the top. Swipe options to the side to delete them.

在“可见性和顺序”部分中,您可以通过自定义选项的显示方式以及其中的哪些选项来添加实际功能。 只需抓住左侧的三行图标即可重新排列它们,或者使用顶部的按钮添加选项。 将选项滑动到侧面以将其删除。

16

If you head into Advanced Settings, you can change where the dialog box appears–in case you have a large screen and want it to appear on the right side so you can tap it with your thumb more easily.

如果您进入“高级设置”,则可以更改对话框的显示位置-如果您的屏幕很大,并且希望它出现在右侧,则可以用拇指更轻松地点击它。

17

Another really convenient feature in Advanced Settings is the ability to set a screenshot delay, so you can capture your screen at just the right moment.

“高级设置”中另一个非常方便的功能是可以设置屏幕快照延迟,因此您可以在适当的时候捕获屏幕。

After you’ve gone ahead and tweaked all the settings to your liking, feel free to leave the app and hold down the power button to test it out.

在按照自己的喜好对所有设置进行了调整之后,请随时离开应用程序并按住电源按钮进行测试。

Screenshot_20160810-171846

更改电源菜单的其他方法 (Other Methods of Changing the Power Menu)

Now this certainly isn’t the only method for getting a customizable power menu — it’s just a good dedicated way. The GravityBox Xposed module also includes some of these options, among many, many others that let you customize your device–like the Quick Settings menu.

现在,这当然不是获得可定制电源菜单的唯一方法,而是一种很好的专用方法。 GravityBox Xposed模块还包括其中一些选项,其中有许多选项可让您自定义设备,例如“快速设置”菜单

2

If that doesn’t accomplish everything you need, you could go a step further and flash a custom ROM. This basically replaces your current software with a new, highly customized version — and many custom ROMs sport a really nice power menu (as evidenced by the Darkobas ROM for the OnePlus One, shown above).

如果那不能满足您的所有需求,则可以更进一步,并刷新自定义ROM 。 这基本上是用高度定制的新版本替换您当前的软件-许多定制ROM具有非常不错的功能菜单(如上图所示,用于OnePlus One的Darkobas ROM证明了这一点)。



One of these methods should allow you to have a new and much-improved power menu. You can access all kinds of settings just by holding the power button and adjusting them to your liking — and that’s exactly the kind of customization that Android was made for. It’s just one of many tweaks you can make with the Xposed Framework, though, so don’t hesitate to go searching for even more modules.

这些方法之一应允许您拥有一个经过改进的新电源菜单。 您只需按住电源按钮并根据自己的喜好进行调整即可访问各种设置,而这正是Android进行的定制。 不过,这只是Xposed Framework可以进行的许多调整之一 ,所以不要犹豫,寻找更多的模块。

翻译自: https://www.howtogeek.com/266890/how-to-customize-androids-power-off-menu-with-more-options/

如何更具需要自定义损失函数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值