Android launcher widget Configuration

Source: Internet
Author: User

Android launcher widget Configuration

<? XML version = "1.0" encoding = "UTF-8"?>

<Favorites xmlns: launcher = "http://schemas.android.com/apk/res/com.android.launcher">

<! -- Far-left screen [0] --> the first screen is determined by the number of screens. Screen [0] indicates the first screen.

<! -- Left screen [1] --> second screen

Here is a widget. Its attributes include package name, class name, screen ID (the second screen ID is 1), coordinates (x, y ), size (4*1)

<Appwidget
Launcher: packagename = "com. Android. Settings"
Launcher: classname = "com. Android. settings. widget. settingsappwidgetprovider"
Launcher: screen = "1"
Launcher: x = "0"
Launcher: Y = "3"
Launcher: Spanx = "4"
Launcher: spany = "1"/>

<Appwidget
Launcher: packagename = "com. Google. Android. Apps. Genie. geniewidget"
Launcher: classname = "com. Google. Android. Apps. Genie. geniewidget. miniwidget. miniwidgetprovider"
Launcher: screen = "1"
Launcher: x = "0"
Launcher: Y = "2"
Launcher: Spanx = "4"
Launcher: spany = "1"/>

<! -- Middle screen [2] -->
<Appwidget
Launcher: packagename = "com. cellon. Clock"
Launcher: classname = "com. cellon. Clock. analogappwidgetprovider"
Launcher: screen = "2"
Launcher: x = "1"
Launcher: Y = "0"
Launcher: Spanx = "2"
Launcher: spany = "2"/>

A shortcut is provided. The attributes include package name, class name, screen ID (the second screen ID is 1), coordinates (x, y ), shortcuts generally occupy only one location, so there is no spanx/y like widgets.

<Favorite
Launcher: packagename = "com. Android. gallery3d"
Launcher: classname = "com. Android. Camera. Camera"
Launcher: screen = "2"
Launcher: x = "0"

Launcher: Y = "3"/>

Generally, a workspace can be divided into 4x4, which means a maximum of 16 shortcuts can be placed on a single screen.

****

****

****

****

You can also configure a folder, which is very powerful. You can modify Google's default XML parsing code and then customize your own XML.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.