Android Launcher main Menu with each screen modified to x*x layout

Source: Internet
Author: User

Modifies the size of Apps_customize_cell_width and apps_customize_cell_height in Launcher2/res/value/dimens.xml. How much value is appropriate and requires a combination of code.

Pagedviewcelllayout Estimatecellhspan and Estimatecellvspan get the return value N (n is the column and row for the number of cells per screen).

Take Estimatecellvspan as an example, int n = Math.max (1, (availheight + mheightgap)/(Mcellheight + mheightgap));

Availheight is available height, availheight = Estimatecellvspan ' s height-toppadding-bottompadding, while Estimatecellvspan's height = SCR Een ' s heightheight-statusbar ' s Height-navigationbar height-toppadding-bottompadding, specifically related to the project;
Mheightgap is usually-1, but it should be confirmed with the code logic;
Mcellheight is the value of apps_customize_cell_width multiplied by the system dimens.
So it is to calculate the value of Mcellheight by other known data, and then divide the mcellheight by the system Dimens, which is the value apps_customize_cell_width in the XML.
Estimatecellvspan Similar

Android Launcher main Menu with each screen modified to x*x layout

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.