Android Launcher3 Remove all apps list, left and right side blank on horizontal screen

Source: Internet
Author: User

First look at the adjustment before and after:



         Layout AllApps Appscustomizetabhost host = (appscustomizetabhost) Launcher.findviewbyid (        R.id.apps_customize_pane); if (host = null) {//Center the All Apps page indicator int pageindicatorheight = (int) (pageindic            ATORHEIGHTPX * Math.min (1f, (ALLAPPSICONSIZEPX/DYNAMICGRID.DEFAULT_ICON_SIZE_PX)));            Pageindicator = Host.findviewbyid (r.id.apps_customize_page_indicator);                if (pageindicator! = NULL) {LP = (Framelayout.layoutparams) pageindicator.getlayoutparams (); lp.gravity = Gravity.center_horizontal |                Gravity.bottom;                Lp.width = layoutparams.wrap_content;                Lp.height = Pageindicatorheight;            PAGEINDICATOR.SETLAYOUTPARAMS (LP); } Appscustomizepagedview Pagedview = (appscustomizepagedview) Host.findviewbyid (R.ID.APPS_CU            Stomize_pane_content);    padding = new Rect ();        if (Pagedview! = null) {//constrain the dimensions of all apps so this it does not span the full  Width//tchip ZJ Add START: Remove all apps list, horizontal and left margin int paddinglr = (AVAILABLEWIDTHPX- (ALLAPPSCELLWIDTHPX * allappsnumcols))                /(2 * (Allappsnumcols + 1));  int PADDINGTB = (AVAILABLEHEIGHTPX-(ALLAPPSCELLHEIGHTPX * allappsnumrows))/(2 * (allappsnumrows                + 1));                PADDINGLR = Math.min (PADDINGLR, (int) ((PADDINGLR + PADDINGTB) * 0.75f));                    PADDINGTB = Math.min (PADDINGTB, (int) ((PADDINGLR + PADDINGTB) * 0.75f));                    PADDINGLR = (int) (PADDINGLR * 0.75f);                    PADDINGTB = (int) (PADDINGTB * 0.75f);                    Tchip ZJ Add END//tchip ZJ minus START: Remove all application lists, margin on both sides of horizontal screen                    /* int PADDINGLR = 2;     int PADDINGTB = 2;               *///tchip ZJ minus END int maxallappswidth = (Allappsnumcols * (AllApps                CELLWIDTHPX + 2 * paddinglr));                int GRIDPADDINGLR = (availablewidthpx-maxallappswidth)/4;  Only adjust the side paddings on landscape phones, or tablets if ((Istablet () | | islandscape) &&                GRIDPADDINGLR > (ALLAPPSCELLWIDTHPX/4)) {padding.left = Padding.right = GRIDPADDINGLR; }//The icons is centered, so we can ' t just offset by the page indicator height// Because the empty space would actually be pageindicatorheight + PADDINGTB Padding.bottom = Math.max (0, Pagei                NDICATORHEIGHT-PADDINGTB);                Pagedview.setallappspadding (padding);            Pagedview.setwidgetspageindicatorpadding (Pageindicatorheight); }        }


Android Launcher3 Remove all apps list, left and right side blank on horizontal screen

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.