![]() void addInScreen(View child, long container, int screen, int x, int y, int spanX, int spanY, Let's look at the structure of Hotseat.java: There is a class dedicated to managing Hotseat in Launcher: Hotseat.java. ![]() However, the displayed effect is not what we imagined, because Hotseat internally processes the horizontal and vertical screens, and we need to make some changes. You need to flow out a row of space in the vertical space for hotseat to use.īasically the configuration has been set up here. If you need to add hotseat, your workspace can only be modified to a 5*2 configuration. For example, it turns out that your workspace is set to 5*3 before hotseat is added. In addition to setting the attributes of Hotseat, we also need to set the attributes of workspace, thinking that hotseat occupies part of the space, so the workspace needs to make room for processing. Because hotseat actually contains a CellLayout, just like workspace. In addition, we can also see that hotseat can define multiple rows and multiple columns. It should be noted that the two properties of launcher:cellCountX and launcher:cellCountY are related to the horizontal and vertical hotseat. The other launcher:XXX is the attributes defined by the launcher. I have already given some of the key attributes above, most of which are the same as the general controls we use. There are several attributes we need to pay attention to, because they are directly related to the display effect of our hotseat. So add hotseat to the launcher.xml configuration file under layout-sw600dp: And my device happens to use this Configuration. This is used for settings such as large screens and tablets. For example: layout-sw600dp Text The launcher.xml in the folder does not have hotseat configuration by default. Not all launcher.xml files have hotseat attributes. Hotseat belongs to the workspace, so you need to configure it in the workspace configuration file and open Launcher.xml can see the hotseat configuration. Let’s take a look at the Hotseat configuration file. But this design is for some Horizontal tablet or mobile Mobile devices, the user experience is really not good. Don't know google Why was it designed like this at the time? It might be for the horizontal screen, not to take up the little vertical space. By default, Hotseat is at the bottom of the screen in portrait mode, and on the right side of the screen in landscape mode. Generally speaking, if you don’t need Hotseat, just write it in the accessory file and it’s OK, but Hotseat Have a The more troublesome place is that you need to pay attention to the horizontal or vertical screen. Hotseat configuration is controlled by configuration files. do Method, you can only find a way to get it out, so today is mainly to analyze how to add HotSeat to your Launcher and analyze HotSeat is implemented. But if 4.0 Launcher in the tablet to run, the default is no HotSeat, just like my running environment here is similar to a tablet, the system defaults to HotSeat is removed. ![]() Generally, we will have this navigation bar under the mobile phone. Today is mainly to analyze the shortcut navigation bar in Launcher-HotSeat.
0 Comments
Leave a Reply. |